From e772e97b72b3c6d1baa06a5d07bb930cd76603c4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 28 Feb 2023 15:53:58 +0800 Subject: [PATCH] =?UTF-8?q?:iphone:=20=E9=97=AA=E5=8D=A1=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/menus/navigation.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts index c0f8cba5d..19e704216 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) => { @@ -126,12 +129,18 @@ export const initNavigationMenu = (liElement: HTMLElement) => { fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => { openCardByData(response.data, `${escapeHtml(name)}`); }); + /// #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, `${name}`); }); + /// #if MOBILE + closePanel(); + /// #endif } }, { iconHTML: Constants.ZWSP, label: window.siyuan.languages.mgmt, click: () => { viewCards(id, name, "Tree"); + /// #if MOBILE + closePanel(); + /// #endif } }], }).element);