aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client-web/source/index.ts16
-rw-r--r--client-web/source/preferences/decl.ts6
-rw-r--r--client-web/source/protocol/mod.ts1
-rw-r--r--config/client.example.toml16
-rw-r--r--server/src/config.rs8
5 files changed, 37 insertions, 10 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index 4590625..83f1dfc 100644
--- a/client-web/source/index.ts
+++ b/client-web/source/index.ts
@@ -18,7 +18,13 @@ export const VERSION = "0.1.12"
export const ROOM_CONTAINER = esection({ class: "room", aria_label: "user list" })
export interface ClientConfig {
- appearance: { accent: string }
+ appearance?: {
+ accent: string
+ accent_dark: string
+ accent_light: string
+ background: string
+ background_dark: string
+ }
webrtc: {
stun: string,
turn?: string,
@@ -73,6 +79,14 @@ export async function main() {
username: config.webrtc.turn_user,
}]
}
+ if (config.appearance) {
+ document.body.style.setProperty("--ac", config.appearance.accent)
+ document.body.style.setProperty("--ac-dark", config.appearance.accent_dark)
+ document.body.style.setProperty("--ac-light", config.appearance.accent_light)
+ document.body.style.setProperty("--bg", config.appearance.background)
+ document.body.style.setProperty("--bg-dark", config.appearance.background_dark)
+
+ }
r = new Room(conn, rtc_config)
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts
index 68cb9ee..f3f8e84 100644
--- a/client-web/source/preferences/decl.ts
+++ b/client-web/source/preferences/decl.ts
@@ -18,13 +18,7 @@ export const PREF_DECLS = {
username: { type: string, default: "guest-" + hex_id(), description: "Username", 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" },
-
- // TODO!
- /* WEBRTC */
webrtc_debug: { type: bool, default: false, description: "Show additional information for WebRTC related stuff" },
- webrtc_stun: { type: string, default: "stun:meet.metamuffin.org:16900", description: "Custom STUN server (all participants must use the same server)" },
- webrtc_turn: { type: optional(string), default: "turn:meet.metamuffin.org:16900", description: "Custom TURN server (all participants must use the same server)" },
- webrtc_turn_cred: { type: optional(string), description: "TURN server credentials" },
/* MEDIA */
microphone_enabled: { type: bool, default: false, description: "Add one microphone track on startup" },
diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts
index 3674c08..6d49a17 100644
--- a/client-web/source/protocol/mod.ts
+++ b/client-web/source/protocol/mod.ts
@@ -33,7 +33,6 @@ export class SignalingConnection {
this.on_open()
r()
})
- log("ws", "connection opened")
return this
}
diff --git a/config/client.example.toml b/config/client.example.toml
new file mode 100644
index 0000000..39e942a
--- /dev/null
+++ b/config/client.example.toml
@@ -0,0 +1,16 @@
+
+[appearance]
+accent = "#5e3f84"
+accent_dark = "#2d0d52"
+accent_light = "#7c43bd"
+background = "#151315"
+background_dark = "#070707"
+
+# If you decide to host your own TURN server, adjust this.
+[webrtc]
+stun = "stun:meet.metamuffin.org:16900"
+# turn = "turn:meet.metamuffin.org:16900"
+## Set the default turn credentials.
+## If not provided, TURN is disabled by default and requires manual activation via password (TODO).
+# turn_user = "keksmeet"
+# turn_cred = "thatsmypassword"
diff --git a/server/src/config.rs b/server/src/config.rs
index 9d6213c..6dd380f 100644
--- a/server/src/config.rs
+++ b/server/src/config.rs
@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ClientConfig {
webrtc: ClientWebrtcConfig,
- appearance: ClientAppearanceConfig,
+ appearance: Option<ClientAppearanceConfig>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -16,5 +16,9 @@ pub struct ClientWebrtcConfig {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ClientAppearanceConfig {
- accent: Option<String>,
+ accent: String,
+ accent_light: String,
+ accent_dark: String,
+ background: String,
+ background_dark: String,
}