diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts index 35bd648d9..bdc9adefe 100644 --- a/app/src/protyle/export/util.ts +++ b/app/src/protyle/export/util.ts @@ -1,3 +1,8 @@ +/// #if !BROWSER +import {escapeHtml} from "../../util/escape"; +import {shell} from "electron"; +import * as path from "path"; +/// #endif import {hideMessage, showMessage} from "../../dialog/message"; import {fetchPost} from "../../util/fetch"; import {Dialog} from "../../dialog"; @@ -13,12 +18,10 @@ import {chartRender} from "../markdown/chartRender"; import {mindmapRender} from "../markdown/mindmapRender"; import {abcRender} from "../markdown/abcRender"; import {plantumlRender} from "../markdown/plantumlRender"; -/// #if !BROWSER -import {escapeHtml} from "../../util/escape"; -import {shell} from "electron"; -import * as path from "path"; +declare const html2canvas: (element: Element) => Promise; export const afterExport = (exportPath: string, msgId: string) => { + /// #if !BROWSER showMessage(`${window.siyuan.languages.exported}${escapeHtml(exportPath)}
`, 6000, "info", msgId); @@ -26,20 +29,15 @@ export const afterExport = (exportPath: string, msgId: string) => { shell.showItemInFolder(path.join(exportPath)); hideMessage(msgId); }); + /// #endif }; -/// #endif - -declare const html2canvas: (element: Element) => Promise; export const exportImage = (id: string) => { const exportDialog = new Dialog({ title: window.siyuan.languages.exportAsImage, - content: `
-
-
+ content: `
+
+
${window.siyuan.languages.exportBySiYuan}