mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +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
|
|
@ -10,10 +10,15 @@
|
|||
import { t } from 'svelte-i18n';
|
||||
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
||||
|
||||
export let onDone: () => void;
|
||||
export let onPrevious: () => void;
|
||||
interface Props {
|
||||
onDone: () => void;
|
||||
onPrevious: () => void;
|
||||
}
|
||||
|
||||
let config: SystemConfigDto | null = null;
|
||||
let { onDone, onPrevious }: Props = $props();
|
||||
|
||||
let config: SystemConfigDto | null = $state(null);
|
||||
let adminSettingsComponent = $state<ReturnType<typeof AdminSettings>>();
|
||||
|
||||
onMount(async () => {
|
||||
config = await getConfig();
|
||||
|
|
@ -26,38 +31,42 @@
|
|||
</p>
|
||||
|
||||
{#if config && $user}
|
||||
<AdminSettings bind:config let:handleSave>
|
||||
<SettingSwitch
|
||||
title={$t('admin.map_settings')}
|
||||
subtitle={$t('admin.map_implications')}
|
||||
bind:checked={config.map.enabled}
|
||||
/>
|
||||
<SettingSwitch
|
||||
title={$t('admin.version_check_settings')}
|
||||
subtitle={$t('admin.version_check_implications')}
|
||||
bind:checked={config.newVersionCheck.enabled}
|
||||
/>
|
||||
<div class="flex pt-4">
|
||||
<div class="w-full flex place-content-start">
|
||||
<Button class="flex gap-2 place-content-center" on:click={() => onPrevious()}>
|
||||
<Icon path={mdiArrowLeft} size="18" />
|
||||
<p>{$t('theme')}</p>
|
||||
</Button>
|
||||
</div>
|
||||
<div class="flex w-full place-content-end">
|
||||
<Button
|
||||
on:click={() => {
|
||||
handleSave({ map: config?.map, newVersionCheck: config?.newVersionCheck });
|
||||
onDone();
|
||||
}}
|
||||
>
|
||||
<span class="flex place-content-center place-items-center gap-2">
|
||||
{$t('admin.storage_template_settings')}
|
||||
<Icon path={mdiArrowRight} size="18" />
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<AdminSettings bind:config bind:this={adminSettingsComponent}>
|
||||
{#snippet children()}
|
||||
{#if config}
|
||||
<SettingSwitch
|
||||
title={$t('admin.map_settings')}
|
||||
subtitle={$t('admin.map_implications')}
|
||||
bind:checked={config.map.enabled}
|
||||
/>
|
||||
<SettingSwitch
|
||||
title={$t('admin.version_check_settings')}
|
||||
subtitle={$t('admin.version_check_implications')}
|
||||
bind:checked={config.newVersionCheck.enabled}
|
||||
/>
|
||||
<div class="flex pt-4">
|
||||
<div class="w-full flex place-content-start">
|
||||
<Button class="flex gap-2 place-content-center" onclick={() => onPrevious()}>
|
||||
<Icon path={mdiArrowLeft} size="18" />
|
||||
<p>{$t('theme')}</p>
|
||||
</Button>
|
||||
</div>
|
||||
<div class="flex w-full place-content-end">
|
||||
<Button
|
||||
onclick={() => {
|
||||
adminSettingsComponent?.handleSave({ map: config?.map, newVersionCheck: config?.newVersionCheck });
|
||||
onDone();
|
||||
}}
|
||||
>
|
||||
<span class="flex place-content-center place-items-center gap-2">
|
||||
{$t('admin.storage_template_settings')}
|
||||
<Icon path={mdiArrowRight} size="18" />
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/snippet}
|
||||
</AdminSettings>
|
||||
{/if}
|
||||
</OnboardingCard>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue