mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02: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
web/src/lib/components/user-settings-page
|
@ -19,11 +19,15 @@
|
|||
import { dialogController } from '$lib/components/shared-components/dialog/dialog';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
export let keys: ApiKeyResponseDto[];
|
||||
interface Props {
|
||||
keys: ApiKeyResponseDto[];
|
||||
}
|
||||
|
||||
let newKey: { name: string } | null = null;
|
||||
let editKey: ApiKeyResponseDto | null = null;
|
||||
let secret = '';
|
||||
let { keys = $bindable() }: Props = $props();
|
||||
|
||||
let newKey: { name: string } | null = $state(null);
|
||||
let editKey: ApiKeyResponseDto | null = $state(null);
|
||||
let secret = $state('');
|
||||
|
||||
const format: Intl.DateTimeFormatOptions = {
|
||||
month: 'short',
|
||||
|
@ -118,7 +122,7 @@
|
|||
<section class="my-4">
|
||||
<div class="flex flex-col gap-2" in:fade={{ duration: 500 }}>
|
||||
<div class="mb-2 flex justify-end">
|
||||
<Button size="sm" on:click={() => (newKey = { name: $t('api_key') })}>{$t('new_api_key')}</Button>
|
||||
<Button size="sm" onclick={() => (newKey = { name: $t('api_key') })}>{$t('new_api_key')}</Button>
|
||||
</div>
|
||||
|
||||
{#if keys.length > 0}
|
||||
|
@ -152,14 +156,14 @@
|
|||
icon={mdiPencilOutline}
|
||||
title={$t('edit_key')}
|
||||
size="16"
|
||||
on:click={() => (editKey = key)}
|
||||
onclick={() => (editKey = key)}
|
||||
/>
|
||||
<CircleIconButton
|
||||
color="primary"
|
||||
icon={mdiTrashCanOutline}
|
||||
title={$t('delete_key')}
|
||||
size="16"
|
||||
on:click={() => handleDelete(key)}
|
||||
onclick={() => handleDelete(key)}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue