2022-07-15 23:18:17 -05:00
|
|
|
<script lang="ts">
|
2023-10-25 09:48:25 -04:00
|
|
|
import { featureFlags } from '$lib/stores/server-config.store';
|
|
|
|
|
import {
|
|
|
|
|
mdiAccount,
|
2024-05-12 14:08:17 -04:00
|
|
|
mdiAccountOutline,
|
2023-10-25 09:48:25 -04:00
|
|
|
mdiAccountMultiple,
|
|
|
|
|
mdiAccountMultipleOutline,
|
2024-05-12 14:08:17 -04:00
|
|
|
mdiArchiveArrowDown,
|
2023-10-25 09:48:25 -04:00
|
|
|
mdiArchiveArrowDownOutline,
|
2024-05-12 14:08:17 -04:00
|
|
|
mdiHeart,
|
|
|
|
|
mdiHeartOutline,
|
2023-10-25 09:48:25 -04:00
|
|
|
mdiImageAlbum,
|
|
|
|
|
mdiImageMultiple,
|
|
|
|
|
mdiImageMultipleOutline,
|
|
|
|
|
mdiMagnify,
|
|
|
|
|
mdiMap,
|
2024-05-12 14:08:17 -04:00
|
|
|
mdiMapOutline,
|
|
|
|
|
mdiTrashCan,
|
2023-10-25 09:48:25 -04:00
|
|
|
mdiTrashCanOutline,
|
2024-05-23 12:57:25 -05:00
|
|
|
mdiToolbox,
|
|
|
|
|
mdiToolboxOutline,
|
2024-08-21 19:49:37 +01:00
|
|
|
mdiFolderOutline,
|
2024-08-29 12:14:03 -04:00
|
|
|
mdiTagMultipleOutline,
|
2025-02-07 13:05:15 -05:00
|
|
|
mdiLink,
|
2023-10-25 09:48:25 -04:00
|
|
|
} from '@mdi/js';
|
2023-07-01 00:50:47 -04:00
|
|
|
import SideBarSection from './side-bar-section.svelte';
|
2024-03-12 14:11:16 +01:00
|
|
|
import SideBarLink from './side-bar-link.svelte';
|
2024-06-04 21:53:00 +02:00
|
|
|
import { t } from 'svelte-i18n';
|
2024-07-18 10:56:27 -05:00
|
|
|
import BottomInfo from '$lib/components/shared-components/side-bar/bottom-info.svelte';
|
2024-08-29 14:29:04 -05:00
|
|
|
import { preferences } from '$lib/stores/user.store';
|
2024-12-04 21:38:55 +01:00
|
|
|
import { recentAlbumsDropdown } from '$lib/stores/preferences.store';
|
|
|
|
|
import RecentAlbums from '$lib/components/shared-components/side-bar/recent-albums.svelte';
|
|
|
|
|
import { fly } from 'svelte/transition';
|
2023-04-12 18:37:52 +03:00
|
|
|
|
2024-11-14 08:43:25 -06:00
|
|
|
let isArchiveSelected: boolean = $state(false);
|
|
|
|
|
let isFavoritesSelected: boolean = $state(false);
|
|
|
|
|
let isMapSelected: boolean = $state(false);
|
|
|
|
|
let isPeopleSelected: boolean = $state(false);
|
|
|
|
|
let isPhotosSelected: boolean = $state(false);
|
|
|
|
|
let isSharingSelected: boolean = $state(false);
|
|
|
|
|
let isTrashSelected: boolean = $state(false);
|
|
|
|
|
let isUtilitiesSelected: boolean = $state(false);
|
2022-07-15 23:18:17 -05:00
|
|
|
</script>
|
|
|
|
|
|
2023-04-17 18:18:49 +02:00
|
|
|
<SideBarSection>
|
2024-06-04 21:53:00 +02:00
|
|
|
<nav aria-label={$t('primary')}>
|
2024-03-12 14:11:16 +01:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('photos')}
|
2024-03-12 14:11:16 +01:00
|
|
|
routeId="/(user)/photos"
|
|
|
|
|
bind:isSelected={isPhotosSelected}
|
2023-10-25 09:48:25 -04:00
|
|
|
icon={isPhotosSelected ? mdiImageMultiple : mdiImageMultipleOutline}
|
2024-11-26 08:59:47 -06:00
|
|
|
></SideBarLink>
|
2024-08-29 14:29:04 -05:00
|
|
|
|
2024-03-12 14:11:16 +01:00
|
|
|
{#if $featureFlags.search}
|
2024-06-04 21:53:00 +02:00
|
|
|
<SideBarLink title={$t('explore')} routeId="/(user)/explore" icon={mdiMagnify} />
|
2024-03-12 14:11:16 +01:00
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
{#if $featureFlags.map}
|
2024-05-12 14:08:17 -04:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('map')}
|
2024-05-12 14:08:17 -04:00
|
|
|
routeId="/(user)/map"
|
|
|
|
|
bind:isSelected={isMapSelected}
|
|
|
|
|
icon={isMapSelected ? mdiMap : mdiMapOutline}
|
|
|
|
|
/>
|
2024-03-12 14:11:16 +01:00
|
|
|
{/if}
|
|
|
|
|
|
2024-08-29 14:29:04 -05:00
|
|
|
{#if $preferences.people.enabled && $preferences.people.sidebarWeb}
|
2024-05-12 14:08:17 -04:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('people')}
|
2024-05-12 14:08:17 -04:00
|
|
|
routeId="/(user)/people"
|
|
|
|
|
bind:isSelected={isPeopleSelected}
|
|
|
|
|
icon={isPeopleSelected ? mdiAccount : mdiAccountOutline}
|
|
|
|
|
/>
|
2024-03-12 14:11:16 +01:00
|
|
|
{/if}
|
2024-08-29 14:29:04 -05:00
|
|
|
|
2025-02-07 13:05:15 -05:00
|
|
|
{#if $preferences.sharedLinks.enabled && $preferences.sharedLinks.sidebarWeb}
|
|
|
|
|
<SideBarLink title={$t('shared_links')} routeId="/(user)/shared-links" icon={mdiLink} />
|
|
|
|
|
{/if}
|
|
|
|
|
|
2024-08-29 14:29:04 -05:00
|
|
|
<SideBarLink
|
|
|
|
|
title={$t('sharing')}
|
|
|
|
|
routeId="/(user)/sharing"
|
|
|
|
|
icon={isSharingSelected ? mdiAccountMultiple : mdiAccountMultipleOutline}
|
|
|
|
|
bind:isSelected={isSharingSelected}
|
2024-11-26 08:59:47 -06:00
|
|
|
></SideBarLink>
|
2023-02-21 13:42:22 +01:00
|
|
|
|
2025-04-01 22:12:04 -04:00
|
|
|
<p class="text-xs p-6 dark:text-immich-dark-fg">{$t('library').toUpperCase()}</p>
|
2024-08-29 14:29:04 -05:00
|
|
|
|
2024-03-12 14:11:16 +01:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('favorites')}
|
2024-03-12 14:11:16 +01:00
|
|
|
routeId="/(user)/favorites"
|
2024-05-12 14:08:17 -04:00
|
|
|
icon={isFavoritesSelected ? mdiHeart : mdiHeartOutline}
|
2024-03-12 14:11:16 +01:00
|
|
|
bind:isSelected={isFavoritesSelected}
|
2024-11-26 08:59:47 -06:00
|
|
|
></SideBarLink>
|
2024-08-29 14:29:04 -05:00
|
|
|
|
2024-12-04 21:38:55 +01:00
|
|
|
<SideBarLink
|
|
|
|
|
title={$t('albums')}
|
|
|
|
|
routeId="/(user)/albums"
|
|
|
|
|
icon={mdiImageAlbum}
|
|
|
|
|
flippedLogo
|
|
|
|
|
bind:dropdownOpen={$recentAlbumsDropdown}
|
|
|
|
|
>
|
|
|
|
|
{#snippet dropDownContent()}
|
|
|
|
|
<span in:fly={{ y: -20 }} class="hidden md:block">
|
|
|
|
|
<RecentAlbums />
|
|
|
|
|
</span>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</SideBarLink>
|
2024-03-12 14:11:16 +01:00
|
|
|
|
2024-08-29 14:29:04 -05:00
|
|
|
{#if $preferences.tags.enabled && $preferences.tags.sidebarWeb}
|
|
|
|
|
<SideBarLink title={$t('tags')} routeId="/(user)/tags" icon={mdiTagMultipleOutline} flippedLogo />
|
|
|
|
|
{/if}
|
2024-08-29 12:14:03 -04:00
|
|
|
|
2024-08-29 14:29:04 -05:00
|
|
|
{#if $preferences.folders.enabled && $preferences.folders.sidebarWeb}
|
|
|
|
|
<SideBarLink title={$t('folders')} routeId="/(user)/folders" icon={mdiFolderOutline} flippedLogo />
|
|
|
|
|
{/if}
|
2024-08-21 19:49:37 +01:00
|
|
|
|
2024-05-23 12:57:25 -05:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('utilities')}
|
2024-05-23 12:57:25 -05:00
|
|
|
routeId="/(user)/utilities"
|
|
|
|
|
bind:isSelected={isUtilitiesSelected}
|
|
|
|
|
icon={isUtilitiesSelected ? mdiToolbox : mdiToolboxOutline}
|
|
|
|
|
></SideBarLink>
|
|
|
|
|
|
2024-05-12 14:08:17 -04:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('archive')}
|
2024-05-12 14:08:17 -04:00
|
|
|
routeId="/(user)/archive"
|
|
|
|
|
bind:isSelected={isArchiveSelected}
|
|
|
|
|
icon={isArchiveSelected ? mdiArchiveArrowDown : mdiArchiveArrowDownOutline}
|
2024-11-26 08:59:47 -06:00
|
|
|
></SideBarLink>
|
2022-07-15 23:18:17 -05:00
|
|
|
|
2024-03-12 14:11:16 +01:00
|
|
|
{#if $featureFlags.trash}
|
2024-05-12 14:08:17 -04:00
|
|
|
<SideBarLink
|
2024-06-04 21:53:00 +02:00
|
|
|
title={$t('trash')}
|
2024-05-12 14:08:17 -04:00
|
|
|
routeId="/(user)/trash"
|
|
|
|
|
bind:isSelected={isTrashSelected}
|
|
|
|
|
icon={isTrashSelected ? mdiTrashCan : mdiTrashCanOutline}
|
2024-11-26 08:59:47 -06:00
|
|
|
></SideBarLink>
|
2024-03-12 14:11:16 +01:00
|
|
|
{/if}
|
|
|
|
|
</nav>
|
2023-10-23 18:24:58 +02:00
|
|
|
|
2024-07-18 10:56:27 -05:00
|
|
|
<BottomInfo />
|
2023-04-15 03:41:52 +02:00
|
|
|
</SideBarSection>
|