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,
|
label: window.siyuan.languages.export,
|
||||||
type: "submenu",
|
type: "submenu",
|
||||||
icon: "iconUpload",
|
icon: "iconUpload",
|
||||||
submenu: [
|
submenu: [{
|
||||||
{
|
|
||||||
label: window.siyuan.languages.template,
|
label: window.siyuan.languages.template,
|
||||||
icon: "iconMarkdown",
|
icon: "iconMarkdown",
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|
@ -642,8 +641,7 @@ export const exportMd = (id: string) => {
|
||||||
showMessage(window.siyuan.languages.exportTplSucc);
|
showMessage(window.siyuan.languages.exportTplSucc);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
label: "Markdown",
|
label: "Markdown",
|
||||||
icon: "iconMarkdown",
|
icon: "iconMarkdown",
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|
@ -661,8 +659,7 @@ export const exportMd = (id: string) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
label: "SiYuan .sy.zip",
|
label: "SiYuan .sy.zip",
|
||||||
icon: "iconSiYuan",
|
icon: "iconSiYuan",
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,8 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
}
|
}
|
||||||
/// #if !BROWSER
|
|
||||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||||
|
/// #if !BROWSER
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.showInFolder,
|
label: window.siyuan.languages.showInFolder,
|
||||||
click: () => {
|
click: () => {
|
||||||
|
|
@ -109,9 +109,14 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
if (!window.siyuan.config.readonly) {
|
if (!window.siyuan.config.readonly) {
|
||||||
genImportMenu(notebookId, "/");
|
genImportMenu(notebookId, "/");
|
||||||
}
|
}
|
||||||
|
/// #endif
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.export,
|
label: window.siyuan.languages.export,
|
||||||
|
type: "submenu",
|
||||||
icon: "iconUpload",
|
icon: "iconUpload",
|
||||||
|
submenu: [{
|
||||||
|
label: "Markdown",
|
||||||
|
icon: "iconMarkdown",
|
||||||
click: () => {
|
click: () => {
|
||||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||||
fetchPost("/api/export/batchExportMd", {
|
fetchPost("/api/export/batchExportMd", {
|
||||||
|
|
@ -122,8 +127,20 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
window.open(response.data.zip);
|
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);
|
}).element);
|
||||||
/// #endif
|
|
||||||
return window.siyuan.menus.menu;
|
return window.siyuan.menus.menu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue