diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/lsfgApi.ts | 12 | ||||
| -rw-r--r-- | src/components/FlatpaksModal.tsx | 8 | ||||
| -rw-r--r-- | src/hooks/useInstallationActions.ts | 4 | ||||
| -rw-r--r-- | src/utils/toastUtils.ts | 4 |
4 files changed, 20 insertions, 8 deletions
diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts index 8378a7f..f112d39 100644 --- a/src/api/lsfgApi.ts +++ b/src/api/lsfgApi.ts @@ -7,6 +7,18 @@ export interface InstallationResult { error?: string; message?: string; removed_files?: string[]; + flatpak_update?: FlatpakMigrationResult; +} + +export interface FlatpakMigrationResult { + success: boolean; + message: string; + error?: string; + skipped?: boolean; + updated_versions: string[]; + failed_versions: Array<{ version: string; error: string }>; + migrated_apps: string[]; + failed_apps: Array<{ app_id: string; error: string }>; } export interface InstallationStatus { diff --git a/src/components/FlatpaksModal.tsx b/src/components/FlatpaksModal.tsx index 0ab715a..a6a0e85 100644 --- a/src/components/FlatpaksModal.tsx +++ b/src/components/FlatpaksModal.tsx @@ -175,7 +175,7 @@ export const FlatpaksModal: FC<FlatpaksModalProps> = ({ closeModal }) => { <PanelSectionRow> <Field label="Runtime 23.08" - description={extensionStatus.installed_23_08 ? "Installed (manual)" : "Manual installation only; use runtime 24.08 or 25.08 when possible"} + description={extensionStatus.installed_23_08 ? "Installed" : "Bundled asset ready to install"} icon={extensionStatus.installed_23_08 ? <FaCheck style={{color: 'green'}} /> : <FaTimes style={{color: 'red'}} />} > <ButtonItem @@ -194,7 +194,7 @@ export const FlatpaksModal: FC<FlatpaksModalProps> = ({ closeModal }) => { action(); } }} - disabled={!extensionStatus.installed_23_08 || operationInProgress === 'install-23.08' || operationInProgress === 'uninstall-23.08'} + disabled={operationInProgress === 'install-23.08' || operationInProgress === 'uninstall-23.08'} > {operationInProgress === 'install-23.08' || operationInProgress === 'uninstall-23.08' ? ( <Spinner /> @@ -215,7 +215,7 @@ export const FlatpaksModal: FC<FlatpaksModalProps> = ({ closeModal }) => { <PanelSectionRow> <Field label="Runtime 24.08" - description={extensionStatus.installed_24_08 ? "Installed" : "Not installed"} + description={extensionStatus.installed_24_08 ? "Installed" : "Bundled asset ready to install"} icon={extensionStatus.installed_24_08 ? <FaCheck style={{color: 'green'}} /> : <FaTimes style={{color: 'red'}} />} > <ButtonItem @@ -255,7 +255,7 @@ export const FlatpaksModal: FC<FlatpaksModalProps> = ({ closeModal }) => { <PanelSectionRow> <Field label="Runtime 25.08" - description={extensionStatus.installed_25_08 ? "Installed" : "Not installed"} + description={extensionStatus.installed_25_08 ? "Installed" : "Bundled asset ready to install"} icon={extensionStatus.installed_25_08 ? <FaCheck style={{color: 'green'}} /> : <FaTimes style={{color: 'red'}} />} > <ButtonItem diff --git a/src/hooks/useInstallationActions.ts b/src/hooks/useInstallationActions.ts index f184145..8a43257 100644 --- a/src/hooks/useInstallationActions.ts +++ b/src/hooks/useInstallationActions.ts @@ -23,8 +23,8 @@ export function useInstallationActions() { const result = await installLsfgVk(); if (result.success) { setIsInstalled(true); - setInstallationStatus("lsfg-vk installed"); - showInstallSuccessToast(); + setInstallationStatus(result.message || "lsfg-vk installed"); + showInstallSuccessToast(result.message); // Reload lsfg config after installation if (reloadConfig) { diff --git a/src/utils/toastUtils.ts b/src/utils/toastUtils.ts index dce0a59..198ec0e 100644 --- a/src/utils/toastUtils.ts +++ b/src/utils/toastUtils.ts @@ -75,8 +75,8 @@ export function showErrorToastWithMessage(title: string, error: unknown): void { /** * Show installation success toast */ -export function showInstallSuccessToast(): void { - showSuccessToast(ToastMessages.INSTALL_SUCCESS.title, ToastMessages.INSTALL_SUCCESS.body); +export function showInstallSuccessToast(body?: string): void { + showSuccessToast(ToastMessages.INSTALL_SUCCESS.title, body || ToastMessages.INSTALL_SUCCESS.body); } /** |
