From 840ea2802551a786de9b59f7aa00f04c5f335e2a Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 10 Sep 2026 07:57:03 -0400 Subject: fix: keep Flatpak runtime controls simple --- src/components/Content.tsx | 1 - src/components/SetupTab.tsx | 26 +++++++++----------------- 2 files changed, 9 insertions(+), 18 deletions(-) (limited to 'src') 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(null); - const [advanced, setAdvanced] = useState(false); const [operation, setOperation] = useState(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 ( - + - - setAdvanced((value) => !value)}> - {advanced ? "Hide runtime details" : "Show runtime details"} - - - {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) { - + ); } -- cgit v1.2.3