chore(web): migration svelte 5 syntax (#13883)

This commit is contained in:
Alex 2024-11-14 08:43:25 -06:00 committed by GitHub
parent 9203a61709
commit 0b3742cf13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
310 changed files with 6435 additions and 4176 deletions

View file

@ -21,11 +21,15 @@
import { t } from 'svelte-i18n';
import { onDestroy } from 'svelte';
export let sharedLink: SharedLinkResponseDto;
export let user: UserResponseDto | undefined = undefined;
interface Props {
sharedLink: SharedLinkResponseDto;
user?: UserResponseDto | undefined;
}
let { sharedLink, user = undefined }: Props = $props();
const album = sharedLink.album as AlbumResponseDto;
let innerWidth: number;
let innerWidth: number = $state(0);
let { isViewing: showAssetViewer } = assetViewingStore;
@ -70,15 +74,15 @@
</AssetSelectControlBar>
{:else}
<ControlAppBar showBackButton={false}>
<svelte:fragment slot="leading">
{#snippet leading()}
<ImmichLogoSmallLink width={innerWidth} />
</svelte:fragment>
{/snippet}
<svelte:fragment slot="trailing">
{#snippet trailing()}
{#if sharedLink.allowUpload}
<CircleIconButton
title={$t('add_photos')}
on:click={() => openFileUploadDialog({ albumId: album.id })}
onclick={() => openFileUploadDialog({ albumId: album.id })}
icon={mdiFileImagePlusOutline}
/>
{/if}
@ -86,13 +90,13 @@
{#if album.assetCount > 0 && sharedLink.allowDownload}
<CircleIconButton
title={$t('download')}
on:click={() => downloadAlbum(album)}
onclick={() => downloadAlbum(album)}
icon={mdiFolderDownloadOutline}
/>
{/if}
<ThemeButton />
</svelte:fragment>
{/snippet}
</ControlAppBar>
{/if}
</header>