summaryrefslogtreecommitdiff
path: root/src/components/NowPlayingTab.tsx
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-06 22:04:54 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-06 22:04:54 -0400
commit7bc5f685186b1ff03ce0f7c99e7bec411beabaeb (patch)
treecf94a5752af7f45f6d4a87e89546705f32096766 /src/components/NowPlayingTab.tsx
parent170d183fdafc1ec1a686c006fd6a2431c1f30c71 (diff)
downloaddecky-lsfg-vk-7bc5f685186b1ff03ce0f7c99e7bec411beabaeb.tar.gz
decky-lsfg-vk-7bc5f685186b1ff03ce0f7c99e7bec411beabaeb.zip
feat: make ui suck less, frfr
Diffstat (limited to 'src/components/NowPlayingTab.tsx')
-rw-r--r--src/components/NowPlayingTab.tsx32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/components/NowPlayingTab.tsx b/src/components/NowPlayingTab.tsx
new file mode 100644
index 0000000..956db4a
--- /dev/null
+++ b/src/components/NowPlayingTab.tsx
@@ -0,0 +1,32 @@
+import { ButtonItem, Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui";
+import { ConfigurationData } from "../config/configSchema";
+import { GameTarget } from "../hooks/useGameConfiguration";
+import { GameConfigurationControls } from "./GameConfigurationControls";
+
+interface Props {
+ game: GameTarget;
+ config: ConfigurationData;
+ onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string | string[]) => Promise<void>;
+ onRemove: () => Promise<void>;
+}
+
+export function NowPlayingTab({ game, config, onConfigChange, onRemove }: Props) {
+ return (
+ <Focusable>
+ <PanelSection title="Now Playing">
+ <PanelSectionRow>
+ <Field
+ label={game.name}
+ description={`${game.nonSteam ? "Non-Steam" : "Steam"} · App ID ${game.appid} · Profile active`}
+ />
+ </PanelSectionRow>
+ </PanelSection>
+ <GameConfigurationControls config={config} onConfigChange={onConfigChange} />
+ <PanelSectionRow>
+ <ButtonItem layout="below" onClick={() => void onRemove()}>
+ Remove profile
+ </ButtonItem>
+ </PanelSectionRow>
+ </Focusable>
+ );
+}