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

@ -5,11 +5,15 @@
import { t } from 'svelte-i18n';
import FormatMessage from '$lib/components/i18n/format-message.svelte';
export let size: number;
export let onConfirm: () => void;
export let onCancel: () => void;
interface Props {
size: number;
onConfirm: () => void;
onCancel: () => void;
}
let checked = false;
let { size, onConfirm, onCancel }: Props = $props();
let checked = $state(false);
const handleConfirm = () => {
if (checked) {
@ -25,10 +29,12 @@
onConfirm={handleConfirm}
{onCancel}
>
<svelte:fragment slot="prompt">
{#snippet promptSnippet()}
<p>
<FormatMessage key="permanently_delete_assets_prompt" values={{ count: size }} let:message>
<b>{message}</b>
<FormatMessage key="permanently_delete_assets_prompt" values={{ count: size }}>
{#snippet children({ message })}
<b>{message}</b>
{/snippet}
</FormatMessage>
</p>
<p><b>{$t('cannot_undo_this_action')}</b></p>
@ -36,5 +42,5 @@
<div class="pt-4 flex justify-center items-center">
<Checkbox id="confirm-deletion-input" label={$t('do_not_show_again')} bind:checked />
</div>
</svelte:fragment>
{/snippet}
</ConfirmDialog>