From 1b3f3b31108158d2cb374dd881022d63382adc4a Mon Sep 17 00:00:00 2001 From: sokol Date: Fri, 20 Feb 2026 10:16:28 +0300 Subject: [PATCH] feat: disable Download button when no config is loaded --- src/componets/FileChooser.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/componets/FileChooser.tsx b/src/componets/FileChooser.tsx index 00ed77a..b2fa6a6 100644 --- a/src/componets/FileChooser.tsx +++ b/src/componets/FileChooser.tsx @@ -60,6 +60,8 @@ export function FileChooser({ onSelected, config }: FileChooserProps) { URL.revokeObjectURL(url); } + const hasConfig = !!config; + return (
@@ -89,8 +91,8 @@ export function FileChooser({ onSelected, config }: FileChooserProps) { onClick={handleDownload} icon={Download} size="sm" - disabled={!config} - title="Download full config template" + disabled={!hasConfig} + title={hasConfig ? 'Download full config template' : 'Load or create a config first'} > Download