mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🐛 export msg
This commit is contained in:
parent
23ad748535
commit
432fe6be1e
5 changed files with 23 additions and 20 deletions
|
|
@ -4,16 +4,13 @@ import {escapeHtml} from "../../util/escape";
|
|||
import {shell} from "electron";
|
||||
import * as path from "path";
|
||||
|
||||
export const afterExport = (exportPath: string) => {
|
||||
const id = showMessage(`<div class="fn__flex">
|
||||
<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", () => {
|
||||
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", () => {
|
||||
shell.showItemInFolder(path.join(exportPath));
|
||||
hideMessage(id);
|
||||
hideMessage(msgId);
|
||||
});
|
||||
};
|
||||
/// #endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue