From 170d183fdafc1ec1a686c006fd6a2431c1f30c71 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Sun, 6 Sep 2026 19:06:52 -0400 Subject: refactor: align secondary tabs with Decky UI --- src/components/InstallationButton.tsx | 43 +++++++---------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) (limited to 'src/components/InstallationButton.tsx') diff --git a/src/components/InstallationButton.tsx b/src/components/InstallationButton.tsx index 7f0ac96..1bf10ac 100644 --- a/src/components/InstallationButton.tsx +++ b/src/components/InstallationButton.tsx @@ -1,5 +1,4 @@ import { ButtonItem, PanelSectionRow } from "@decky/ui"; -import { FaDownload, FaTrash } from "react-icons/fa"; import t from '../i18n/i18n'; interface InstallationButtonProps { @@ -17,39 +16,13 @@ export function InstallationButton({ onInstall, onUninstall }: InstallationButtonProps) { - const renderButtonContent = () => { - if (isInstalling) { - return ( -
-
{t('INSTALL_INSTALLING', 'Installing...')}
-
- ); - } - - if (isUninstalling) { - return ( -
-
{t('INSTALL_UNINSTALLING', 'Uninstalling...')}
-
- ); - } - - if (isInstalled) { - return ( -
- -
{t('INSTALL_UNINSTALL_BTN', 'Uninstall LSFG-VK')}
-
- ); - } - - return ( -
- -
{t('INSTALL_INSTALL_BTN', 'Install LSFG-VK')}
-
- ); - }; + const label = isInstalling + ? t('INSTALL_INSTALLING', 'Installing...') + : isUninstalling + ? t('INSTALL_UNINSTALLING', 'Uninstalling...') + : isInstalled + ? t('INSTALL_UNINSTALL_BTN', 'Uninstall LSFG-VK') + : t('INSTALL_INSTALL_BTN', 'Install LSFG-VK'); return ( @@ -58,7 +31,7 @@ export function InstallationButton({ onClick={isInstalled ? onUninstall : onInstall} disabled={isInstalling || isUninstalling} > - {renderButtonContent()} + {label} ); -- cgit v1.2.3