From 822e67a1859f63d6e6997f0321789212ee20cc5c Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sun, 14 Apr 2024 22:29:00 +0800 Subject: [PATCH] adjust ui text; add the exit logic when download dependencies error --- packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts | 6 +++++- .../page/BootstrapSplash/page/DownloadingDependencies.vue | 2 +- .../src/page/Configuration/GeekAutoStartChatWithBoss.vue | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts index 6cbfdb0..b9ff86e 100644 --- a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts +++ b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts @@ -1,4 +1,4 @@ -import { ipcMain, shell } from 'electron' +import { ipcMain, shell, app } from 'electron' import * as childProcess from 'node:child_process' import { @@ -264,4 +264,8 @@ export default function initIpc() { const a = await getAutoStartChatRecord(payload) return a }) + + ipcMain.handle('exit-app-immediately', () => { + app.exit(0) + }) } diff --git a/packages/ui/src/renderer/src/page/BootstrapSplash/page/DownloadingDependencies.vue b/packages/ui/src/renderer/src/page/BootstrapSplash/page/DownloadingDependencies.vue index fa38189..fbc663d 100644 --- a/packages/ui/src/renderer/src/page/BootstrapSplash/page/DownloadingDependencies.vue +++ b/packages/ui/src/renderer/src/page/BootstrapSplash/page/DownloadingDependencies.vue @@ -75,8 +75,8 @@ const processTasks = async () => { processTasks() }) .catch(() => { - // FIXME: should exit app here promiseList.length = 0 + electron.ipcRenderer.invoke('exit-app-immediately') }) } } diff --git a/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue b/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue index 8096105..3724765 100644 --- a/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue +++ b/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue @@ -6,7 +6,10 @@ >编辑Cookie - +