diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 16:09:11 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-08-16 16:09:11 -0400 |
| commit | b01f9510fa5c0885c320d5231a163cb70c1df515 (patch) | |
| tree | 93e71d27d71d84ab55b3caf4dbd91ec82a24fea8 | |
| parent | aaf9351b6f91b35d6e33b9d52d51cae6061c93bd (diff) | |
| download | decky-lsfg-vk-b01f9510fa5c0885c320d5231a163cb70c1df515.tar.gz decky-lsfg-vk-b01f9510fa5c0885c320d5231a163cb70c1df515.zip | |
fix focusable elements for new profile creation modal
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | src/components/ProfileManagement.tsx | 26 |
2 files changed, 21 insertions, 7 deletions
diff --git a/package.json b/package.json index 0356ee8..9751add 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-lossless-scaling-vk", - "version": "0.10.0", + "version": "0.10.1", "description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer", "type": "module", "scripts": { diff --git a/src/components/ProfileManagement.tsx b/src/components/ProfileManagement.tsx index 543609f..67f0645 100644 --- a/src/components/ProfileManagement.tsx +++ b/src/components/ProfileManagement.tsx @@ -10,7 +10,8 @@ import { DialogButton, ButtonItem, ModalRoot, - TextField + TextField, + Focusable } from "@decky/ui"; import { getProfiles, @@ -50,8 +51,10 @@ function TextInputModal({ const [value, setValue] = useState(defaultValue); const handleOK = () => { - onOK(value); - closeModal?.(); + if (value.trim()) { + onOK(value); + closeModal?.(); + } }; return ( @@ -74,14 +77,25 @@ function TextInputModal({ </Field> </div> - <div style={{ display: "flex", gap: "8px", justifyContent: "flex-end" }}> + <Focusable + style={{ + display: "flex", + justifyContent: "flex-end", + gap: "8px", + marginTop: "16px" + }} + flow-children="horizontal" + > <DialogButton onClick={closeModal}> {cancelText} </DialogButton> - <DialogButton onClick={handleOK} disabled={!value.trim()}> + <DialogButton + onClick={handleOK} + disabled={!value.trim()} + > {okText} </DialogButton> - </div> + </Focusable> </div> </ModalRoot> ); |
