mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
This commit is contained in:
parent
cd85db32e5
commit
b57010d449
1 changed files with 13 additions and 6 deletions
|
|
@ -117,12 +117,17 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
}
|
}
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.riffCard,
|
label: window.siyuan.languages.riffCard,
|
||||||
iconHTML: '<svg class="b3-menu__icon" style="color: var(--b3-theme-secondary)"><use xlink:href="#iconRiffCard"></use></svg>',
|
type: "submenu",
|
||||||
|
icon: "iconRiffCard",
|
||||||
|
submenu: [{
|
||||||
|
iconHTML: Constants.ZWSP,
|
||||||
|
label: window.siyuan.languages.spaceRepetition,
|
||||||
click: () => {
|
click: () => {
|
||||||
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>`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}],
|
||||||
}).element);
|
}).element);
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
|
|
@ -312,6 +317,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
|
||||||
type: "submenu",
|
type: "submenu",
|
||||||
icon: "iconRiffCard",
|
icon: "iconRiffCard",
|
||||||
submenu: [{
|
submenu: [{
|
||||||
|
iconHTML: Constants.ZWSP,
|
||||||
label: window.siyuan.languages.spaceRepetition,
|
label: window.siyuan.languages.spaceRepetition,
|
||||||
click: () => {
|
click: () => {
|
||||||
fetchPost("/api/riff/getTreeRiffDueCards", {rootID: id}, (response) => {
|
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,
|
label: window.siyuan.languages.addToDeck,
|
||||||
click: () => {
|
click: () => {
|
||||||
makeCard([id]);
|
makeCard([id]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue