mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server): Add week numbers for templating (#4263)
* add week numbers as template option * generate api * fix tests * change example date to show week padding * change example date to immich birthday
This commit is contained in:
6
web/src/api/open-api/api.ts
generated
6
web/src/api/open-api/api.ts
generated
@@ -3542,6 +3542,12 @@ export interface SystemConfigTemplateStorageOptionDto {
|
||||
* @memberof SystemConfigTemplateStorageOptionDto
|
||||
*/
|
||||
'secondOptions': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof SystemConfigTemplateStorageOptionDto
|
||||
*/
|
||||
'weekOptions': Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
|
||||
@@ -58,11 +58,12 @@
|
||||
filetypefull: 'IMAGE',
|
||||
};
|
||||
|
||||
const dt = luxon.DateTime.fromISO(new Date('2022-09-04T20:03:05.250').toISOString());
|
||||
const dt = luxon.DateTime.fromISO(new Date('2022-02-03T04:56:05.250').toISOString());
|
||||
|
||||
const dateTokens = [
|
||||
...templateOptions.yearOptions,
|
||||
...templateOptions.monthOptions,
|
||||
...templateOptions.weekOptions,
|
||||
...templateOptions.dayOptions,
|
||||
...templateOptions.hourOptions,
|
||||
...templateOptions.minuteOptions,
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<div class="mt-2 rounded-lg bg-gray-200 p-4 text-xs dark:bg-gray-700 dark:text-immich-dark-fg">
|
||||
<div class="mb-2 text-gray-600 dark:text-immich-dark-fg">
|
||||
<p>Asset's creation timestamp is used for the datetime information</p>
|
||||
<p>Sample time 2022-09-04T20:03:05.250</p>
|
||||
<p>Sample time 2022-02-03T04:56:05.250</p>
|
||||
</div>
|
||||
<div class="flex gap-[50px]">
|
||||
<div class="flex gap-[40px]">
|
||||
<div>
|
||||
<p class="font-medium text-immich-primary dark:text-immich-dark-primary">YEAR</p>
|
||||
<ul>
|
||||
@@ -37,6 +37,15 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="font-medium text-immich-primary dark:text-immich-dark-primary">WEEK</p>
|
||||
<ul>
|
||||
{#each options.weekOptions as weekFormat}
|
||||
<li>{'{{'}{weekFormat}{'}}'} - {getLuxonExample(weekFormat)}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="font-medium text-immich-primary dark:text-immich-dark-primary">DAY</p>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user