Manage folder images in a gallery and hide asset directories
This commit is contained in:
1 parent
fbce545d98
commit
f473ec64b6
10 files changed
+106
-4
No files matched your search
+2
-2
@@ -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[]))
|
||||
|
||||
Reference in new issue
Block a user