mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03:46:47 +01:00
feat(web): people sidebar link (#4257)
This commit is contained in:
parent
69c23aa3ec
commit
b7fcec7ce3
4 changed files with 36 additions and 2 deletions
|
@ -9,13 +9,14 @@
|
||||||
import ArchiveArrowDownOutline from 'svelte-material-icons/ArchiveArrowDownOutline.svelte';
|
import ArchiveArrowDownOutline from 'svelte-material-icons/ArchiveArrowDownOutline.svelte';
|
||||||
import Magnify from 'svelte-material-icons/Magnify.svelte';
|
import Magnify from 'svelte-material-icons/Magnify.svelte';
|
||||||
import Map from 'svelte-material-icons/Map.svelte';
|
import Map from 'svelte-material-icons/Map.svelte';
|
||||||
|
import Account from 'svelte-material-icons/Account.svelte';
|
||||||
import HeartMultipleOutline from 'svelte-material-icons/HeartMultipleOutline.svelte';
|
import HeartMultipleOutline from 'svelte-material-icons/HeartMultipleOutline.svelte';
|
||||||
import HeartMultiple from 'svelte-material-icons/HeartMultiple.svelte';
|
import HeartMultiple from 'svelte-material-icons/HeartMultiple.svelte';
|
||||||
import { AppRoute } from '../../../constants';
|
import { AppRoute } from '../../../constants';
|
||||||
import LoadingSpinner from '../loading-spinner.svelte';
|
import LoadingSpinner from '../loading-spinner.svelte';
|
||||||
import StatusBox from '../status-box.svelte';
|
import StatusBox from '../status-box.svelte';
|
||||||
import SideBarButton from './side-bar-button.svelte';
|
import SideBarButton from './side-bar-button.svelte';
|
||||||
import { locale } from '$lib/stores/preferences.store';
|
import { locale, sidebarSettings } from '$lib/stores/preferences.store';
|
||||||
import SideBarSection from './side-bar-section.svelte';
|
import SideBarSection from './side-bar-section.svelte';
|
||||||
import { featureFlags } from '$lib/stores/server-config.store';
|
import { featureFlags } from '$lib/stores/server-config.store';
|
||||||
|
|
||||||
|
@ -67,6 +68,11 @@
|
||||||
<SideBarButton title="Map" logo={Map} isSelected={$page.route.id === '/(user)/map'} />
|
<SideBarButton title="Map" logo={Map} isSelected={$page.route.id === '/(user)/map'} />
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if $sidebarSettings.people}
|
||||||
|
<a data-sveltekit-preload-data="hover" href={AppRoute.PEOPLE} draggable="false">
|
||||||
|
<SideBarButton title="People" logo={Account} isSelected={$page.route.id === '/(user)/people'} />
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
<a data-sveltekit-preload-data="hover" href={AppRoute.SHARING} draggable="false">
|
<a data-sveltekit-preload-data="hover" href={AppRoute.SHARING} draggable="false">
|
||||||
<SideBarButton
|
<SideBarButton
|
||||||
title="Sharing"
|
title="Sharing"
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { fade } from 'svelte/transition';
|
||||||
|
import { sidebarSettings } from '../../stores/preferences.store';
|
||||||
|
import SettingSwitch from '../admin-page/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>
|
||||||
|
</div>
|
||||||
|
</section>
|
|
@ -6,12 +6,13 @@
|
||||||
import SettingAccordion from '../admin-page/settings/setting-accordion.svelte';
|
import SettingAccordion from '../admin-page/settings/setting-accordion.svelte';
|
||||||
import ChangePasswordSettings from './change-password-settings.svelte';
|
import ChangePasswordSettings from './change-password-settings.svelte';
|
||||||
import DeviceList from './device-list.svelte';
|
import DeviceList from './device-list.svelte';
|
||||||
|
import LibraryList from './library-list.svelte';
|
||||||
import MemoriesSettings from './memories-settings.svelte';
|
import MemoriesSettings from './memories-settings.svelte';
|
||||||
import OAuthSettings from './oauth-settings.svelte';
|
import OAuthSettings from './oauth-settings.svelte';
|
||||||
import PartnerSettings from './partner-settings.svelte';
|
import PartnerSettings from './partner-settings.svelte';
|
||||||
|
import SidebarSettings from './sidebar-settings.svelte';
|
||||||
import UserAPIKeyList from './user-api-key-list.svelte';
|
import UserAPIKeyList from './user-api-key-list.svelte';
|
||||||
import UserProfileSettings from './user-profile-settings.svelte';
|
import UserProfileSettings from './user-profile-settings.svelte';
|
||||||
import LibraryList from './library-list.svelte';
|
|
||||||
|
|
||||||
export let user: UserResponseDto;
|
export let user: UserResponseDto;
|
||||||
|
|
||||||
|
@ -62,3 +63,7 @@
|
||||||
<SettingAccordion title="Sharing" subtitle="Manage sharing with partners">
|
<SettingAccordion title="Sharing" subtitle="Manage sharing with partners">
|
||||||
<PartnerSettings {user} bind:partners />
|
<PartnerSettings {user} bind:partners />
|
||||||
</SettingAccordion>
|
</SettingAccordion>
|
||||||
|
|
||||||
|
<SettingAccordion title="Sidebar" subtitle="Manage sidebar settings">
|
||||||
|
<SidebarSettings />
|
||||||
|
</SettingAccordion>
|
||||||
|
|
|
@ -44,6 +44,14 @@ export interface AlbumViewSettings {
|
||||||
view: string;
|
view: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SidebarSettings {
|
||||||
|
people: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const sidebarSettings = persisted<SidebarSettings>('sidebar-settings', {
|
||||||
|
people: false,
|
||||||
|
});
|
||||||
|
|
||||||
export enum AlbumViewMode {
|
export enum AlbumViewMode {
|
||||||
Cover = 'Cover',
|
Cover = 'Cover',
|
||||||
List = 'List',
|
List = 'List',
|
||||||
|
|
Loading…
Reference in a new issue