From b57010d4499fe571b5725a24cce3edfba523fd1e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 27 Feb 2023 15:22:15 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7497 --- app/src/menus/navigation.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts index cb97f86df..97277becb 100644 --- a/app/src/menus/navigation.ts +++ b/app/src/menus/navigation.ts @@ -117,12 +117,17 @@ export const initNavigationMenu = (liElement: HTMLElement) => { } window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.riffCard, - iconHTML: '', - click: () => { - fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => { - openCardByData(response.data, `${escapeHtml(name)}`); - }); - } + type: "submenu", + icon: "iconRiffCard", + submenu: [{ + iconHTML: Constants.ZWSP, + label: window.siyuan.languages.spaceRepetition, + click: () => { + fetchPost("/api/riff/getNotebookRiffDueCards", {notebook: notebookId}, (response) => { + openCardByData(response.data, `${escapeHtml(name)}`); + }); + } + }], }).element); /// #if !MOBILE window.siyuan.menus.menu.append(new MenuItem({ @@ -312,6 +317,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement: type: "submenu", icon: "iconRiffCard", submenu: [{ + iconHTML: Constants.ZWSP, label: window.siyuan.languages.spaceRepetition, click: () => { fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => { @@ -319,6 +325,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement: }); } }, { + iconHTML: Constants.ZWSP, label: window.siyuan.languages.addToDeck, click: () => { makeCard([id]);