immich/web/src/lib/components/shared-components/tree/tree-items.svelte
Mert 74f79cae69
refactor(web): tree data structure for folder and tag views (#18980)
* refactor folder view

inline link

* improved tree collapsing

* handle tags

* linting

* formatting

* simplify

* .from is faster

* simplify

* add key
2025-06-09 10:02:16 -05:00

21 lines
565 B
Svelte

<script lang="ts">
import Tree from '$lib/components/shared-components/tree/tree.svelte';
import { type TreeNode } from '$lib/utils/tree-utils';
interface Props {
tree: TreeNode;
active: string;
icons: { default: string; active: string };
getLink: (path: string) => string;
}
let { tree, active, icons, getLink }: Props = $props();
</script>
<ul class="list-none ms-2">
{#each tree.children as node (node.color ? node.path + node.color : node.path)}
<li>
<Tree {node} {icons} {active} {getLink} />
</li>
{/each}
</ul>