mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
be2913c956
commit
2a189b4c27
2 changed files with 86 additions and 72 deletions
|
|
@ -620,8 +620,7 @@ export const exportMd = (id: string) => {
|
|||
label: window.siyuan.languages.export,
|
||||
type: "submenu",
|
||||
icon: "iconUpload",
|
||||
submenu: [
|
||||
{
|
||||
submenu: [{
|
||||
label: window.siyuan.languages.template,
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
|
|
@ -642,8 +641,7 @@ export const exportMd = (id: string) => {
|
|||
showMessage(window.siyuan.languages.exportTplSucc);
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
label: "Markdown",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
|
|
@ -661,8 +659,7 @@ export const exportMd = (id: string) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
label: "SiYuan .sy.zip",
|
||||
icon: "iconSiYuan",
|
||||
click: () => {
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||
}
|
||||
}).element);
|
||||
}
|
||||
/// #if !BROWSER
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
/// #if !BROWSER
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.showInFolder,
|
||||
click: () => {
|
||||
|
|
@ -109,9 +109,14 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||
if (!window.siyuan.config.readonly) {
|
||||
genImportMenu(notebookId, "/");
|
||||
}
|
||||
/// #endif
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.export,
|
||||
type: "submenu",
|
||||
icon: "iconUpload",
|
||||
submenu: [{
|
||||
label: "Markdown",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/batchExportMd", {
|
||||
|
|
@ -122,8 +127,20 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
|||
window.open(response.data.zip);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
label: "SiYuan .sy.zip",
|
||||
icon: "iconSiYuan",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/exportNotebookSY", {
|
||||
id: notebookId,
|
||||
}, response => {
|
||||
hideMessage(msgId);
|
||||
window.open(response.data.zip);
|
||||
});
|
||||
}
|
||||
}]
|
||||
}).element);
|
||||
/// #endif
|
||||
return window.siyuan.menus.menu;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue