summaryrefslogtreecommitdiff
path: root/client-web/source/preferences/decl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/preferences/decl.ts')
-rw-r--r--client-web/source/preferences/decl.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts
index 36ed1a1..a75f1d9 100644
--- a/client-web/source/preferences/decl.ts
+++ b/client-web/source/preferences/decl.ts
@@ -5,6 +5,8 @@
*/
// there should be no deps to dom APIs in this file for the tablegen to work
+import { LOCALES } from "../locale/mod.ts";
+
export function hex_id(len = 8): string {
if (len > 8) return hex_id() + hex_id(len - 8)
return Math.floor(Math.random() * 16 ** len).toString(16).padStart(len, "0")
@@ -16,6 +18,7 @@ const optional = <T>(a: T): T | undefined => a
export const PREF_DECLS = {
username: { type: string, default: "guest-" + hex_id(), description: "Username", allow_url: true },
+ language: { type: optional(string), possible_values: Object.keys(LOCALES), description: "Interface Language", allow_url: true },
warn_redirect: { type: bool, hidden: true, default: false, description: "Internal option that is set by a server redirect.", allow_url: true },
image_view_popup: { type: bool, default: true, description: "Open image in popup instead of new tab" },
webrtc_debug: { type: bool, default: false, description: "Show additional information for WebRTC related stuff" },
@@ -38,9 +41,9 @@ export const PREF_DECLS = {
optional_audio_default_enable: { type: bool, default: true, description: "Enable audio tracks by default" },
optional_video_default_enable: { type: bool, default: false, description: "Enable video tracks by default" },
- notify_chat: { type: bool, default: true, description: "Send notifications for incoming chat messages" },
- notify_join: { type: bool, default: true, description: "Send notifications when users join" },
- notify_leave: { type: bool, default: true, description: "Send notifications when users leave" },
+ notify_chat: { type: bool, default: true, description: "Send notifications for incoming chat messages", allow_url: true },
+ notify_join: { type: bool, default: true, description: "Send notifications when users join", allow_url: true },
+ notify_leave: { type: bool, default: true, description: "Send notifications when users leave", allow_url: true },
enable_onbeforeunload: { type: bool, default: true, description: "Prompt for confirmation when leaving the site while local resources are active" },
room_watches: { type: string, default: "[]", hidden: true, description: "Known rooms (as semicolon seperated list of name=secret pairs)" }