diff --git a/plugins/decky-vault/src/components/session-form.tsx b/plugins/decky-vault/src/components/session-form.tsx index 1518a3f..05c69de 100644 --- a/plugins/decky-vault/src/components/session-form.tsx +++ b/plugins/decky-vault/src/components/session-form.tsx @@ -3,8 +3,8 @@ import { ButtonItem, PanelSection, PanelSectionRow, - Field, DropdownItem, + TextField, staticClasses, } from "@decky/ui" import { @@ -138,15 +138,12 @@ export default function SessionForm({ - - onUpdateSession({ upscalerVersion: e.target.value })} - placeholder="e.g. 2.4" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSession({ upscalerVersion: e.target.value })} + placeholder="e.g. 2.4" + /> @@ -171,39 +168,32 @@ export default function SessionForm({ - - onUpdateSession({ loadTimeSsd: e.target.value })} - placeholder="e.g. 12.5" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSession({ loadTimeSsd: e.target.value })} + placeholder="e.g. 12.5" + mustBeNumeric + /> - - onUpdateSession({ loadTimeSd: e.target.value })} - placeholder="e.g. 25.0" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSession({ loadTimeSd: e.target.value })} + placeholder="e.g. 25.0" + mustBeNumeric + /> - - onUpdateSession({ launchOptions: e.target.value })} - placeholder="e.g. mangohud %command%" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSession({ launchOptions: e.target.value })} + placeholder="e.g. mangohud %command%" + /> diff --git a/plugins/decky-vault/src/components/settings-panel.tsx b/plugins/decky-vault/src/components/settings-panel.tsx index 180e1d2..0886fd9 100644 --- a/plugins/decky-vault/src/components/settings-panel.tsx +++ b/plugins/decky-vault/src/components/settings-panel.tsx @@ -3,8 +3,8 @@ import { ButtonItem, PanelSection, PanelSectionRow, - Field, DropdownItem, + TextField, staticClasses, } from "@decky/ui" import { @@ -83,15 +83,13 @@ export default function SettingsPanel({ {/* ── API Key ─────────────────────────────────────────────── */} - - onUpdateSetting("apiKey", e.target.value)} - placeholder="dv_..." - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSetting("apiKey", e.target.value)} + placeholder="dv_..." + bIsPassword + /> @@ -127,27 +125,21 @@ export default function SettingsPanel({ {/* ── Export Path ─────────────────────────────────────────── */} - - onUpdateSetting("exportPath", e.target.value)} - placeholder="/home/deck/Downloads" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSetting("exportPath", e.target.value)} + placeholder="/home/deck/Downloads" + /> - - onUpdateSetting("baseUrl", e.target.value)} - placeholder="https://deckyvault.xyz" - style={{ width: "100%", padding: "4px 8px" }} - /> - + onUpdateSetting("baseUrl", e.target.value)} + placeholder="https://deckyvault.xyz" + /> diff --git a/plugins/decky-vault/src/index.tsx b/plugins/decky-vault/src/index.tsx index 3b9295b..9dc1561 100644 --- a/plugins/decky-vault/src/index.tsx +++ b/plugins/decky-vault/src/index.tsx @@ -1,8 +1,7 @@ -import { useState, useEffect, useRef } from "react" +import { useEffect, useRef } from "react" import { PanelSection, PanelSectionRow, - ButtonItem, staticClasses, } from "@decky/ui" import { @@ -37,7 +36,6 @@ function Content() { onGameStart, onGameStop, } = useSession() - const [activeTab, setActiveTab] = useState<"main" | "settings">("main") const gameStartedUnregRef = useRef<{ unregister: () => void } | null>(null) const gameStoppedUnregRef = useRef<{ unregister: () => void } | null>(null) @@ -144,46 +142,23 @@ function Content() { return ( <> - {/* ── Tab navigation ──────────────────────────────────────── */} - - - setActiveTab("main")} - > - {activeTab === "main" ? "▶ Record" : "Record"} - - - - setActiveTab("settings")} - > - {activeTab === "settings" ? "▶ Settings" : "Settings"} - - - - - {activeTab === "main" ? ( - - ) : ( - - )} + + ) }