mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 00:50:23 -05:00
feat(web): show folder navigation in root directory (#12299)
This commit is contained in:
parent
c7ddd0b44a
commit
1e509d97f6
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
||||||
$: pathSegments = data.path ? data.path.split('/') : [];
|
$: pathSegments = data.path ? data.path.split('/') : [];
|
||||||
$: tree = buildTree($foldersStore?.uniquePaths || []);
|
$: tree = buildTree($foldersStore?.uniquePaths || []);
|
||||||
$: currentPath = $page.url.searchParams.get(QueryParameter.PATH) || '';
|
$: currentPath = $page.url.searchParams.get(QueryParameter.PATH) || '';
|
||||||
|
$: currentTreeItems = currentPath ? data.currentFolders : Object.keys(tree);
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await foldersStore.fetchUniquePaths();
|
await foldersStore.fetchUniquePaths();
|
||||||
|
@ -63,7 +64,7 @@
|
||||||
<Breadcrumbs {pathSegments} icon={mdiFolderHome} title={$t('folders')} {getLink} />
|
<Breadcrumbs {pathSegments} icon={mdiFolderHome} title={$t('folders')} {getLink} />
|
||||||
|
|
||||||
<section class="mt-2">
|
<section class="mt-2">
|
||||||
<TreeItemThumbnails items={data.currentFolders} icon={mdiFolder} onClick={handleNavigation} />
|
<TreeItemThumbnails items={currentTreeItems} icon={mdiFolder} onClick={handleNavigation} />
|
||||||
|
|
||||||
<!-- Assets -->
|
<!-- Assets -->
|
||||||
{#if data.pathAssets && data.pathAssets.length > 0}
|
{#if data.pathAssets && data.pathAssets.length > 0}
|
||||||
|
|
Loading…
Reference in a new issue