diff options
-rw-r--r-- | client-web/source/preferences/decl.ts | 2 | ||||
-rw-r--r-- | client-web/source/preferences/mod.ts | 1 | ||||
-rw-r--r-- | client-web/source/preferences/ui.ts | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts index 0d82bd2..cb46f3f 100644 --- a/client-web/source/preferences/decl.ts +++ b/client-web/source/preferences/decl.ts @@ -11,7 +11,7 @@ const optional = <T>(a: T): T | undefined => a export const PREF_DECLS = { username: { type: string, default: "guest-" + hex_id(), description: "Username" }, - warn_redirect: { type: bool, default: false, description: "Interal option that is set by a server redirect." }, + warn_redirect: { type: bool, hidden: true, default: false, description: "Internal option that is set by a server redirect." }, image_view_popup: { type: bool, default: true, description: "Open image in popup instead of new tab" }, /* MEDIA */ diff --git a/client-web/source/preferences/mod.ts b/client-web/source/preferences/mod.ts index d1f3635..4a2d8b9 100644 --- a/client-web/source/preferences/mod.ts +++ b/client-web/source/preferences/mod.ts @@ -8,6 +8,7 @@ export interface PrefDecl<T> { description?: string, possible_values?: T[] optional?: boolean, + hidden?: boolean } type Type = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; diff --git a/client-web/source/preferences/ui.ts b/client-web/source/preferences/ui.ts index 4b0832a..72d7792 100644 --- a/client-web/source/preferences/ui.ts +++ b/client-web/source/preferences/ui.ts @@ -6,7 +6,7 @@ export class PrefUi extends OverlayUi { constructor() { console.log(PREFS); - const rows = Object.entries(PREF_DECLS as Record<string, PrefDecl<unknown>>).map(([key_, decl]) => { + const rows = Object.entries(PREF_DECLS as Record<string, PrefDecl<unknown>>).filter(e => !e[1].hidden).map(([key_, decl]) => { const key = key_ as keyof typeof PREF_DECLS const id = `pref-${key}` let prim_control: HTMLInputElement | HTMLSelectElement | undefined; |