summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorxXJsonDeruloXx <danielhimebauch@gmail.com>2026-08-01 16:54:06 -0400
committerxXJsonDeruloXx <danielhimebauch@gmail.com>2026-08-01 16:54:06 -0400
commit45cd2d4ef7bf38ecd8d1d57c4170b9dbaa912c8c (patch)
tree10c2943a8d52b079245c4c872c2a6c00b307b68b /src/components
parent0b0a92b5568d474401bf3be50399b5e22284214b (diff)
downloaddecky-lsfg-vk-45cd2d4ef7bf38ecd8d1d57c4170b9dbaa912c8c.tar.gz
decky-lsfg-vk-45cd2d4ef7bf38ecd8d1d57c4170b9dbaa912c8c.zip
fix: harden v2 migration and Flatpak updatesbundle-v2-flatpak-auto-update
Diffstat (limited to 'src/components')
-rw-r--r--src/components/InstallationButton.tsx58
1 files changed, 36 insertions, 22 deletions
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 (
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
- <div>Installing...</div>
+ <div>{isInstalled ? "Updating..." : "Installing..."}</div>
</div>
);
}
+ return (
+ <div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
+ <FaDownload />
+ <div>{isInstalled ? "Update LSFG-VK" : "Install / Update LSFG-VK"}</div>
+ </div>
+ );
+ };
+
+ const renderUninstallButtonContent = () => {
if (isUninstalling) {
return (
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
@@ -33,32 +42,37 @@ export function InstallationButton({
);
}
- if (isInstalled) {
- return (
- <div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
- <FaTrash />
- <div>Uninstall LSFG-VK</div>
- </div>
- );
- }
-
return (
<div style={{ display: "flex", alignItems: "center", gap: "8px" }}>
- <FaDownload />
- <div>Install / Update LSFG-VK</div>
+ <FaTrash />
+ <div>Uninstall LSFG-VK</div>
</div>
);
};
return (
- <PanelSectionRow>
- <ButtonItem
- layout="below"
- onClick={isInstalled ? onUninstall : onInstall}
- disabled={isInstalling || isUninstalling}
- >
- {renderButtonContent()}
- </ButtonItem>
- </PanelSectionRow>
+ <>
+ <PanelSectionRow>
+ <ButtonItem
+ layout="below"
+ onClick={onInstall}
+ disabled={isInstalling || isUninstalling}
+ >
+ {renderInstallButtonContent()}
+ </ButtonItem>
+ </PanelSectionRow>
+
+ {isInstalled && (
+ <PanelSectionRow>
+ <ButtonItem
+ layout="below"
+ onClick={onUninstall}
+ disabled={isInstalling || isUninstalling}
+ >
+ {renderUninstallButtonContent()}
+ </ButtonItem>
+ </PanelSectionRow>
+ )}
+ </>
);
}