diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2026-08-01 16:12:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-01 16:12:05 -0400 |
| commit | e61d376237b56eee9383240bccd2dcbbd3a095a5 (patch) | |
| tree | 503c3d011dd8cf2cc2dbea73c38d03f840e8ccb8 /src | |
| parent | eb51ec80231cf13accf8af156fa7a4283e2a2f88 (diff) | |
| parent | 0b0a92b5568d474401bf3be50399b5e22284214b (diff) | |
| download | decky-lsfg-vk-e61d376237b56eee9383240bccd2dcbbd3a095a5.tar.gz decky-lsfg-vk-e61d376237b56eee9383240bccd2dcbbd3a095a5.zip | |
Merge pull request #245 from xXJSONDeruloXx/bundle-v2-flatpak-auto-updatefeat/lsfg-v2-release
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); } /** |
