mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 Improve export menu (#14960)
fix https://github.com/siyuan-note/siyuan/pull/14950
This commit is contained in:
parent
7419c4bca8
commit
bb814179aa
2 changed files with 22 additions and 22 deletions
|
|
@ -530,12 +530,12 @@ export const exportMd = (id: string) => {
|
|||
});
|
||||
}
|
||||
}, {
|
||||
id: "exportMarkdown",
|
||||
label: "Markdown",
|
||||
icon: "iconMarkdown",
|
||||
id: "exportSiYuanZip",
|
||||
label: "SiYuan .sy.zip",
|
||||
icon: "iconSiYuan",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/exportMd", {
|
||||
fetchPost("/api/export/exportSY", {
|
||||
id,
|
||||
}, response => {
|
||||
hideMessage(msgId);
|
||||
|
|
@ -543,12 +543,12 @@ export const exportMd = (id: string) => {
|
|||
});
|
||||
}
|
||||
}, {
|
||||
id: "exportSiYuanZip",
|
||||
label: "SiYuan .sy.zip",
|
||||
icon: "iconSiYuan",
|
||||
id: "exportMarkdown",
|
||||
label: "Markdown .zip",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/exportSY", {
|
||||
fetchPost("/api/export/exportMd", {
|
||||
id,
|
||||
}, response => {
|
||||
hideMessage(msgId);
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ const initMultiMenu = (selectItemElements: NodeListOf<Element>, app: App) => {
|
|||
icon: "iconUpload",
|
||||
submenu: [{
|
||||
id: "exportMarkdown",
|
||||
label: "Markdown",
|
||||
label: "Markdown .zip",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
|
|
@ -374,19 +374,6 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
|
|||
type: "submenu",
|
||||
icon: "iconUpload",
|
||||
submenu: [{
|
||||
id: "exportMarkdown",
|
||||
label: "Markdown",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/exportNotebookMd", {
|
||||
notebook: notebookId
|
||||
}, response => {
|
||||
hideMessage(msgId);
|
||||
openByMobile(response.data.zip);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
id: "exportSiYuanZip",
|
||||
label: "SiYuan .sy.zip",
|
||||
icon: "iconSiYuan",
|
||||
|
|
@ -399,6 +386,19 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
|
|||
openByMobile(response.data.zip);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
id: "exportMarkdown",
|
||||
label: "Markdown .zip",
|
||||
icon: "iconMarkdown",
|
||||
click: () => {
|
||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||
fetchPost("/api/export/exportNotebookMd", {
|
||||
notebook: notebookId
|
||||
}, response => {
|
||||
hideMessage(msgId);
|
||||
openByMobile(response.data.zip);
|
||||
});
|
||||
}
|
||||
}]
|
||||
}).element);
|
||||
if (app.plugins) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue