rename NEED_WARMING_UP_DEPENDENCIES to NEED_RESETUP_DEPENDENCIES

This commit is contained in:
bossgeekgo
2024-02-15 22:45:54 +08:00
parent 15369014e9
commit 962e47486f
5 changed files with 6 additions and 10 deletions
@@ -11,7 +11,7 @@ export const checkAndDownloadDependenciesForInit = async () => {
pipe?.write( pipe?.write(
JSON.stringify({ JSON.stringify({
type: 'NEED_WARMING_UP_DEPENDENCIES' type: 'NEED_RESETUP_DEPENDENCIES'
}) + '\r\n' }) + '\r\n'
) )
@@ -68,7 +68,7 @@ export const runAutoChat = async () => {
(raw) => { (raw) => {
const data = raw const data = raw
switch (data.type) { switch (data.type) {
case 'NEED_WARMING_UP_DEPENDENCIES': { case 'NEED_RESETUP_DEPENDENCIES': {
pipe?.write(JSON.stringify(data) + '\r\n') pipe?.write(JSON.stringify(data) + '\r\n')
break break
} }
+2 -2
View File
@@ -112,8 +112,8 @@ export function createMainWindow(): void {
resolve(data) resolve(data)
break break
} }
case 'NEED_WARMING_UP_DEPENDENCIES': { case 'NEED_RESETUP_DEPENDENCIES': {
mainWindow.webContents.send('NEED_WARMING_UP_DEPENDENCIES', data) mainWindow.webContents.send('NEED_RESETUP_DEPENDENCIES', data)
break break
} }
case 'PUPPETEER_DOWNLOAD_PROGRESS': { case 'PUPPETEER_DOWNLOAD_PROGRESS': {
@@ -1,7 +1,3 @@
import { log } from 'console';
import { onUnmounted } from 'vue';
<template> <template>
<el-dialog v-bind="$attrs" @open="percentage = 0"> <el-dialog v-bind="$attrs" @open="percentage = 0">
<el-progress :percentage="percentage" :format="(n) => `${n.toFixed(1)}%`" /> <el-progress :percentage="percentage" :format="(n) => `${n.toFixed(1)}%`" />
@@ -123,9 +123,9 @@ const shouldShowDependenciesWarmingUpDialog = ref(false)
const needWarmingUpDenpendenciesHandler = () => { const needWarmingUpDenpendenciesHandler = () => {
shouldShowDependenciesWarmingUpDialog.value = true shouldShowDependenciesWarmingUpDialog.value = true
} }
electron.ipcRenderer.on('NEED_WARMING_UP_DEPENDENCIES', needWarmingUpDenpendenciesHandler) electron.ipcRenderer.on('NEED_CONFIGURATE_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
onUnmounted( onUnmounted(
() => electron.ipcRenderer.off('NEED_WARMING_UP_DEPENDENCIES', needWarmingUpDenpendenciesHandler) () => electron.ipcRenderer.off('NEED_RESETUP_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
) )
</script> </script>