Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-10-13 22:55:25 +08:00
commit 407a54294f
13 changed files with 1565 additions and 1554 deletions

View file

@ -289,7 +289,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
webContentsId: ipcData.webContentsId
});
const savePath = ipcData.filePaths[0];
let pdfFilePath = path.join(savePath, replaceLocalPath(ipcData.rootTitle) + ".pdf");
let pdfFilePath = path.join(savePath, replaceLocalPath(ipcData.rootTitle) + ".pdf");
const responseUnique = await fetchSyncPost("/api/file/getUniqueFilename", {path: pdfFilePath});
pdfFilePath = responseUnique.data.path;
fetchPost("/api/export/exportHTML", {
@ -335,7 +335,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
});
} catch (e) {
console.error(e);
showMessage("Export PDF failed: " + e, 0, "error", msgId);
showMessage(window.siyuan.languages.exportPDFLowMemory, 0, "error", msgId);
ipcRenderer.send(Constants.SIYUAN_CMD, {cmd: "destroy", webContentsId: ipcData.webContentsId});
}
ipcRenderer.send(Constants.SIYUAN_CMD, {cmd: "hide", webContentsId: ipcData.webContentsId});