This commit is contained in:
Vanessa 2022-09-26 20:41:24 +08:00
parent f7d91a67b9
commit 3dcea128b3

View file

@ -337,7 +337,12 @@ export const bazaar = {
const type = target.getAttribute("data-type"); const type = target.getAttribute("data-type");
if (type === "open") { if (type === "open") {
/// #if !BROWSER /// #if !BROWSER
shell.openPath(path.join(window.siyuan.config.system.confDir, "appearance", "themes", target.parentElement.getAttribute("data-name"))); const dirName = target.parentElement.parentElement.getAttribute("data-bazaar")
if (dirName === "icons" || dirName === "themes") {
shell.openPath(path.join(window.siyuan.config.system.confDir, "appearance", dirName, target.parentElement.getAttribute("data-name")))
} else {
shell.openPath(path.join(window.siyuan.config.system.dataDir, dirName, target.parentElement.getAttribute("data-name")));
}
/// #endif /// #endif
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();