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

+3 -1
View File
@@ -73,13 +73,14 @@ function commitRename() {
if (target && target !== props.node.path) void move(props.node.path, target)
}
function runMenu(action: 'note' | 'folder' | 'import' | 'rename' | 'move' | 'share' | 'delete') {
function runMenu(action: 'note' | 'folder' | 'import' | 'images' | 'rename' | 'move' | 'share' | 'delete') {
menuOpen.value = false
const path = props.node.path
if (action === 'note' || action === 'folder') {
expanded.add(path)
void (action === 'note' ? createNote(path) : createFolder(path))
} else if (action === 'import') ws.importing = path
else if (action === 'images') ws.images = path
else if (action === 'rename') ws.renaming = path
else if (action === 'share') ws.sharing = path
else if (action === 'move') ws.moving = path
@@ -152,6 +153,7 @@ function onDrop(e: DragEvent) {
<template v-if="node.dir && !assetDir">
<button @click="runMenu('note')"><Icon name="noteAdd" />新建笔记</button>
<button @click="runMenu('folder')"><Icon name="folderAdd" />新建文件夹</button>
<button @click="runMenu('images')"><Icon name="image" />图片管理</button>
<button @click="runMenu('import')"><Icon name="import" />导入</button>
</template>
<button v-if="image" @click="menuOpen = false; ws.image = node.path"><Icon name="image" />预览 / 替换图片</button>