📱 闪卡关闭侧边栏

This commit is contained in:
Vanessa 2023-02-28 15:53:58 +08:00
parent 8b4fdc4b96
commit e772e97b72

View file

@ -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);