Main Menu UI Overhaul (#2829)

## Description:

Overhauls the Main Menu UI, visit https://menu.openfront.dev to see
everything.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

w.o.n
This commit is contained in:
Ryan
2026-01-10 04:26:34 +00:00
committed by GitHub
parent 848a3a5633
commit 5e6c90d9bb
60 changed files with 7671 additions and 4546 deletions
+13 -5
View File
@@ -176,13 +176,21 @@ export class InputHandler {
saved = Object.fromEntries(
Object.entries(parsed)
.map(([k, v]) => {
if (v && typeof v === "object" && "value" in (v as any)) {
return [k, (v as any).value as string];
// Extract value from nested object or plain string
let val: unknown;
if (v && typeof v === "object" && "value" in v) {
val = (v as { value: unknown }).value;
} else {
val = v;
}
if (typeof v === "string") return [k, v];
return [k, undefined];
// Map invalid values to undefined (filtered later)
if (typeof val !== "string" || val === "Null") {
return [k, undefined];
}
return [k, val];
})
.filter(([, v]) => typeof v === "string" && v !== "Null"),
.filter(([, v]) => typeof v === "string"),
) as Record<string, string>;
} catch (e) {
console.warn("Invalid keybinds JSON:", e);