summaryrefslogtreecommitdiff
path: root/src/components/ConfigurationTab.tsx
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-06 17:09:54 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-06 17:09:54 -0400
commitc9be32287ad5b72fcd86b10fa726d09dbd97d7fd (patch)
tree1b859f7fe04dfe2e2a6a4fb55945b7cf2cc367e9 /src/components/ConfigurationTab.tsx
parent8cf9d66b05bae5d58e72b0cb7d2b83ef13a86141 (diff)
downloaddecky-lsfg-vk-c9be32287ad5b72fcd86b10fa726d09dbd97d7fd.tar.gz
decky-lsfg-vk-c9be32287ad5b72fcd86b10fa726d09dbd97d7fd.zip
refactor: organize plugin into native tabs
Diffstat (limited to 'src/components/ConfigurationTab.tsx')
-rw-r--r--src/components/ConfigurationTab.tsx54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/components/ConfigurationTab.tsx b/src/components/ConfigurationTab.tsx
new file mode 100644
index 0000000..6f3f474
--- /dev/null
+++ b/src/components/ConfigurationTab.tsx
@@ -0,0 +1,54 @@
+import { PanelSection } from "@decky/ui";
+import { ConfigurationData } from "../config/configSchema";
+import { GameTarget } from "../hooks/useGameConfiguration";
+import { ConfigurationSection } from "./ConfigurationSection";
+import { FgmodClipboardButton } from "./FgmodClipboardButton";
+import { FpsMultiplierControl } from "./FpsMultiplierControl";
+import { GameConfigurationSelector } from "./GameConfigurationSelector";
+import t from "../i18n/i18n";
+
+interface ConfigurationTabProps {
+ config: ConfigurationData;
+ targets: GameTarget[];
+ runningGame: GameTarget | null;
+ selectedAppId: string;
+ onSelect: (appid: string) => void;
+ onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string | string[]) => Promise<void>;
+ onReset: () => Promise<void>;
+ onResetAll: () => Promise<void>;
+}
+
+export function ConfigurationTab({
+ config,
+ targets,
+ runningGame,
+ selectedAppId,
+ onSelect,
+ onConfigChange,
+ onReset,
+ onResetAll,
+}: ConfigurationTabProps) {
+ return (
+ <>
+ <PanelSection title={t("CONTENT_FPS_MULTIPLIER", "FPS Multiplier")}>
+ <FpsMultiplierControl config={config} onConfigChange={onConfigChange} />
+ </PanelSection>
+ <PanelSection title="Game Profile">
+ <GameConfigurationSelector
+ targets={targets}
+ runningGame={runningGame}
+ selectedAppId={selectedAppId}
+ onSelect={onSelect}
+ onReset={onReset}
+ onResetAll={onResetAll}
+ />
+ </PanelSection>
+ <PanelSection title="Options">
+ <ConfigurationSection config={config} onConfigChange={onConfigChange} />
+ </PanelSection>
+ <PanelSection>
+ <FgmodClipboardButton />
+ </PanelSection>
+ </>
+ );
+}