From 7e5e37c512f61dcb0d1707307bc53be1c89df6aa Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sun, 3 Mar 2024 18:07:52 +0800 Subject: [PATCH] replace cookie input with cookie assistant entry on configuration page --- packages/ui/src/main/window/mainWindow.ts | 10 ---- .../GeekAutoStartChatWithBoss.vue | 51 ++----------------- 2 files changed, 5 insertions(+), 56 deletions(-) diff --git a/packages/ui/src/main/window/mainWindow.ts b/packages/ui/src/main/window/mainWindow.ts index 1bd7925..1c849fa 100644 --- a/packages/ui/src/main/window/mainWindow.ts +++ b/packages/ui/src/main/window/mainWindow.ts @@ -69,35 +69,25 @@ export function createMainWindow(): void { const configFileContentList = configFileNameList.map((fileName) => { return readConfigFile(fileName) }) - const storageFileContentList = storageFileNameList.map((fileName) => { - return readStorageFile(fileName) - }) const result = { config: {}, - storage: {} } configFileNameList.forEach((fileName, index) => { result.config[fileName] = configFileContentList[index] }) - storageFileNameList.forEach((fileName, index) => { - result.storage[fileName] = storageFileContentList[index] - }) - return result }) ipcMain.handle('save-config-file-from-ui', async (ev, payload) => { payload = JSON.parse(payload) ensureConfigFileExist() - ensureStorageFileExist() const dingtalkConfig = readConfigFile('dingtalk.json') dingtalkConfig.groupRobotAccessToken = payload.dingtalkRobotAccessToken return await Promise.all([ - writeStorageFile('boss-cookies.json', JSON.parse(payload.bossZhipinCookies)), writeConfigFile('dingtalk.json', dingtalkConfig), writeConfigFile('target-company-list.json', payload.expectCompanies.split(',')) ]) diff --git a/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue b/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue index f1cc71a..ae30d94 100644 --- a/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue +++ b/packages/ui/src/renderer/src/page/Configuration/GeekAutoStartChatWithBoss.vue @@ -1,26 +1,10 @@