mirror of
https://github.com/immich-app/immich.git
synced 2025-11-24 23:40:45 +09:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user