mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
📱 闪卡关闭侧边栏
This commit is contained in:
parent
8b4fdc4b96
commit
e772e97b72
1 changed files with 15 additions and 0 deletions
|
|
@ -28,6 +28,9 @@ import {Files} from "../layout/dock/Files";
|
||||||
import {openNewWindowById} from "../window/openNewWindow";
|
import {openNewWindowById} from "../window/openNewWindow";
|
||||||
import {openCardByData} from "../card/openCard";
|
import {openCardByData} from "../card/openCard";
|
||||||
import {escapeHtml} from "../util/escape";
|
import {escapeHtml} from "../util/escape";
|
||||||
|
/// #if MOBILE
|
||||||
|
import {closePanel} from "../mobile/util/closePanel";
|
||||||
|
/// #endif
|
||||||
import {viewCards} from "../card/viewCards";
|
import {viewCards} from "../card/viewCards";
|
||||||
|
|
||||||
const initMultiMenu = (selectItemElements: NodeListOf<Element>) => {
|
const initMultiMenu = (selectItemElements: NodeListOf<Element>) => {
|
||||||
|
|
@ -126,12 +129,18 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => {
|
fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => {
|
||||||
openCardByData(response.data, `<span data-notebookid="${notebookId}" class="fn__flex-center">${escapeHtml(name)}</span>`);
|
openCardByData(response.data, `<span data-notebookid="${notebookId}" class="fn__flex-center">${escapeHtml(name)}</span>`);
|
||||||
});
|
});
|
||||||
|
/// #if MOBILE
|
||||||
|
closePanel();
|
||||||
|
/// #endif
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
iconHTML: Constants.ZWSP,
|
iconHTML: Constants.ZWSP,
|
||||||
label: window.siyuan.languages.mgmt,
|
label: window.siyuan.languages.mgmt,
|
||||||
click: () => {
|
click: () => {
|
||||||
viewCards(notebookId, escapeHtml(name), "Notebook");
|
viewCards(notebookId, escapeHtml(name), "Notebook");
|
||||||
|
/// #if MOBILE
|
||||||
|
closePanel();
|
||||||
|
/// #endif
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
}).element);
|
}).element);
|
||||||
|
|
@ -329,12 +338,18 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
|
||||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => {
|
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => {
|
||||||
openCardByData(response.data, `<span data-id="${id}" class="fn__flex-center">${name}</span>`);
|
openCardByData(response.data, `<span data-id="${id}" class="fn__flex-center">${name}</span>`);
|
||||||
});
|
});
|
||||||
|
/// #if MOBILE
|
||||||
|
closePanel();
|
||||||
|
/// #endif
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
iconHTML: Constants.ZWSP,
|
iconHTML: Constants.ZWSP,
|
||||||
label: window.siyuan.languages.mgmt,
|
label: window.siyuan.languages.mgmt,
|
||||||
click: () => {
|
click: () => {
|
||||||
viewCards(id, name, "Tree");
|
viewCards(id, name, "Tree");
|
||||||
|
/// #if MOBILE
|
||||||
|
closePanel();
|
||||||
|
/// #endif
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
}).element);
|
}).element);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue