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";
|
|
|
|
|
|
2022-06-06 23:04:56 +08:00
|
|
|
export const afterExport = (exportPath: string, msgId: string) => {
|
|
|
|
|
showMessage(`${window.siyuan.languages.exported}${escapeHtml(exportPath)}
|
|
|
|
|
<div class="fn__space"></div>
|
|
|
|
|
<button class="b3-button b3-button--white">${window.siyuan.languages.showInFolder}</button>`, 6000, "info", msgId);
|
|
|
|
|
document.querySelector(`#message [data-id="${msgId}"] button`).addEventListener("click", () => {
|
2022-05-26 15:18:53 +08:00
|
|
|
shell.showItemInFolder(path.join(exportPath));
|
2022-06-06 23:04:56 +08:00
|
|
|
hideMessage(msgId);
|
2022-05-26 15:18:53 +08:00
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/// #endif
|