summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-07 20:57:26 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-07 20:57:26 -0400
commit54acc36f16e1336772354f979a618cce65061f82 (patch)
tree9aae51351de2468277b3392b984e5caa99c271b4 /src
parente21eee83fc58fee3481aa0e17feb7cd9a8d8750e (diff)
downloaddecky-lsfg-vk-54acc36f16e1336772354f979a618cce65061f82.tar.gz
decky-lsfg-vk-54acc36f16e1336772354f979a618cce65061f82.zip
refactor: make runtime installation explicit
Diffstat (limited to 'src')
-rw-r--r--src/components/ConfigurationTab.tsx11
-rw-r--r--src/i18n/i18n.ts25
2 files changed, 23 insertions, 13 deletions
diff --git a/src/components/ConfigurationTab.tsx b/src/components/ConfigurationTab.tsx
index 2175eb9..b3c0281 100644
--- a/src/components/ConfigurationTab.tsx
+++ b/src/components/ConfigurationTab.tsx
@@ -1,5 +1,6 @@
-import { ButtonItem, Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui";
+import { ButtonItem, DialogButton, Field, Focusable, PanelSection, PanelSectionRow } from "@decky/ui";
import { useCallback, useEffect, useRef, useState } from "react";
+import { FaArrowLeft } from "react-icons/fa";
import { RiArrowDownSFill, RiArrowUpSFill } from "react-icons/ri";
import { ConfigurationData } from "../config/configSchema";
import { GameTarget } from "../hooks/useGameConfiguration";
@@ -116,7 +117,13 @@ export function ConfigurationTab({
)}
<PanelSectionRow>
<Focusable ref={backToGamesRef} noFocusRing>
- <ButtonItem layout="below" onClick={closeDetails}>Back to games</ButtonItem>
+ <DialogButton
+ aria-label="Back to games"
+ onClick={closeDetails}
+ style={{ width: "48px", minWidth: "48px", height: "48px", padding: "10px" }}
+ >
+ <FaArrowLeft />
+ </DialogButton>
</Focusable>
</PanelSectionRow>
</PanelSection>
diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts
index dc8de8b..31a55cb 100644
--- a/src/i18n/i18n.ts
+++ b/src/i18n/i18n.ts
@@ -2,8 +2,16 @@
// to generate for localhost/dev, run `build_i18n_json.sh` script
import * as languages from "./languages.json";
-const steamLanguageMap: Record<string, string> =
- languages.steam_language_map as Record<string, string>;
+type LanguageStrings = Record<string, string>;
+type Language = { name: string; strings?: LanguageStrings };
+type LanguageData = {
+ language_metadata: Record<string, Language>;
+ steam_language_map: Record<string, string>;
+ [language: string]: LanguageStrings | Record<string, Language> | Record<string, string>;
+};
+
+const languageData = languages as unknown as LanguageData;
+const steamLanguageMap = languageData.steam_language_map;
const normalizeLanguage = (language: string): string => {
const normalized = language.trim().toLowerCase();
@@ -11,13 +19,13 @@ const normalizeLanguage = (language: string): string => {
};
function getLangs() {
- const langs = languages.language_metadata;
+ const langs = languageData.language_metadata;
- Object.keys(languages).map((lang) => {
+ Object.keys(languageData).forEach((lang) => {
if (lang === "language_metadata" || lang == "steam_language_map") {
return;
}
- const strs = languages[lang];
+ const strs = languageData[lang] as LanguageStrings;
if (lang && strs && langs[lang]?.name) {
langs[lang].strings = strs;
}
@@ -27,12 +35,7 @@ function getLangs() {
}
export const LANGS: {
- [key: string]: {
- name: string;
- strings: {
- [key: string]: string;
- };
- };
+ [key: string]: Language;
} = getLangs();
let cachedLang: string | undefined;