summaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/logger.ts8
-rw-r--r--client-web/source/protocol/crypto.ts2
2 files changed, 4 insertions, 6 deletions
diff --git a/client-web/source/logger.ts b/client-web/source/logger.ts
index f8fa0b3..23f2cf6 100644
--- a/client-web/source/logger.ts
+++ b/client-web/source/logger.ts
@@ -30,17 +30,17 @@ export function log(k: LogScope | LogDesc, message: string, ...data: unknown[])
if (logger_container) {
const e = document.createElement("p")
e.classList.add("logger-line")
- if (d.error) e.classList.add(".logger-error")
- if (d.warn) e.classList.add(".logger-warn")
+ if (d.error) e.classList.add("logger-error")
+ else if (d.warn) e.classList.add("logger-warn")
+ else e.style.color = log_scope_color[d.scope]
e.textContent = `[${d.scope}] ${message}`
- if (!d.error && !d.warn) e.style.color = log_scope_color[d.scope]
logger_container.append(e)
setTimeout(() => {
e.classList.add("logger-line-disappear")
setTimeout(() => {
e.remove()
}, 1000 + 500)
- }, (d.error || d.warn) ? 60000 : 3000)
+ }, (d.error || d.warn) ? 20000 : 3000)
}
}
diff --git a/client-web/source/protocol/crypto.ts b/client-web/source/protocol/crypto.ts
index fb34e8d..742f22c 100644
--- a/client-web/source/protocol/crypto.ts
+++ b/client-web/source/protocol/crypto.ts
@@ -3,8 +3,6 @@ import { log } from "../logger.ts";
//! I am not a crypto expert at all! Please read carefully and report any issues to me.
export async function crypto_seeded_key(seed: string): Promise<CryptoKey> {
- if (seed.length < 8) log({ scope: "crypto", warn: true }, "Room name is very short. e2ee is insecure!")
-
log("crypto", "importing seed…")
const seed_key = await window.crypto.subtle.importKey(
"raw",