From 45cd2d4ef7bf38ecd8d1d57c4170b9dbaa912c8c Mon Sep 17 00:00:00 2001 From: xXJsonDeruloXx Date: Sat, 1 Aug 2026 16:54:06 -0400 Subject: fix: harden v2 migration and Flatpak updates --- src/api/lsfgApi.ts | 2 ++ src/components/InstallationButton.tsx | 58 ++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts index f112d39..07f4b72 100644 --- a/src/api/lsfgApi.ts +++ b/src/api/lsfgApi.ts @@ -17,6 +17,8 @@ export interface FlatpakMigrationResult { skipped?: boolean; updated_versions: string[]; failed_versions: Array<{ version: string; error: string }>; + rolled_back_versions: string[]; + rollback_failed_versions: Array<{ version: string; error: string }>; migrated_apps: string[]; failed_apps: Array<{ app_id: string; error: string }>; } diff --git a/src/components/InstallationButton.tsx b/src/components/InstallationButton.tsx index 40ba955..de7d454 100644 --- a/src/components/InstallationButton.tsx +++ b/src/components/InstallationButton.tsx @@ -16,15 +16,24 @@ export function InstallationButton({ onInstall, onUninstall }: InstallationButtonProps) { - const renderButtonContent = () => { + const renderInstallButtonContent = () => { if (isInstalling) { return (
-
Installing...
+
{isInstalled ? "Updating..." : "Installing..."}
); } + return ( +
+ +
{isInstalled ? "Update LSFG-VK" : "Install / Update LSFG-VK"}
+
+ ); + }; + + const renderUninstallButtonContent = () => { if (isUninstalling) { return (
@@ -33,32 +42,37 @@ export function InstallationButton({ ); } - if (isInstalled) { - return ( -
- -
Uninstall LSFG-VK
-
- ); - } - return (
- -
Install / Update LSFG-VK
+ +
Uninstall LSFG-VK
); }; return ( - - - {renderButtonContent()} - - + <> + + + {renderInstallButtonContent()} + + + + {isInstalled && ( + + + {renderUninstallButtonContent()} + + + )} + ); } -- cgit v1.2.3