mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
refactor(web): sidebar settings (#7344)
This commit is contained in:
parent
b4e924b0c0
commit
b3131dfe14
4 changed files with 28 additions and 53 deletions
|
@ -3,6 +3,8 @@
|
|||
import SettingCombobox from '$lib/components/shared-components/settings/setting-combobox.svelte';
|
||||
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
||||
import { fallbackLocale, locales } from '$lib/constants';
|
||||
import { sidebarSettings } from '$lib/stores/preferences.store';
|
||||
import { alwaysLoadOriginalFile } from '$lib/stores/preferences.store';
|
||||
import { colorTheme, locale } from '$lib/stores/preferences.store';
|
||||
import { findLocale } from '$lib/utils';
|
||||
import { onMount } from 'svelte';
|
||||
|
@ -70,6 +72,7 @@
|
|||
on:toggle={handleToggleColorTheme}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="ml-4">
|
||||
<SettingSwitch
|
||||
title="Default Locale"
|
||||
|
@ -92,6 +95,30 @@
|
|||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="ml-4">
|
||||
<SettingSwitch
|
||||
title="Display original photos"
|
||||
subtitle="Prefer to display the original photo when viewing an asset rather than thumbnails when the original asset is web-compatible. This may result in slower photo display speeds."
|
||||
bind:checked={$alwaysLoadOriginalFile}
|
||||
on:toggle={() => ($alwaysLoadOriginalFile = !$alwaysLoadOriginalFile)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="ml-4">
|
||||
<SettingSwitch
|
||||
title="People"
|
||||
subtitle="Display a link to People in the sidebar"
|
||||
bind:checked={$sidebarSettings.people}
|
||||
/>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<SettingSwitch
|
||||
title="Sharing"
|
||||
subtitle="Display a link to Sharing in the sidebar"
|
||||
bind:checked={$sidebarSettings.sharing}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
import { alwaysLoadOriginalFile } from '../../stores/preferences.store';
|
||||
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
||||
|
||||
const handleToggle = () => {
|
||||
$alwaysLoadOriginalFile = !$alwaysLoadOriginalFile;
|
||||
};
|
||||
</script>
|
||||
|
||||
<section class="my-4">
|
||||
<div in:fade={{ duration: 500 }}>
|
||||
<div class="ml-4 mt-4 flex flex-col gap-4">
|
||||
<div class="ml-4">
|
||||
<SettingSwitch
|
||||
title="Display original photos"
|
||||
subtitle="Prefer to display the original photo when viewing an asset rather than thumbnails when the original asset is web-compatible. This may result in slower photo display speeds."
|
||||
bind:checked={$alwaysLoadOriginalFile}
|
||||
on:toggle={handleToggle}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
|
@ -1,18 +0,0 @@
|
|||
<script lang="ts">
|
||||
import { fade } from 'svelte/transition';
|
||||
import { sidebarSettings } from '../../stores/preferences.store';
|
||||
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
||||
</script>
|
||||
|
||||
<section class="my-4">
|
||||
<div in:fade={{ duration: 500 }}>
|
||||
<div class="ml-4 mt-4 flex flex-col gap-4">
|
||||
<div class="ml-4">
|
||||
<SettingSwitch title="People" subtitle="Display a link to People" bind:checked={$sidebarSettings.people} />
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<SettingSwitch title="Sharing" subtitle="Display a link to Sharing" bind:checked={$sidebarSettings.sharing} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
|
@ -14,8 +14,6 @@
|
|||
import MemoriesSettings from './memories-settings.svelte';
|
||||
import OAuthSettings from './oauth-settings.svelte';
|
||||
import PartnerSettings from './partner-settings.svelte';
|
||||
import QualitySettings from './quality-settings.svelte';
|
||||
import SidebarSettings from './sidebar-settings.svelte';
|
||||
import TrashSettings from './trash-settings.svelte';
|
||||
import UserAPIKeyList from './user-api-key-list.svelte';
|
||||
import UserProfileSettings from './user-profile-settings.svelte';
|
||||
|
@ -29,7 +27,7 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<SettingAccordion key="appearance" title="Appearance" subtitle="Manage your Immich appearance">
|
||||
<SettingAccordion key="appearance" title="Appearance" subtitle="Manage the app appearance">
|
||||
<AppearanceSettings />
|
||||
</SettingAccordion>
|
||||
|
||||
|
@ -69,18 +67,10 @@
|
|||
<ChangePasswordSettings />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion key="quality" title="Quality" subtitle="Manage your photo viewing experience">
|
||||
<QualitySettings />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion key="sharing" title="Sharing" subtitle="Manage sharing with partners">
|
||||
<PartnerSettings user={$user} />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion key="sidebar" title="Sidebar" subtitle="Manage sidebar settings">
|
||||
<SidebarSettings />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion key="trash" title="Trash" subtitle="Manage trash settings">
|
||||
<TrashSettings />
|
||||
</SettingAccordion>
|
||||
|
|
Loading…
Reference in a new issue