mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
fix(desktop/print): proper reporting when it finishes
This commit is contained in:
@@ -141,6 +141,13 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
doRender() {
|
||||
this.$widget = $(TPL);
|
||||
this.contentSized();
|
||||
|
||||
if (utils.isElectron()) {
|
||||
const { ipcRenderer } = utils.dynamicRequire("electron");
|
||||
ipcRenderer.on("print-done", () => {
|
||||
toast.closePersistent("printing");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async refresh() {
|
||||
@@ -330,6 +337,12 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
toast.showPersistent({
|
||||
icon: "bx bx-loader-circle bx-spin",
|
||||
message: t("note_detail.printing_pdf"),
|
||||
id: "printing"
|
||||
});
|
||||
|
||||
const { ipcRenderer } = utils.dynamicRequire("electron");
|
||||
ipcRenderer.send("export-as-pdf", {
|
||||
title: this.note.title,
|
||||
|
||||
Reference in New Issue
Block a user