From 2ae98621ba1147cda38df3a6a5809aa0096c453a Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Wed, 5 Jun 2024 08:25:50 +0800 Subject: [PATCH] :hammer: Refactor(custom): remove unused ipc evt --- src/main/events/ipcList.ts | 7 ------- src/renderer/layouts/Main.vue | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/events/ipcList.ts b/src/main/events/ipcList.ts index 016ce7a..335dce5 100644 --- a/src/main/events/ipcList.ts +++ b/src/main/events/ipcList.ts @@ -340,13 +340,6 @@ export default { settingWindow.webContents.reloadIgnoringCache() }) - // from mini window - ipcMain.on('syncPicBed', () => { - if (windowManager.has(IWindowList.SETTING_WINDOW)) { - windowManager.get(IWindowList.SETTING_WINDOW)!.webContents.send('syncPicBed') - } - }) - ipcMain.on(GET_PICBEDS, (evt: IpcMainEvent) => { const picBeds = getPicBeds() evt.sender.send(GET_PICBEDS, picBeds) diff --git a/src/renderer/layouts/Main.vue b/src/renderer/layouts/Main.vue index 075be33..4a0de1d 100644 --- a/src/renderer/layouts/Main.vue +++ b/src/renderer/layouts/Main.vue @@ -48,8 +48,8 @@ = ref([]) const isAlwaysOnTop = ref(false) const keepAlivePages = $router.getRoutes().filter(item => item.meta.keepAlive).map(item => item.name as string) -const progressShow = ref(false) -const progressPercentage = ref(0) +const isShowprogress = ref(false) +const progress = ref(0) onBeforeMount(() => { os.value = process.platform @@ -306,8 +306,8 @@ onBeforeMount(() => { qrcodeVisible.value = true }) ipcRenderer.on('updateProgress', (_event: IpcRendererEvent, data: { progress: number}) => { - progressShow.value = data.progress !== 100 && data.progress !== 0 - progressPercentage.value = data.progress + isShowprogress.value = data.progress !== 100 && data.progress !== 0 + progress.value = data.progress }) })