From 7d56ab318dfbc07ba51319ab823747752d4ea7a2 Mon Sep 17 00:00:00 2001 From: Renaud Heluin Date: Fri, 6 Sep 2024 17:47:56 +0200 Subject: [PATCH] fix: error update plugin --- src/main/handlers/Initalization.ts | 20 +++++++++++++++++++ .../initialization-error-alerts.tsx | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/handlers/Initalization.ts b/src/main/handlers/Initalization.ts index 481fe2a..eea8c04 100644 --- a/src/main/handlers/Initalization.ts +++ b/src/main/handlers/Initalization.ts @@ -338,6 +338,26 @@ export const initialization = async ( channels.INITIALIZATION_DATAS, pluginVersion ) + } else { + mainLog.log(`8.3 Plugin installation ...`) + const getPluginNormalInstallationReturned = + await initPluginNormalInstallation(event) + initializedDatas.initPluginNormalInstallation = + getPluginNormalInstallationReturned.result as boolean + mainLog.log(getPluginNormalInstallationReturned) + const normalPluginInstallation = new ConfigData( + 'plugin_installed' + ) + normalPluginInstallation.result = + initializedDatas.initPluginNormalInstallation + normalPluginInstallation.message = + initializedDatas.initPluginNormalInstallation + ? `Plugin installed` + : `Installation plugin failed` + getMainWindow().webContents.send( + channels.INITIALIZATION_DATAS, + normalPluginInstallation + ) } } else { // plugin not installed diff --git a/src/renderer/components/initialization-error-alerts.tsx b/src/renderer/components/initialization-error-alerts.tsx index f86fa14..699518a 100644 --- a/src/renderer/components/initialization-error-alerts.tsx +++ b/src/renderer/components/initialization-error-alerts.tsx @@ -58,7 +58,6 @@ export const InitErrorAlerts = ({ */ window.initialisationAPI.sendConfigDatasToFront( (configData: ConfigData) => { - frontLog.debug(`sendConfigDatasToFront`, configData) if (configData.error) { frontLog.error(configData) window.alert(