From b892c93d7a3c452ef953ac57862bd90b0e6ca334 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 4 May 2024 22:48:06 +0200 Subject: [PATCH] Disable buttons while webUI updating --- src/components/util/VersionUpdateInfoDialog.tsx | 10 +++++++--- src/components/util/WebUIUpdateChecker.tsx | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/util/VersionUpdateInfoDialog.tsx b/src/components/util/VersionUpdateInfoDialog.tsx index c3e33f3e..c428cebf 100644 --- a/src/components/util/VersionUpdateInfoDialog.tsx +++ b/src/components/util/VersionUpdateInfoDialog.tsx @@ -24,6 +24,7 @@ interface BaseProps { actionTitle: string; updateCheckerProps: Parameters; changelogUrl?: string; + disabled?: boolean; } interface UrlActionProps extends BaseProps { @@ -45,6 +46,7 @@ export const VersionUpdateInfoDialog = ({ actionTitle, updateCheckerProps, changelogUrl, + disabled, }: VersionUpdateInfoDialogProps) => { const { t } = useTranslation(); @@ -71,7 +73,9 @@ export const VersionUpdateInfoDialog = ({ {(popupState) => ( <> - + { @@ -94,11 +98,11 @@ export const VersionUpdateInfoDialog = ({ )} {actionUrl ? ( - ) : ( - )} diff --git a/src/components/util/WebUIUpdateChecker.tsx b/src/components/util/WebUIUpdateChecker.tsx index 227634f9..5496e1f6 100644 --- a/src/components/util/WebUIUpdateChecker.tsx +++ b/src/components/util/WebUIUpdateChecker.tsx @@ -120,6 +120,7 @@ export const WebUIUpdateChecker = () => { version: webUIUpdateData?.checkForWebUIUpdate.tag, channel: webUIUpdateData?.checkForWebUIUpdate.channel, })} + disabled={isUpdateInProgress} onAction={() => requestManager .updateWebUI()