Skip to content

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

:iphone: 闪卡关闭侧边栏

Vanessae772e97b72b3
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts
index c0f8cba5d9..19e7042164 100644
--- a/app/src/menus/navigation.ts
+++ b/app/src/menus/navigation.ts
@@ -28,6 +28,9 @@ import {Files} from "../layout/dock/Files";
import {openNewWindowById} from "../window/openNewWindow";
import {openCardByData} from "../card/openCard";
import {escapeHtml} from "../util/escape";
+/// #if MOBILE
+import {closePanel} from "../mobile/util/closePanel";
+/// #endif
import {viewCards} from "../card/viewCards";
const initMultiMenu = (selectItemElements: NodeListOf<Element>) => {
@@ -126,12 +129,18 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => {
openCardByData(response.data, `<span data-notebookid="${notebookId}" class="fn__flex-center">${escapeHtml(name)}</span>`);
});
+ /// #if MOBILE
+ closePanel();
+ /// #endif
}
}, {
iconHTML: Constants.ZWSP,
label: window.siyuan.languages.mgmt,
click: () => {
viewCards(notebookId, escapeHtml(name), "Notebook");
+ /// #if MOBILE
+ closePanel();
+ /// #endif
}
}],
}).element);
@@ -329,12 +338,18 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => {
openCardByData(response.data, `<span data-id="${id}" class="fn__flex-center">${name}</span>`);
});
+ /// #if MOBILE
+ closePanel();
+ /// #endif
}
}, {
iconHTML: Constants.ZWSP,
label: window.siyuan.languages.mgmt,
click: () => {
viewCards(id, name, "Tree");
+ /// #if MOBILE
+ closePanel();
+ /// #endif
}
}],
}).element);