From 387bb601577a1432dcd0b8e1be9fa300af2b490a Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Sun, 31 Mar 2024 12:51:44 +0800 Subject: [PATCH] add the view for display auto start chat record --- .../src/entity/VChatStartupLog.ts | 4 + .../flow/OPEN_SETTING_WINDOW/ipc/index.ts | 2 +- .../src/page/BootstrapSplash/index.vue | 6 -- .../page/Configuration/StartChatRecord.vue | 77 +++++++++++++++++++ .../renderer/src/page/Configuration/index.vue | 14 +++- packages/ui/src/renderer/src/router/index.ts | 9 ++- 6 files changed, 103 insertions(+), 9 deletions(-) create mode 100644 packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue diff --git a/packages/sqlite-plugin/src/entity/VChatStartupLog.ts b/packages/sqlite-plugin/src/entity/VChatStartupLog.ts index 95e1c9d..f5c39e1 100644 --- a/packages/sqlite-plugin/src/entity/VChatStartupLog.ts +++ b/packages/sqlite-plugin/src/entity/VChatStartupLog.ts @@ -6,6 +6,7 @@ const { ViewEntity, ViewColumn } = requireTypeorm(); user_info.name as userName, chat_startup_log.date, boss_info.name AS bossName, + boss_info.title AS bossTitle, company_info.name AS companyName FROM chat_startup_log @@ -58,6 +59,9 @@ export class VChatStartupLog { @ViewColumn() bossName: string; + @ViewColumn() + bossTitle: string; + @ViewColumn() companyName: string; } 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 abba378..270c1db 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 @@ -261,6 +261,6 @@ export default function initIpc () { ipcMain.handle('get-auto-start-chat-record', async () => { const a = await getAutoStartChatRecord() - console.log(a) + return a }) } diff --git a/packages/ui/src/renderer/src/page/BootstrapSplash/index.vue b/packages/ui/src/renderer/src/page/BootstrapSplash/index.vue index e3d5336..90138c0 100644 --- a/packages/ui/src/renderer/src/page/BootstrapSplash/index.vue +++ b/packages/ui/src/renderer/src/page/BootstrapSplash/index.vue @@ -52,10 +52,4 @@ onMounted(async () => { } }) }) - -electron.ipcRenderer.invoke('get-auto-start-chat-record').then(() => { - debugger -}, () => { - debugger -}) diff --git a/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue b/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue new file mode 100644 index 0000000..5ddd630 --- /dev/null +++ b/packages/ui/src/renderer/src/page/Configuration/StartChatRecord.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/packages/ui/src/renderer/src/page/Configuration/index.vue b/packages/ui/src/renderer/src/page/Configuration/index.vue index 83f3af7..60d60db 100644 --- a/packages/ui/src/renderer/src/page/Configuration/index.vue +++ b/packages/ui/src/renderer/src/page/Configuration/index.vue @@ -1,4 +1,16 @@ - +