feat: export page as file (#2923)

This commit is contained in:
xiaodong zuo
2023-06-30 05:58:02 +08:00
committed by GitHub
parent 8a7908c692
commit bc3ce7395e
4 changed files with 121 additions and 63 deletions

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);