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 From 450d3e5e6612d467a00bb937538fded640c66ecb Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Thu, 10 Sep 2026 07:24:05 -0400 Subject: refactor: simplify migration implementation --- src/components/InstallationButton.tsx | 38 ----------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/components/InstallationButton.tsx (limited to 'src/components/InstallationButton.tsx') diff --git a/src/components/InstallationButton.tsx b/src/components/InstallationButton.tsx deleted file mode 100644 index 1bf10ac..0000000 --- a/src/components/InstallationButton.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { ButtonItem, PanelSectionRow } from "@decky/ui"; -import t from '../i18n/i18n'; - -interface InstallationButtonProps { - isInstalled: boolean; - isInstalling: boolean; - isUninstalling: boolean; - onInstall: () => void; - onUninstall: () => void; -} - -export function InstallationButton({ - isInstalled, - isInstalling, - isUninstalling, - onInstall, - onUninstall -}: InstallationButtonProps) { - 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 ( - - - {label} - - - ); -} -- cgit v1.2.3