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",
|
id: "exportSiYuanZip",
|
||||||
label: "Markdown",
|
label: "SiYuan .sy.zip",
|
||||||
icon: "iconMarkdown",
|
icon: "iconSiYuan",
|
||||||
click: () => {
|
click: () => {
|
||||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||||
fetchPost("/api/export/exportMd", {
|
fetchPost("/api/export/exportSY", {
|
||||||
id,
|
id,
|
||||||
}, response => {
|
}, response => {
|
||||||
hideMessage(msgId);
|
hideMessage(msgId);
|
||||||
|
|
@ -543,12 +543,12 @@ export const exportMd = (id: string) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
id: "exportSiYuanZip",
|
id: "exportMarkdown",
|
||||||
label: "SiYuan .sy.zip",
|
label: "Markdown .zip",
|
||||||
icon: "iconSiYuan",
|
icon: "iconMarkdown",
|
||||||
click: () => {
|
click: () => {
|
||||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||||
fetchPost("/api/export/exportSY", {
|
fetchPost("/api/export/exportMd", {
|
||||||
id,
|
id,
|
||||||
}, response => {
|
}, response => {
|
||||||
hideMessage(msgId);
|
hideMessage(msgId);
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ const initMultiMenu = (selectItemElements: NodeListOf<Element>, app: App) => {
|
||||||
icon: "iconUpload",
|
icon: "iconUpload",
|
||||||
submenu: [{
|
submenu: [{
|
||||||
id: "exportMarkdown",
|
id: "exportMarkdown",
|
||||||
label: "Markdown",
|
label: "Markdown .zip",
|
||||||
icon: "iconMarkdown",
|
icon: "iconMarkdown",
|
||||||
click: () => {
|
click: () => {
|
||||||
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
const msgId = showMessage(window.siyuan.languages.exporting, -1);
|
||||||
|
|
@ -374,19 +374,6 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
|
||||||
type: "submenu",
|
type: "submenu",
|
||||||
icon: "iconUpload",
|
icon: "iconUpload",
|
||||||
submenu: [{
|
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",
|
id: "exportSiYuanZip",
|
||||||
label: "SiYuan .sy.zip",
|
label: "SiYuan .sy.zip",
|
||||||
icon: "iconSiYuan",
|
icon: "iconSiYuan",
|
||||||
|
|
@ -399,6 +386,19 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
|
||||||
openByMobile(response.data.zip);
|
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);
|
}).element);
|
||||||
if (app.plugins) {
|
if (app.plugins) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue