🎨 Add Show in Folder for the database block https://github.com/siyuan-note/siyuan/issues/15995

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-04 15:19:04 +08:00
parent fb92c20aca
commit a2136c526d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -41,7 +41,7 @@ import {countBlockWord} from "../../layout/status";
import {Constants} from "../../constants";
import {mathRender} from "../render/mathRender";
import {duplicateBlock} from "../wysiwyg/commonHotkey";
import {movePathTo} from "../../util/pathName";
import {movePathTo, useShell} from "../../util/pathName";
import {hintMoveBlock} from "../hint/extend";
import {makeCard, quickMakeCard} from "../../card/makeCard";
import {transferBlockRef} from "../../menus/block";
@ -59,6 +59,7 @@ import {addEditorToDatabase} from "../render/av/addToDatabase";
import {processClonePHElement} from "../render/util";
/// #if !MOBILE
import {openFileById} from "../../editor/util";
import * as path from "path";
/// #endif
import {checkFold} from "../../util/noRelyPCFunction";
import {clearSelect} from "../util/clearSelect";
@ -1559,6 +1560,14 @@ export class Gutter {
});
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
id: "showDatabaseInFolder",
icon: "iconFolder",
label: window.siyuan.languages.showInFolder,
click() {
useShell("showItemInFolder", path.join(window.siyuan.config.system.dataDir, "storage", "av", nodeElement.getAttribute("data-av-id")) + ".json");
}
}).element);
} else if ((type === "NodeVideo" || type === "NodeAudio") && !protyle.disabled) {
window.siyuan.menus.menu.append(new MenuItem({id: "separator_VideoOrAudio", type: "separator"}).element);
window.siyuan.menus.menu.append(new MenuItem({