feat: 浏览器自动化操作开发

This commit is contained in:
DEV_DSW
2026-03-03 17:05:13 +08:00
parent d99f1dd98e
commit 20e825215f
18 changed files with 495 additions and 68 deletions

View File

@@ -3,21 +3,23 @@ import { CONFIG_KEYS } from '@common/constants'
import { setupMainWindow } from './wins';
import started from 'electron-squirrel-startup'
import configManager from '@main/service/config-service'
import logManager from '@main/service/logger'
import { runTaskOperationService } from '@main/process/runTaskOperationService'
import log from 'electron-log';
// import logManager from '@main/service/logger'
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (started) {
app.quit();
}
process.on('uncaughtException', (err) => {
logManager.error('uncaughtException', err);
});
// process.on('uncaughtException', (err) => {
// logManager.error('uncaughtException', err);
// });
process.on('unhandledRejection', (reason, promise) => {
logManager.error('unhandledRejection', reason, promise);
});
// process.on('unhandledRejection', (reason, promise) => {
// logManager.error('unhandledRejection', reason, promise);
// });
app.whenReady().then(() => {
setupMainWindow();
@@ -33,7 +35,7 @@ app.whenReady().then(() => {
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
if (process.platform !== 'darwin' && !configManager.get(CONFIG_KEYS.MINIMIZE_TO_TRAY)) {
logManager.info('app closing due to all windows being closed');
log.info('app closing due to all windows being closed');
app.quit();
}
});