mirror of
https://github.com/immich-app/immich.git
synced 2025-06-08 21:38:40 +02:00
fix(web): persisted store
This commit is contained in:
parent
0b8fc7b493
commit
836956f8ac
2 changed files with 6 additions and 13 deletions
web/src/lib
|
@ -41,7 +41,7 @@
|
|||
};
|
||||
|
||||
const handleToggleLocaleBrowser = () => {
|
||||
$locale = $locale ? undefined : fallbackLocale.code;
|
||||
$locale = $locale !== 'default' ? 'default' : fallbackLocale.code;
|
||||
};
|
||||
|
||||
const langOptions = langs
|
||||
|
@ -117,13 +117,13 @@
|
|||
<SettingSwitch
|
||||
title={$t('default_locale')}
|
||||
subtitle={$t('default_locale_description')}
|
||||
checked={$locale == undefined}
|
||||
checked={$locale == 'default'}
|
||||
onToggle={handleToggleLocaleBrowser}
|
||||
>
|
||||
<p class="mt-2 dark:text-gray-400">{selectedDate}</p>
|
||||
</SettingSwitch>
|
||||
</div>
|
||||
{#if $locale !== undefined}
|
||||
{#if $locale !== 'default'}
|
||||
<div class="ms-4">
|
||||
<SettingCombobox
|
||||
comboboxPlaceholder={$t('searching_locales')}
|
||||
|
@ -141,7 +141,6 @@
|
|||
title={$t('display_original_photos')}
|
||||
subtitle={$t('display_original_photos_setting_description')}
|
||||
bind:checked={$alwaysLoadOriginalFile}
|
||||
onToggle={() => ($alwaysLoadOriginalFile = !$alwaysLoadOriginalFile)}
|
||||
/>
|
||||
</div>
|
||||
<div class="ms-4">
|
||||
|
@ -149,16 +148,10 @@
|
|||
title={$t('video_hover_setting')}
|
||||
subtitle={$t('video_hover_setting_description')}
|
||||
bind:checked={$playVideoThumbnailOnHover}
|
||||
onToggle={() => ($playVideoThumbnailOnHover = !$playVideoThumbnailOnHover)}
|
||||
/>
|
||||
</div>
|
||||
<div class="ms-4">
|
||||
<SettingSwitch
|
||||
title={$t('loop_videos')}
|
||||
subtitle={$t('loop_videos_description')}
|
||||
bind:checked={$loopVideo}
|
||||
onToggle={() => ($loopVideo = !$loopVideo)}
|
||||
/>
|
||||
<SettingSwitch title={$t('loop_videos')} subtitle={$t('loop_videos_description')} bind:checked={$loopVideo} />
|
||||
</div>
|
||||
|
||||
<div class="ms-4">
|
||||
|
|
|
@ -9,9 +9,9 @@ export interface ThemeSetting {
|
|||
}
|
||||
|
||||
// Locale to use for formatting dates, numbers, etc.
|
||||
export const locale = persisted<string | undefined>('locale', undefined, {
|
||||
export const locale = persisted<string | undefined>('locale', 'default', {
|
||||
serializer: {
|
||||
parse: (text) => (text == '' ? 'en-US' : text),
|
||||
parse: (text) => text,
|
||||
stringify: (object) => object ?? '',
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue