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

View File

@@ -11,7 +11,7 @@ export const checkAndDownloadDependenciesForInit = async () => {
pipe?.write(
JSON.stringify({
type: 'NEED_WARMING_UP_DEPENDENCIES'
type: 'NEED_RESETUP_DEPENDENCIES'
}) + '\r\n'
)

View File

@@ -68,7 +68,7 @@ export const runAutoChat = async () => {
(raw) => {
const data = raw
switch (data.type) {
case 'NEED_WARMING_UP_DEPENDENCIES': {
case 'NEED_RESETUP_DEPENDENCIES': {
pipe?.write(JSON.stringify(data) + '\r\n')
break
}

View File

@@ -112,8 +112,8 @@ export function createMainWindow(): void {
resolve(data)
break
}
case 'NEED_WARMING_UP_DEPENDENCIES': {
mainWindow.webContents.send('NEED_WARMING_UP_DEPENDENCIES', data)
case 'NEED_RESETUP_DEPENDENCIES': {
mainWindow.webContents.send('NEED_RESETUP_DEPENDENCIES', data)
break
}
case 'PUPPETEER_DOWNLOAD_PROGRESS': {

View File

@@ -1,7 +1,3 @@
import { log } from 'console';
import { onUnmounted } from 'vue';
<template>
<el-dialog v-bind="$attrs" @open="percentage = 0">
<el-progress :percentage="percentage" :format="(n) => `${n.toFixed(1)}%`" />

View File

@@ -123,9 +123,9 @@ const shouldShowDependenciesWarmingUpDialog = ref(false)
const needWarmingUpDenpendenciesHandler = () => {
shouldShowDependenciesWarmingUpDialog.value = true
}
electron.ipcRenderer.on('NEED_WARMING_UP_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
electron.ipcRenderer.on('NEED_CONFIGURATE_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
onUnmounted(
() => electron.ipcRenderer.off('NEED_WARMING_UP_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
() => electron.ipcRenderer.off('NEED_RESETUP_DEPENDENCIES', needWarmingUpDenpendenciesHandler)
)
</script>