diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-10 07:57:03 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-10 07:57:03 -0400 |
| commit | 840ea2802551a786de9b59f7aa00f04c5f335e2a (patch) | |
| tree | 5af25f863e8a3043eca7949fbe35cc11252d3127 | |
| parent | 6a927e30f743fac0a5451381ceed7f1d83e94a37 (diff) | |
| download | decky-lsfg-vk-840ea2802551a786de9b59f7aa00f04c5f335e2a.tar.gz decky-lsfg-vk-840ea2802551a786de9b59f7aa00f04c5f335e2a.zip | |
fix: keep Flatpak runtime controls simple
| -rw-r--r-- | src/components/Content.tsx | 1 | ||||
| -rw-r--r-- | src/components/SetupTab.tsx | 26 |
2 files changed, 9 insertions, 18 deletions
diff --git a/src/components/Content.tsx b/src/components/Content.tsx index d92ef86..e5216ca 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -91,7 +91,6 @@ export function Content() { isUninstalling={isUninstalling} onInstall={() => void install()} onUninstall={() => void uninstall()} - flatpakRelevant={targets.some((target) => target.transport.kind === "flatpak")} /> ); diff --git a/src/components/SetupTab.tsx b/src/components/SetupTab.tsx index e936049..624be54 100644 --- a/src/components/SetupTab.tsx +++ b/src/components/SetupTab.tsx @@ -19,12 +19,10 @@ interface SetupTabProps { isUninstalling: boolean; onInstall: () => void; onUninstall: () => void; - flatpakRelevant: boolean; } -function FlatpakSupportDiagnostics({ relevant }: { relevant: boolean }) { +function FlatpakSupportDiagnostics() { const [status, setStatus] = useState<FlatpakExtensionStatus | null>(null); - const [advanced, setAdvanced] = useState(false); const [operation, setOperation] = useState<string | null>(null); const refresh = async () => { @@ -44,10 +42,10 @@ function FlatpakSupportDiagnostics({ relevant }: { relevant: boolean }) { }; useEffect(() => { - if (relevant) void refresh(); - }, [relevant]); + void refresh(); + }, []); - if (!relevant || !status?.available) return null; + if (!status?.available) return null; const setEnabled = async (branch: string, enabled: boolean) => { setOperation(`${enabled ? "enable" : "disable"}-${branch}`); @@ -63,19 +61,14 @@ function FlatpakSupportDiagnostics({ relevant }: { relevant: boolean }) { }; return ( - <PanelSection title="Flatpak support"> + <PanelSection title="Flatpak runtimes"> <PanelSectionRow> <Field - label="Runtime extension support" - description={status.message || "Flatpak is available for classified targets."} + label="LSFG-VK runtime extensions" + description={status.message || "Toggle a branch to install or uninstall it."} /> </PanelSectionRow> - <PanelSectionRow> - <ButtonItem layout="below" onClick={() => setAdvanced((value) => !value)}> - {advanced ? "Hide runtime details" : "Show runtime details"} - </ButtonItem> - </PanelSectionRow> - {advanced && status.supported_branches.map((branch) => { + {status.supported_branches.map((branch) => { const installed = status.installed_branches.includes(branch); const pending = operation?.endsWith(`-${branch}`); return ( @@ -105,7 +98,6 @@ export function SetupTab(props: SetupTabProps) { isUninstalling, onInstall, onUninstall, - flatpakRelevant, } = props; const losslessScalingAppInstalled = losslessScalingInstalled || steamBranchStatus?.installed === true; const buttonLabel = isInstalling @@ -146,7 +138,7 @@ export function SetupTab(props: SetupTabProps) { </ButtonItem> </PanelSectionRow> </PanelSection> - <FlatpakSupportDiagnostics relevant={flatpakRelevant} /> + <FlatpakSupportDiagnostics /> </> ); } |
