2022-05-26 15:18:53 +08:00
|
|
|
import {hideMessage, showMessage} from "../../dialog/message";
|
|
|
|
|
/// #if !BROWSER
|
|
|
|
|
import {escapeHtml} from "../../util/escape";
|
|
|
|
|
import {shell} from "electron";
|
|
|
|
|
import * as path from "path";
|
|
|
|
|
|
|
|
|
|
export const afterExport = (exportPath: string) => {
|
2022-06-05 00:48:29 +08:00
|
|
|
const id = showMessage(`<div class="fn__flex">
|
2022-05-26 15:18:53 +08:00
|
|
|
<div class="fn__flex-center">${window.siyuan.languages.exported}${escapeHtml(exportPath)}</div>
|
|
|
|
|
<div class="fn__space"></div>
|
|
|
|
|
<div class="fn__space"></div>
|
|
|
|
|
<button class="b3-button b3-button--white">${window.siyuan.languages.showInFolder}</button>
|
|
|
|
|
</div>`, 6000);
|
|
|
|
|
document.querySelector("#message button").addEventListener("click", () => {
|
|
|
|
|
shell.showItemInFolder(path.join(exportPath));
|
2022-06-05 00:48:29 +08:00
|
|
|
hideMessage(id);
|
2022-05-26 15:18:53 +08:00
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/// #endif
|