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
310 changed files with 6435 additions and 4176 deletions

View File

@@ -1,8 +1,15 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import ImmichLogo from './immich-logo.svelte';
export let title: string;
export let showMessage = $$slots.message;
interface Props {
title: string;
message?: Snippet;
showMessage?: boolean;
children?: Snippet;
}
let { title, message, showMessage = message != undefined, children }: Props = $props();
</script>
<section class="min-w-screen flex min-h-screen place-content-center place-items-center p-4">
@@ -20,10 +27,10 @@
<div
class="w-full rounded-xl border-2 border-immich-primary bg-immich-primary/5 p-4 text-sm font-medium text-immich-primary dark:border-immich-dark-bg dark:text-immich-dark-primary"
>
<slot name="message" />
{@render message?.()}
</div>
{/if}
<slot />
{@render children?.()}
</div>
</section>