mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 08:30:03 +09:00
chore(web): migration svelte 5 syntax (#13883)
This commit is contained in:
@@ -14,22 +14,22 @@
|
||||
import SettingAccordion from '$lib/components/shared-components/settings/setting-accordion.svelte';
|
||||
|
||||
// Folders
|
||||
let foldersEnabled = $preferences?.folders?.enabled ?? false;
|
||||
let foldersSidebar = $preferences?.folders?.sidebarWeb ?? false;
|
||||
let foldersEnabled = $state($preferences?.folders?.enabled ?? false);
|
||||
let foldersSidebar = $state($preferences?.folders?.sidebarWeb ?? false);
|
||||
|
||||
// Memories
|
||||
let memoriesEnabled = $preferences?.memories?.enabled ?? true;
|
||||
let memoriesEnabled = $state($preferences?.memories?.enabled ?? true);
|
||||
|
||||
// People
|
||||
let peopleEnabled = $preferences?.people?.enabled ?? false;
|
||||
let peopleSidebar = $preferences?.people?.sidebarWeb ?? false;
|
||||
let peopleEnabled = $state($preferences?.people?.enabled ?? false);
|
||||
let peopleSidebar = $state($preferences?.people?.sidebarWeb ?? false);
|
||||
|
||||
// Ratings
|
||||
let ratingsEnabled = $preferences?.ratings?.enabled ?? false;
|
||||
let ratingsEnabled = $state($preferences?.ratings?.enabled ?? false);
|
||||
|
||||
// Tags
|
||||
let tagsEnabled = $preferences?.tags?.enabled ?? false;
|
||||
let tagsSidebar = $preferences?.tags?.sidebarWeb ?? false;
|
||||
let tagsEnabled = $state($preferences?.tags?.enabled ?? false);
|
||||
let tagsSidebar = $state($preferences?.tags?.sidebarWeb ?? false);
|
||||
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
@@ -50,11 +50,15 @@
|
||||
handleError(error, $t('errors.unable_to_update_settings'));
|
||||
}
|
||||
};
|
||||
|
||||
const onsubmit = (event: Event) => {
|
||||
event.preventDefault();
|
||||
};
|
||||
</script>
|
||||
|
||||
<section class="my-4">
|
||||
<div in:fade={{ duration: 500 }}>
|
||||
<form autocomplete="off" on:submit|preventDefault>
|
||||
<form autocomplete="off" {onsubmit}>
|
||||
<div class="ml-4 mt-4 flex flex-col">
|
||||
<SettingAccordion key="folders" title={$t('folders')} subtitle={$t('folders_feature_description')}>
|
||||
<div class="ml-4 mt-6">
|
||||
@@ -116,7 +120,7 @@
|
||||
</SettingAccordion>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<Button type="submit" size="sm" on:click={() => handleSave()}>{$t('save')}</Button>
|
||||
<Button type="submit" size="sm" onclick={() => handleSave()}>{$t('save')}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user