mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): duplicate key error and enable expiration editing for expired shared links (#24686)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import SettingSelect from '$lib/components/shared-components/settings/setting-select.svelte';
|
import SettingSelect from '$lib/components/shared-components/settings/setting-select.svelte';
|
||||||
import { locale } from '$lib/stores/preferences.store';
|
import { locale } from '$lib/stores/preferences.store';
|
||||||
import { minBy } from 'lodash-es';
|
import { minBy, uniqBy } from 'lodash-es';
|
||||||
import { DateTime, Duration } from 'luxon';
|
import { DateTime, Duration } from 'luxon';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
|
|
||||||
@@ -68,9 +68,8 @@
|
|||||||
<SettingSelect
|
<SettingSelect
|
||||||
bind:value={expirationOption}
|
bind:value={expirationOption}
|
||||||
{onSelect}
|
{onSelect}
|
||||||
options={[...new Set([...expiredDateOptions, getExpirationOption(createdAt, expiresAt)])]}
|
options={uniqBy([...expiredDateOptions, getExpirationOption(createdAt, expiresAt)], 'value')}
|
||||||
label={$t('expire_after')}
|
label={$t('expire_after')}
|
||||||
disabled={expiresAt !== null && DateTime.fromISO(expiresAt) < DateTime.now()}
|
|
||||||
number={true}
|
number={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user