feat: disabling button when installing

This commit is contained in:
Chubby Granny Chaser
2025-04-06 23:04:01 +01:00
parent 21535d8acc
commit a35dae3e18

View File

@@ -13,6 +13,7 @@ import { orderBy } from "lodash-es";
import { settingsContext } from "@renderer/context"; import { settingsContext } from "@renderer/context";
import "./settings-general.scss"; import "./settings-general.scss";
import { DesktopDownloadIcon } from "@primer/octicons-react"; import { DesktopDownloadIcon } from "@primer/octicons-react";
import { logger } from "@renderer/logger";
interface LanguageOption { interface LanguageOption {
option: string; option: string;
@@ -150,7 +151,8 @@ export function SettingsGeneral() {
setInstallingCommonRedist(true); setInstallingCommonRedist(true);
try { try {
await window.electron.installCommonRedist(); await window.electron.installCommonRedist();
} finally { } catch (err) {
logger.error(err);
setInstallingCommonRedist(false); setInstallingCommonRedist(false);
} }
}; };