summaryrefslogtreecommitdiff
path: root/src/components/NowPlayingTab.tsx
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 09:53:55 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-10 09:53:55 -0400
commite6efa4f0ff32d520982860180a29472068aab8e2 (patch)
tree62bddad9b84238c519bbe840cde36d5b78090e01 /src/components/NowPlayingTab.tsx
parent840ea2802551a786de9b59f7aa00f04c5f335e2a (diff)
downloaddecky-lsfg-vk-e6efa4f0ff32d520982860180a29472068aab8e2.tar.gz
decky-lsfg-vk-e6efa4f0ff32d520982860180a29472068aab8e2.zip
simplify unhooked game behavior on mount
Diffstat (limited to 'src/components/NowPlayingTab.tsx')
-rw-r--r--src/components/NowPlayingTab.tsx42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/components/NowPlayingTab.tsx b/src/components/NowPlayingTab.tsx
index 5bce5c4..57858db 100644
--- a/src/components/NowPlayingTab.tsx
+++ b/src/components/NowPlayingTab.tsx
@@ -11,7 +11,6 @@ interface Props {
fieldName: keyof ConfigurationData,
value: boolean | number | string | string[],
) => Promise<void>;
- onEnable: (appid: string) => Promise<boolean>;
onRepair: (appid: string) => Promise<boolean>;
}
@@ -24,25 +23,13 @@ export function NowPlayingTab({
game,
config,
onConfigChange,
- onEnable,
onRepair,
}: Props) {
const [busy, setBusy] = useState(false);
const supportNeedsRepair =
- game.configured &&
game.transport.kind === "flatpak" &&
game.flatpakSupport?.support_status !== "ready";
- const handleEnable = async () => {
- if (busy) return;
- setBusy(true);
- try {
- await onEnable(game.appid);
- } finally {
- setBusy(false);
- }
- };
-
const handleRepair = async () => {
if (busy) return;
setBusy(true);
@@ -60,22 +47,7 @@ export function NowPlayingTab({
<Field label={game.name} description={targetDescription(game)} />
</PanelSectionRow>
</PanelSection>
- {!game.configured && (
- <PanelSection>
- <PanelSectionRow>
- <Field
- label="LSFG-VK is available"
- description="This target is not enabled yet. Create its AppID profile before the next launch."
- />
- </PanelSectionRow>
- <PanelSectionRow>
- <ButtonItem layout="below" disabled={busy} onClick={() => void handleEnable()}>
- {busy ? "Enabling..." : "Enable LSFG-VK"}
- </ButtonItem>
- </PanelSectionRow>
- </PanelSection>
- )}
- {game.configured && supportNeedsRepair && (
+ {supportNeedsRepair && (
<PanelSection>
<PanelSectionRow>
<Field
@@ -90,13 +62,11 @@ export function NowPlayingTab({
</PanelSectionRow>
</PanelSection>
)}
- {game.configured && (
- <GameConfigurationControls
- config={config}
- onConfigChange={onConfigChange}
- showWorkarounds={false}
- />
- )}
+ <GameConfigurationControls
+ config={config}
+ onConfigChange={onConfigChange}
+ showWorkarounds={false}
+ />
</Focusable>
);
}