feat: export page as file (#2923)

This commit is contained in:
xiaodong zuo authored and GitHub committed 2023-06-29 21:58:02 +00:00
1 parent 8a7908c692
commit bc3ce7395e
4 files changed
+121 -63

No files matched your search

+1 -3
View File
@@ -1,4 +1,4 @@
import { BrowserWindow, dialog, shell } from 'electron';
import { BrowserWindow, dialog } from 'electron';
import fs from 'fs-extra';
import { logger } from '../logger';
@@ -49,8 +49,6 @@ export async function savePDFFileAs(
logger.log(`Wrote PDF successfully to ${filePath}`);
});
});
await shell.openPath(filePath);
return { filePath };
} catch (err) {
logger.error('savePDFFileAs', err);