mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
parent
296bbeb2fc
commit
f69ce6ad8a
11 changed files with 135 additions and 159 deletions
|
|
@ -1,32 +0,0 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
import FolderTree from '$lib/components/folder-tree/folder-tree.svelte';
|
||||
import { buildFolderTree, type RecursiveObject } from '$lib/utils/folder-utils';
|
||||
import { foldersStore } from '$lib/stores/folders.store';
|
||||
import { get } from 'svelte/store';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
let folderTree: RecursiveObject = {};
|
||||
$: currentPath = $page.url.searchParams.get('folder') || '';
|
||||
|
||||
onMount(async () => {
|
||||
await foldersStore.fetchUniquePaths();
|
||||
});
|
||||
|
||||
$: {
|
||||
const { uniquePaths } = get(foldersStore);
|
||||
if (uniquePaths && uniquePaths.length > 0) {
|
||||
folderTree = buildFolderTree(uniquePaths);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<section id="folder-browser-sidebar">
|
||||
<div class="text-xs pl-4 mb-4 dark:text-white">{$t('explorer').toUpperCase()}</div>
|
||||
<div class="overflow-auto pb-10 immich-scrollbar">
|
||||
{#each Object.entries(folderTree) as [folderName, content]}
|
||||
<FolderTree {folderName} {content} {currentPath} basePath="" />
|
||||
{/each}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<script lang="ts">
|
||||
import SideBarSection from '$lib/components/shared-components/side-bar/side-bar-section.svelte';
|
||||
import FolderBrowserSidebar from '$lib/components/shared-components/side-bar/folder-browser-sidebar.svelte';
|
||||
</script>
|
||||
|
||||
<SideBarSection>
|
||||
<FolderBrowserSidebar />
|
||||
</SideBarSection>
|
||||
Loading…
Add table
Add a link
Reference in a new issue