|
@@ -14,8 +14,6 @@
|
|
import { locale } from '$lib/stores/preferences.store';
|
|
import { locale } from '$lib/stores/preferences.store';
|
|
import SideBarSection from './side-bar-section.svelte';
|
|
import SideBarSection from './side-bar-section.svelte';
|
|
|
|
|
|
- let isCollapsed: boolean;
|
|
|
|
-
|
|
|
|
const getAssetCount = async () => {
|
|
const getAssetCount = async () => {
|
|
const { data: allAssetCount } = await api.assetApi.getAssetCountByUserId();
|
|
const { data: allAssetCount } = await api.assetApi.getAssetCountByUserId();
|
|
const { data: archivedCount } = await api.assetApi.getArchivedAssetCountByUserId();
|
|
const { data: archivedCount } = await api.assetApi.getArchivedAssetCountByUserId();
|
|
@@ -74,7 +72,7 @@
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<SideBarSection bind:isCollapsed>
|
|
|
|
|
|
+<SideBarSection>
|
|
<a
|
|
<a
|
|
data-sveltekit-preload-data="hover"
|
|
data-sveltekit-preload-data="hover"
|
|
data-sveltekit-noscroll
|
|
data-sveltekit-noscroll
|
|
@@ -85,7 +83,6 @@
|
|
title="Photos"
|
|
title="Photos"
|
|
logo={ImageOutline}
|
|
logo={ImageOutline}
|
|
isSelected={$page.route.id === '/(user)/photos'}
|
|
isSelected={$page.route.id === '/(user)/photos'}
|
|
- {isCollapsed}
|
|
|
|
>
|
|
>
|
|
<svelte:fragment slot="moreInformation">
|
|
<svelte:fragment slot="moreInformation">
|
|
{#await getAssetCount()}
|
|
{#await getAssetCount()}
|
|
@@ -109,7 +106,6 @@
|
|
title="Explore"
|
|
title="Explore"
|
|
logo={Magnify}
|
|
logo={Magnify}
|
|
isSelected={$page.route.id === '/(user)/explore'}
|
|
isSelected={$page.route.id === '/(user)/explore'}
|
|
- {isCollapsed}
|
|
|
|
/>
|
|
/>
|
|
</a>
|
|
</a>
|
|
<a data-sveltekit-preload-data="hover" href={AppRoute.SHARING} draggable="false">
|
|
<a data-sveltekit-preload-data="hover" href={AppRoute.SHARING} draggable="false">
|
|
@@ -117,7 +113,6 @@
|
|
title="Sharing"
|
|
title="Sharing"
|
|
logo={AccountMultipleOutline}
|
|
logo={AccountMultipleOutline}
|
|
isSelected={$page.route.id === '/(user)/sharing'}
|
|
isSelected={$page.route.id === '/(user)/sharing'}
|
|
- {isCollapsed}
|
|
|
|
>
|
|
>
|
|
<svelte:fragment slot="moreInformation">
|
|
<svelte:fragment slot="moreInformation">
|
|
{#await getAlbumCount()}
|
|
{#await getAlbumCount()}
|
|
@@ -131,18 +126,15 @@
|
|
</SideBarButton>
|
|
</SideBarButton>
|
|
</a>
|
|
</a>
|
|
|
|
|
|
- <div
|
|
|
|
- class="text-xs md:pb-2 md:p-5 p-6 pb-[1.2rem] dark:text-immich-dark-fg transition-all duration-200"
|
|
|
|
- >
|
|
|
|
- <p class={isCollapsed ? 'hidden' : 'block'}>LIBRARY</p>
|
|
|
|
- <hr class={isCollapsed ? 'block mt-2 mb-[0.45rem]' : 'hidden'} />
|
|
|
|
|
|
+ <div class="text-xs dark:text-immich-dark-fg transition-all duration-200">
|
|
|
|
+ <p class="p-6 hidden md:block group-hover:sm:block">LIBRARY</p>
|
|
|
|
+ <hr class="mt-8 mb-[31px] mx-4 block md:hidden group-hover:sm:hidden" />
|
|
</div>
|
|
</div>
|
|
<a data-sveltekit-preload-data="hover" href={AppRoute.FAVORITES} draggable="false">
|
|
<a data-sveltekit-preload-data="hover" href={AppRoute.FAVORITES} draggable="false">
|
|
<SideBarButton
|
|
<SideBarButton
|
|
title="Favorites"
|
|
title="Favorites"
|
|
logo={StarOutline}
|
|
logo={StarOutline}
|
|
isSelected={$page.route.id == '/(user)/favorites'}
|
|
isSelected={$page.route.id == '/(user)/favorites'}
|
|
- {isCollapsed}
|
|
|
|
>
|
|
>
|
|
<svelte:fragment slot="moreInformation">
|
|
<svelte:fragment slot="moreInformation">
|
|
{#await getFavoriteCount()}
|
|
{#await getFavoriteCount()}
|
|
@@ -160,7 +152,6 @@
|
|
title="Albums"
|
|
title="Albums"
|
|
logo={ImageAlbum}
|
|
logo={ImageAlbum}
|
|
isSelected={$page.route.id === '/(user)/albums'}
|
|
isSelected={$page.route.id === '/(user)/albums'}
|
|
- {isCollapsed}
|
|
|
|
>
|
|
>
|
|
<svelte:fragment slot="moreInformation">
|
|
<svelte:fragment slot="moreInformation">
|
|
{#await getAlbumCount()}
|
|
{#await getAlbumCount()}
|
|
@@ -178,7 +169,6 @@
|
|
title="Archive"
|
|
title="Archive"
|
|
logo={ArchiveArrowDownOutline}
|
|
logo={ArchiveArrowDownOutline}
|
|
isSelected={$page.route.id === '/(user)/archive'}
|
|
isSelected={$page.route.id === '/(user)/archive'}
|
|
- {isCollapsed}
|
|
|
|
>
|
|
>
|
|
<svelte:fragment slot="moreInformation">
|
|
<svelte:fragment slot="moreInformation">
|
|
{#await getArchivedAssetsCount()}
|
|
{#await getArchivedAssetsCount()}
|
|
@@ -195,6 +185,6 @@
|
|
|
|
|
|
<!-- Status Box -->
|
|
<!-- Status Box -->
|
|
<div class="mb-6 mt-auto">
|
|
<div class="mb-6 mt-auto">
|
|
- <StatusBox {isCollapsed} />
|
|
|
|
|
|
+ <StatusBox />
|
|
</div>
|
|
</div>
|
|
</SideBarSection>
|
|
</SideBarSection>
|