mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
parent
9203a61709
commit
0b3742cf13
310 changed files with 6435 additions and 4176 deletions
|
|
@ -1,13 +1,16 @@
|
|||
<script lang="ts">
|
||||
import BrokenAsset from '$lib/components/assets/broken-asset.svelte';
|
||||
|
||||
export let alt;
|
||||
export let preload = false;
|
||||
export let src: string;
|
||||
let className = '';
|
||||
export { className as class };
|
||||
interface Props {
|
||||
alt?: string;
|
||||
preload?: boolean;
|
||||
src: string;
|
||||
class?: string;
|
||||
}
|
||||
|
||||
let isBroken = false;
|
||||
let { alt, preload = false, src, class: className = '' }: Props = $props();
|
||||
|
||||
let isBroken = $state(false);
|
||||
</script>
|
||||
|
||||
{#if isBroken}
|
||||
|
|
@ -15,7 +18,7 @@
|
|||
{:else}
|
||||
<img
|
||||
{alt}
|
||||
on:error={() => (isBroken = true)}
|
||||
onerror={() => (isBroken = true)}
|
||||
class="size-full rounded-xl object-cover aspect-square {className}"
|
||||
data-testid="album-image"
|
||||
draggable="false"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
<script lang="ts">
|
||||
export let alt = '';
|
||||
export let preload = false;
|
||||
let className = '';
|
||||
export { className as class };
|
||||
interface Props {
|
||||
alt?: string;
|
||||
preload?: boolean;
|
||||
class?: string;
|
||||
}
|
||||
|
||||
let { alt = '', preload = false, class: className = '' }: Props = $props();
|
||||
</script>
|
||||
|
||||
<enhanced:img
|
||||
|
|
|
|||
|
|
@ -6,10 +6,13 @@
|
|||
import { getAssetThumbnailUrl } from '$lib/utils';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let link: SharedLinkResponseDto;
|
||||
export let preload = false;
|
||||
let className = '';
|
||||
export { className as class };
|
||||
interface Props {
|
||||
link: SharedLinkResponseDto;
|
||||
preload?: boolean;
|
||||
class?: string;
|
||||
}
|
||||
|
||||
let { link, preload = false, class: className = '' }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="relative shrink-0 size-24">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue