diff --git a/src/main/actions/file.js b/src/main/actions/file.js index 997159dc..8015b598 100644 --- a/src/main/actions/file.js +++ b/src/main/actions/file.js @@ -20,16 +20,23 @@ const handleResponseForExport = (e, { type, content, filename, pathname }) => { defaultPath }) + // If export PDF, the content will be undefined. if (!content && type === 'pdf') { win.webContents.printToPDF({ printBackground: true }, (err, data) => { if (err) log(err) else { writeFile(filePath, data, extension) + .then(() => { + win.webContents.send('AGANI::export-success', { type, filePath }) + }) .catch(log) } }) } else { writeFile(filePath, content, extension) + .then(() => { + win.webContents.send('AGANI::export-success', { type, filePath }) + }) .catch(log) } } diff --git a/src/main/actions/marktext.js b/src/main/actions/marktext.js index 9af1185a..2547176b 100644 --- a/src/main/actions/marktext.js +++ b/src/main/actions/marktext.js @@ -10,7 +10,7 @@ autoUpdater.autoDownload = false autoUpdater.on('error', error => { if (win) { - win.webContents.send('AGANI::UPDATE_ERROR', error === null ? 'Error: unknown' : (error.stack || error).toString()) + win.webContents.send('AGANI::UPDATE_ERROR', error === null ? 'Error: unknown' : (error.message || error).toString()) } }) diff --git a/src/renderer/app.vue b/src/renderer/app.vue index e4d961b0..58ab87e8 100644 --- a/src/renderer/app.vue +++ b/src/renderer/app.vue @@ -1,7 +1,6 @@ @@ -23,29 +27,11 @@ diff --git a/src/renderer/components/sideBar/index.vue b/src/renderer/components/sideBar/index.vue index 0808aef8..4919afd7 100644 --- a/src/renderer/components/sideBar/index.vue +++ b/src/renderer/components/sideBar/index.vue @@ -2,7 +2,7 @@