Manage folder images in a gallery and hide asset directories

This commit is contained in:
eezd committed 2026-10-21 16:05:01 +08:00
1 parent fbce545d98
commit f473ec64b6
10 files changed
+106 -4

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { computed, reactive, watch } from 'vue'
import type { Entry } from './api'
import { basename, dirname } from './paths'
import { basename, dirname, hiddenAssetPath } from './paths'
import { ws } from './workspace'
export interface TreeNode {
@@ -29,7 +29,7 @@ function build(entries: Entry[]): TreeNode[] {
return root
}
export const tree = computed(() => build(ws.entries))
export const tree = computed(() => build(ws.entries.filter((entry) => !hiddenAssetPath(entry.path))))
const EXPANDED_KEY = 'rawmark.expanded'
export const expanded = reactive(new Set<string>(JSON.parse(localStorage.getItem(EXPANDED_KEY) ?? '[]') as string[]))