diff options
author | metamuffin <metamuffin@disroot.org> | 2022-09-11 09:23:44 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2022-09-11 09:23:44 +0200 |
commit | a47a937c8058eb88d95ff4a006d159ae63b08e9e (patch) | |
tree | 7f60d5817a36da74cdfd13cd5f8fcfc7728ed942 /client-web/source/preferences | |
parent | 12af75951dc26d99273596dfaa8ead84c1ab4c67 (diff) | |
download | keks-meet-a47a937c8058eb88d95ff4a006d159ae63b08e9e.tar keks-meet-a47a937c8058eb88d95ff4a006d159ae63b08e9e.tar.bz2 keks-meet-a47a937c8058eb88d95ff4a006d159ae63b08e9e.tar.zst |
hide "warn_redirect"
Diffstat (limited to 'client-web/source/preferences')
-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; |