diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-10 16:26:17 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2026-09-10 16:26:17 -0400 |
| commit | 485ebb748185391e28764f48c39322b3cbdac65c (patch) | |
| tree | 9b03047ed842e14d9c800bcdfa16cad322733cf4 /src/components/NowPlayingTab.tsx | |
| parent | de74f0d2499159ed1cf8f628a166302146ae1f13 (diff) | |
| download | decky-lsfg-vk-v2-flatpakless.tar.gz decky-lsfg-vk-v2-flatpakless.zip | |
refactor: remove Flatpak supportv2-flatpakless
Diffstat (limited to 'src/components/NowPlayingTab.tsx')
| -rw-r--r-- | src/components/NowPlayingTab.tsx | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/components/NowPlayingTab.tsx b/src/components/NowPlayingTab.tsx index 57858db..c067dc0 100644 --- a/src/components/NowPlayingTab.tsx +++ b/src/components/NowPlayingTab.tsx @@ -1,5 +1,4 @@ -import { ButtonItem, Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui"; -import { useState } from "react"; +import { Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui"; import { ConfigurationData } from "../config/configSchema"; import { GameTarget } from "../hooks/useGameConfiguration"; import { GameConfigurationControls } from "./GameConfigurationControls"; @@ -11,11 +10,9 @@ interface Props { fieldName: keyof ConfigurationData, value: boolean | number | string | string[], ) => Promise<void>; - onRepair: (appid: string) => Promise<boolean>; } function targetDescription(game: GameTarget): string { - if (game.transport.kind === "flatpak") return "Non-Steam ยท Flatpak"; return game.nonSteam ? "Non-Steam" : "Steam"; } @@ -23,23 +20,7 @@ export function NowPlayingTab({ game, config, onConfigChange, - onRepair, }: Props) { - const [busy, setBusy] = useState(false); - const supportNeedsRepair = - game.transport.kind === "flatpak" && - game.flatpakSupport?.support_status !== "ready"; - - const handleRepair = async () => { - if (busy) return; - setBusy(true); - try { - await onRepair(game.appid); - } finally { - setBusy(false); - } - }; - return ( <Focusable> <PanelSection title="Now Playing"> @@ -47,21 +28,6 @@ export function NowPlayingTab({ <Field label={game.name} description={targetDescription(game)} /> </PanelSectionRow> </PanelSection> - {supportNeedsRepair && ( - <PanelSection> - <PanelSectionRow> - <Field - label="Flatpak support needs repair" - description={game.flatpakSupport?.error || "The target runtime extension is not ready."} - /> - </PanelSectionRow> - <PanelSectionRow> - <ButtonItem layout="below" disabled={busy} onClick={() => void handleRepair()}> - {busy ? "Repairing..." : "Repair Flatpak support"} - </ButtonItem> - </PanelSectionRow> - </PanelSection> - )} <GameConfigurationControls config={config} onConfigChange={onConfigChange} |
