mirror of
https://github.com/immich-app/immich.git
synced 2026-03-09 03:37:22 +03:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
@@ -7,15 +7,18 @@
|
||||
import { archiveAssets } from '$lib/utils/asset-utils';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let onArchive: OnArchive;
|
||||
interface Props {
|
||||
onArchive: OnArchive;
|
||||
menuItem?: boolean;
|
||||
unarchive?: boolean;
|
||||
}
|
||||
|
||||
export let menuItem = false;
|
||||
export let unarchive = false;
|
||||
let { onArchive, menuItem = false, unarchive = false }: Props = $props();
|
||||
|
||||
$: text = unarchive ? $t('unarchive') : $t('to_archive');
|
||||
$: icon = unarchive ? mdiArchiveArrowUpOutline : mdiArchiveArrowDownOutline;
|
||||
let text = $derived(unarchive ? $t('unarchive') : $t('to_archive'));
|
||||
let icon = $derived(unarchive ? mdiArchiveArrowUpOutline : mdiArchiveArrowDownOutline);
|
||||
|
||||
let loading = false;
|
||||
let loading = $state(false);
|
||||
|
||||
const { clearSelect, getOwnedAssets } = getAssetControlContext();
|
||||
|
||||
@@ -38,8 +41,8 @@
|
||||
|
||||
{#if !menuItem}
|
||||
{#if loading}
|
||||
<CircleIconButton title={$t('loading')} icon={mdiTimerSand} />
|
||||
<CircleIconButton title={$t('loading')} icon={mdiTimerSand} onclick={() => {}} />
|
||||
{:else}
|
||||
<CircleIconButton title={text} {icon} on:click={handleArchive} />
|
||||
<CircleIconButton title={text} {icon} onclick={handleArchive} />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user