Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/8634

Vanessaaf2b54680626
diff --git a/app/src/protyle/preview/index.ts b/app/src/protyle/preview/index.ts
index f4b7a2611e..ebda6617a2 100644
--- a/app/src/protyle/preview/index.ts
+++ b/app/src/protyle/preview/index.ts
@@ -97,12 +97,12 @@ export class Preview {
event.preventDefault();
if (isLocalPath(linkAddress)) {
/// #if !MOBILE
- if (Constants.SIYUAN_ASSETS_EXTS.includes(pathPosix().extname((linkAddress.split("?page")[0])))) {
- openAsset(protyle.app, linkAddress.split("?page")[0], parseInt(getSearch("page", linkAddress)));
- } else {
- /// #if !BROWSER
+ if (event.metaKey || event.ctrlKey) {
openBy(linkAddress, "folder");
- /// #endif
+ } else if (event.shiftKey) {
+ openBy(linkAddress, "app");
+ } else if (Constants.SIYUAN_ASSETS_EXTS.includes(pathPosix().extname((linkAddress.split("?page")[0])))) {
+ openAsset(protyle.app, linkAddress.split("?page")[0], parseInt(getSearch("page", linkAddress)));
}
/// #endif
} else {