mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b11a7a73b8 | ||
|
|
b5e2ce3f7e | ||
|
|
e5cda8301d | ||
|
|
708ad72e59 | ||
|
|
85fa73c7d6 | ||
|
|
8a3e1c230e | ||
|
|
b50dc338df | ||
|
|
b40ada8cff | ||
|
|
fa2c68b622 | ||
|
|
54046d51fe | ||
|
|
9364a7d48a | ||
|
|
dab1a7637e | ||
|
|
a4da3409bc | ||
|
|
da985ef7d1 | ||
|
|
806de52382 | ||
|
|
d299343835 | ||
|
|
10ae24a99f | ||
|
|
ffb542d9bd | ||
|
|
e02a41d855 | ||
|
|
999262b6df | ||
|
|
9e61f21316 | ||
|
|
a720f72943 | ||
|
|
9a4639f76c | ||
|
|
bf6ab112ed |
No files matched your search
@@ -14,7 +14,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<b>A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and GreenTeaSpeak servers — no install, just open a tab.</b>
|
<b>A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and VoySpeak servers — no install, just open a tab.</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -31,6 +31,23 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 📑 Contents
|
||||||
|
|
||||||
|
- [Preview](#-preview)
|
||||||
|
- [Quick Start](#-quick-start)
|
||||||
|
- [Features](#-features)
|
||||||
|
- [Tech Stack](#-tech-stack)
|
||||||
|
- [Browser Support](#-browser-support)
|
||||||
|
- [Installation](#-installation)
|
||||||
|
- [Docker (recommended)](#-docker-recommended)
|
||||||
|
- [Account sync](#account-sync)
|
||||||
|
- [Environment variables](#environment-variables)
|
||||||
|
- [Auto-Connect Links](#-auto-connect-links)
|
||||||
|
- [Translating](#translating)
|
||||||
|
- [Credits](#credits)
|
||||||
|
- [In Memory of Akimo](#-in-memory-of-akimo)
|
||||||
|
- [Legal / Disclaimer](#legal--disclaimer)
|
||||||
|
|
||||||
## 📸 Preview
|
## 📸 Preview
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@@ -53,7 +70,7 @@ docker run -d --name webspeak3 --restart unless-stopped -p 8080:8080 moepchi/web
|
|||||||
```
|
```
|
||||||
|
|
||||||
Enter the address and port of **any reachable TeamSpeak 3, TeamSpeak 6,
|
Enter the address and port of **any reachable TeamSpeak 3, TeamSpeak 6,
|
||||||
TeaSpeak, or GreenTeaSpeak server** in the connection dialog. The server does
|
TeaSpeak, or VoySpeak server** in the connection dialog. The server does
|
||||||
not need to be installed on the same machine, modified, or operated by you.
|
not need to be installed on the same machine, modified, or operated by you.
|
||||||
|
|
||||||
> Voice requires a secure context. Microphone access works on `localhost`; for
|
> Voice requires a secure context. Microphone access works on `localhost`; for
|
||||||
@@ -63,7 +80,7 @@ not need to be installed on the same machine, modified, or operated by you.
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6, TeaSpeak, and GreenTeaSpeak servers over a WebSocket gateway — the server stays exactly as-is |
|
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6, TeaSpeak, and VoySpeak servers over a WebSocket gateway — the server stays exactly as-is |
|
||||||
| 🎙️ **Low-latency voice** | Opus-encoded voice with voice activation ("Sprachaktivierung") and adjustable sensitivity |
|
| 🎙️ **Low-latency voice** | Opus-encoded voice with voice activation ("Sprachaktivierung") and adjustable sensitivity |
|
||||||
| 🤫 **Whisper** | Target your voice at specific channels or clients instead of your whole current channel |
|
| 🤫 **Whisper** | Target your voice at specific channels or clients instead of your whole current channel |
|
||||||
| 🔊 **Custom audio output picker** | Route playback to any output device — works even in browsers without `AudioContext.setSinkId` |
|
| 🔊 **Custom audio output picker** | Route playback to any output device — works even in browsers without `AudioContext.setSinkId` |
|
||||||
@@ -80,10 +97,10 @@ not need to be installed on the same machine, modified, or operated by you.
|
|||||||
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
||||||
| 🌍 **Localized UI** | Interface available in German, English, Simplified Chinese, and Persian (Beta), detected automatically or switchable in Options |
|
| 🌍 **Localized UI** | Interface available in German, English, Simplified Chinese, and Persian (Beta), detected automatically or switchable in Options |
|
||||||
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
||||||
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
|
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like VoySpeak. Audio stays on the active tab |
|
||||||
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
|
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
|
||||||
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
|
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
|
||||||
| 🍵 **GreenTeaSpeak support** | Connects to real GreenTeaSpeak servers (not just TS3/TS6/TeaSpeak), plus an optional GTS-styled UI chrome (dark panels, gold menu bar, connection-tab strip) alongside the default look |
|
| 🍵 **VoySpeak support** | Connects to real VoySpeak servers (formerly GreenTeaSpeak), not just TS3/TS6/TeaSpeak |
|
||||||
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
|
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
|
||||||
|
|
||||||
## 🧱 Tech Stack
|
## 🧱 Tech Stack
|
||||||
@@ -108,19 +125,18 @@ gateway is required that speaks the real TS protocol on one side and
|
|||||||
WebSocket to the browser on the other.
|
WebSocket to the browser on the other.
|
||||||
|
|
||||||
```
|
```
|
||||||
Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Rust connector (connector/) <--TS3/TS6/TeaSpeak/GreenTeaSpeak protocol--> Server
|
Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Rust connector (connector/) <--TS3/TS6/TeaSpeak/VoySpeak protocol--> Server
|
||||||
```
|
```
|
||||||
|
|
||||||
- **`web/`** — Vite + React frontend. TS3-lookalike UI: channel tree, chat
|
- **`web/`** — Vite + React frontend. TS3-lookalike UI: channel tree, chat
|
||||||
tabs, voice controls. Optional GreenTeaSpeak-styled chrome for the
|
tabs, voice controls.
|
||||||
connection-tab strip and menu bar.
|
|
||||||
- **`gateway/`** — Node.js/TypeScript WebSocket server. Spawns the Rust
|
- **`gateway/`** — Node.js/TypeScript WebSocket server. Spawns the Rust
|
||||||
connector **per browser WebSocket** and relays newline-delimited JSON events
|
connector **per browser WebSocket** and relays newline-delimited JSON events
|
||||||
between it and the browser. Multi-join opens one `/ws` connection per server
|
between it and the browser. Multi-join opens one `/ws` connection per server
|
||||||
tab (parallel connectors).
|
tab (parallel connectors).
|
||||||
- **`connector/`** — Rust binary wrapping [`tsclientlib`](https://github.com/ReSpeak/tsclientlib)
|
- **`connector/`** — Rust binary wrapping [`tsclientlib`](https://github.com/ReSpeak/tsclientlib)
|
||||||
(vendored as a git submodule in `tsclientlib/`, currently tracking a fork
|
(vendored as a git submodule in `tsclientlib/`, currently tracking a fork
|
||||||
with TeaSpeak/GreenTeaSpeak protocol support), the actual TS3/TS6/TeaSpeak
|
with TeaSpeak/VoySpeak protocol support), the actual TS3/TS6/TeaSpeak
|
||||||
protocol implementation. Handles connecting, channel/client state, chat,
|
protocol implementation. Handles connecting, channel/client state, chat,
|
||||||
and Opus-encoded voice. Auto-detects the server dialect on connect (or it
|
and Opus-encoded voice. Auto-detects the server dialect on connect (or it
|
||||||
can be forced via `--server-type`).
|
can be forced via `--server-type`).
|
||||||
@@ -225,7 +241,7 @@ All optional; add them under `environment:` in your compose override next to `PO
|
|||||||
| `ALLOW_PRIVATE_TARGETS` | off | By default the gateway refuses to connect to private/internal addresses (loopback, `10.x`, `192.168.x`, CGNAT, link-local, …), no matter how they were reached (IP, DNS, SRV, TSDNS, nickname, file-transfer redirect), so it can't be abused to probe the network it runs in. **If your TeamSpeak server is on the same LAN as the gateway, set this to `1`.** |
|
| `ALLOW_PRIVATE_TARGETS` | off | By default the gateway refuses to connect to private/internal addresses (loopback, `10.x`, `192.168.x`, CGNAT, link-local, …), no matter how they were reached (IP, DNS, SRV, TSDNS, nickname, file-transfer redirect), so it can't be abused to probe the network it runs in. **If your TeamSpeak server is on the same LAN as the gateway, set this to `1`.** |
|
||||||
| `TURN_URLS` | unset | Comma-separated TURN URLs (e.g. `turn:turn.example.com:3478`) offered to browsers for screen streams, for viewers or publishers behind NATs where direct P2P fails. Pair with `TURN_SECRET` (coturn's `use-auth-secret`; each browser gets its own credential valid for 24 h) or with static `TURN_USERNAME` / `TURN_CREDENTIAL`, which every visitor can read. |
|
| `TURN_URLS` | unset | Comma-separated TURN URLs (e.g. `turn:turn.example.com:3478`) offered to browsers for screen streams, for viewers or publishers behind NATs where direct P2P fails. Pair with `TURN_SECRET` (coturn's `use-auth-secret`; each browser gets its own credential valid for 24 h) or with static `TURN_USERNAME` / `TURN_CREDENTIAL`, which every visitor can read. |
|
||||||
| `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. |
|
| `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. |
|
||||||
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `300` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
|
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `60` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
|
||||||
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
|
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
|
||||||
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
|
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
|
||||||
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
|
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
|
||||||
@@ -366,6 +382,15 @@ A share link (above) always takes priority over the baked-in default when both a
|
|||||||
|
|
||||||
Either way: on your own hosted instance, the mandatory first-visit Terms of Use is shown and accepted before anything auto-connects; and if the connection fails, the connect dialog opens prefilled so the visitor can fix it and retry by hand.
|
Either way: on your own hosted instance, the mandatory first-visit Terms of Use is shown and accepted before anything auto-connects; and if the connection fails, the connect dialog opens prefilled so the visitor can fix it and retry by hand.
|
||||||
|
|
||||||
|
<a id="translating"></a>
|
||||||
|
## 🌍 Translating
|
||||||
|
|
||||||
|
The UI texts live in flat JSON files in [`web/src/locales/`](web/src/locales/), one per language, with `en.json` as the reference. Untranslated keys fall back to English.
|
||||||
|
|
||||||
|
- **Fix or complete a language:** edit its file and open a pull request.
|
||||||
|
- **Add a new language:** copy `en.json` to `<code>.json` (for example `it.json`), translate the values and open a pull request. Leave the keys and placeholders like `{count}` as they are. I'll wire the language into the selector.
|
||||||
|
- **No GitHub account?** Send the file via the in-app feedback form or to feedback@webspeak3.de.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
The vast majority of this project's code was written by [Claude Code](https://claude.com/claude-code) (Anthropic's Claude), working iteratively with the repo owner one feature at a time.
|
The vast majority of this project's code was written by [Claude Code](https://claude.com/claude-code) (Anthropic's Claude), working iteratively with the repo owner one feature at a time.
|
||||||
@@ -399,8 +424,8 @@ any way officially connected with TeamSpeak Systems GmbH.
|
|||||||
|
|
||||||
"TeamSpeak", "TS3", and related logos or names are registered trademarks of
|
"TeamSpeak", "TS3", and related logos or names are registered trademarks of
|
||||||
TeamSpeak Systems GmbH. Likewise, WebSpeak3 is not affiliated with,
|
TeamSpeak Systems GmbH. Likewise, WebSpeak3 is not affiliated with,
|
||||||
associated with, authorized by, or endorsed by TeaSpeak or GreenTeaSpeak;
|
associated with, authorized by, or endorsed by TeaSpeak or VoySpeak (formerly GreenTeaSpeak);
|
||||||
"TeaSpeak" and "GreenTeaSpeak" are names of their respective projects/
|
"TeaSpeak" and "VoySpeak" are names of their respective projects/
|
||||||
operators. All product and company names are trademarks™ or registered®
|
operators. All product and company names are trademarks™ or registered®
|
||||||
trademarks of their respective holders. Use of them does not imply any
|
trademarks of their respective holders. Use of them does not imply any
|
||||||
affiliation with or endorsement by them.
|
affiliation with or endorsement by them.
|
||||||
@@ -872,7 +872,7 @@ async fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// GreenTeaSpeak servers report versions like `2.5.1 [Build: …]`.
|
/// VoySpeak (formerly GreenTeaSpeak) servers report versions like `2.5.1 [Build: …]`.
|
||||||
/// Classic TeaSpeak reports `TeaSpeak 1.4.21-beta [Build: …]` — not a GTS host.
|
/// Classic TeaSpeak reports `TeaSpeak 1.4.21-beta [Build: …]` — not a GTS host.
|
||||||
/// Classic TeamSpeak 3 reports `3.13.8 [Build: …]` — must not use GTS labels.
|
/// Classic TeamSpeak 3 reports `3.13.8 [Build: …]` — must not use GTS labels.
|
||||||
fn is_greenteaspeak_server_version(version: &str) -> bool {
|
fn is_greenteaspeak_server_version(version: &str) -> bool {
|
||||||
@@ -902,12 +902,12 @@ fn format_server_license(license: LicenseType, version: &str) -> String {
|
|||||||
return match license {
|
return match license {
|
||||||
LicenseType::Offline => "Private".into(),
|
LicenseType::Offline => "Private".into(),
|
||||||
LicenseType::Sdk => "Premium".into(),
|
LicenseType::Sdk => "Premium".into(),
|
||||||
LicenseType::SdkOffline => "Authorized GreenTeaSpeak Host Provider".into(),
|
LicenseType::SdkOffline => "Authorized VoySpeak Host Provider".into(),
|
||||||
_ => "Keine Lizenz".into(),
|
_ => "Keine Lizenz".into(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if version.trim().to_ascii_lowercase().starts_with("teaspeak") {
|
if version.trim().to_ascii_lowercase().starts_with("teaspeak") {
|
||||||
return "Kein GreenTeaSpeak-Server".into();
|
return "Kein VoySpeak-Server".into();
|
||||||
}
|
}
|
||||||
match license {
|
match license {
|
||||||
LicenseType::NoLicense => "No License".into(),
|
LicenseType::NoLicense => "No License".into(),
|
||||||
@@ -936,8 +936,8 @@ fn friendly_connect_error(address: &str, e: tsclientlib::Error) -> anyhow::Error
|
|||||||
{
|
{
|
||||||
return anyhow::anyhow!(
|
return anyhow::anyhow!(
|
||||||
"Could not connect to \"{address}\": this server rejects this client type (error 533). \
|
"Could not connect to \"{address}\": this server rejects this client type (error 533). \
|
||||||
GreenTeaSpeak public servers often only allow the official GreenTeaSpeak desktop client. \
|
VoySpeak (formerly GreenTeaSpeak) public servers often only allow the official VoySpeak desktop client. \
|
||||||
Try a self-hosted TeaSpeak with TeamSpeak-compat enabled, or use GreenTeaSpeak 2 for ts.greenteaspeak.de."
|
Try a self-hosted TeaSpeak with TeamSpeak-compat enabled, or use the VoySpeak desktop client."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if raw.contains("BlockedTarget") {
|
if raw.contains("BlockedTarget") {
|
||||||
|
|||||||
+1
-2
@@ -1,4 +1,4 @@
|
|||||||
# TeaSpeak / GreenTeaSpeak support (WebSpeak3)
|
# TeaSpeak / VoySpeak (formerly GreenTeaSpeak) support (WebSpeak3)
|
||||||
|
|
||||||
WebSpeak3 can speak the TeamSpeak 3/6 protocol via `ts-connector` / `tsclientlib`.
|
WebSpeak3 can speak the TeamSpeak 3/6 protocol via `ts-connector` / `tsclientlib`.
|
||||||
TeaSpeak / GreenTeaSpeak servers need an extra identity handshake before `clientinit`.
|
TeaSpeak / GreenTeaSpeak servers need an extra identity handshake before `clientinit`.
|
||||||
@@ -12,7 +12,6 @@ TeaSpeak / GreenTeaSpeak servers need an extra identity handshake before `client
|
|||||||
answers that way — required for GreenTeaSpeak hubs that disable TeamSpeak clients
|
answers that way — required for GreenTeaSpeak hubs that disable TeamSpeak clients
|
||||||
- TEAMSPEAK identity handshake after crypto when needed
|
- TEAMSPEAK identity handshake after crypto when needed
|
||||||
- DNS SRV `_gts._udp` in addition to `_ts3._udp`
|
- DNS SRV `_gts._udp` in addition to `_ts3._udp`
|
||||||
- Design theme **GreenTeaSpeak** (third UI style)
|
|
||||||
|
|
||||||
Verified against `ts.greenteaspeak.de` (Official GreenTeaSpeak Public Server).
|
Verified against `ts.greenteaspeak.de` (Official GreenTeaSpeak Public Server).
|
||||||
|
|
||||||
|
|||||||
+10
-4
@@ -93,7 +93,9 @@ const ALLOWED_ORIGINS = (process.env.ALLOWED_ORIGINS ?? "")
|
|||||||
// Each /ws socket can spawn a connector process holding a live TeamSpeak
|
// Each /ws socket can spawn a connector process holding a live TeamSpeak
|
||||||
// session, so both need a ceiling. 0 disables the respective limit.
|
// session, so both need a ceiling. 0 disables the respective limit.
|
||||||
const MAX_CONNECTIONS_PER_IP = Number(process.env.MAX_CONNECTIONS_PER_IP ?? 10);
|
const MAX_CONNECTIONS_PER_IP = Number(process.env.MAX_CONNECTIONS_PER_IP ?? 10);
|
||||||
const MAX_CONNECTIONS = Number(process.env.MAX_CONNECTIONS ?? 300);
|
// Measured 2026-10-25: ~8-9 % of a core per client listening to constant audio
|
||||||
|
// (connector + node + cloudflared), ~10-15 MB RAM. 60 suits a 2-core VPS.
|
||||||
|
const MAX_CONNECTIONS = Number(process.env.MAX_CONNECTIONS ?? 60);
|
||||||
const connectionsPerIp = new Map<string, number>();
|
const connectionsPerIp = new Map<string, number>();
|
||||||
// Every "connect" spawns a fresh connector, and a socket can send any number
|
// Every "connect" spawns a fresh connector, and a socket can send any number
|
||||||
// of them - without this, 10 sockets were enough to join-flood a TS server
|
// of them - without this, 10 sockets were enough to join-flood a TS server
|
||||||
@@ -570,9 +572,6 @@ const wss = new WebSocketServer({
|
|||||||
if (ALLOWED_ORIGINS.length > 0 && origin && !ALLOWED_ORIGINS.includes(origin.toLowerCase())) {
|
if (ALLOWED_ORIGINS.length > 0 && origin && !ALLOWED_ORIGINS.includes(origin.toLowerCase())) {
|
||||||
return done(false, 403, "Origin not allowed");
|
return done(false, 403, "Origin not allowed");
|
||||||
}
|
}
|
||||||
if (MAX_CONNECTIONS > 0 && wss.clients.size >= MAX_CONNECTIONS) {
|
|
||||||
return done(false, 503, "Gateway is full");
|
|
||||||
}
|
|
||||||
const ip = clientIp(req);
|
const ip = clientIp(req);
|
||||||
if (MAX_CONNECTIONS_PER_IP > 0 && (connectionsPerIp.get(ip) ?? 0) >= MAX_CONNECTIONS_PER_IP) {
|
if (MAX_CONNECTIONS_PER_IP > 0 && (connectionsPerIp.get(ip) ?? 0) >= MAX_CONNECTIONS_PER_IP) {
|
||||||
return done(false, 429, "Too many connections");
|
return done(false, 429, "Too many connections");
|
||||||
@@ -679,6 +678,13 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
|
|||||||
// multiple /ws connections in parallel (one per server tab).
|
// multiple /ws connections in parallel (one per server tab).
|
||||||
let connection: Ts3Connection | undefined;
|
let connection: Ts3Connection | undefined;
|
||||||
|
|
||||||
|
// Full: accept and say so, since a browser can't read why an upgrade was refused.
|
||||||
|
if (MAX_CONNECTIONS > 0 && wss.clients.size > MAX_CONNECTIONS) {
|
||||||
|
socket.send(JSON.stringify({ type: "error", code: "gateway_full", message: "This gateway is full right now. Please try again in a few minutes." }));
|
||||||
|
socket.close(1013, "Gateway is full");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ip = clientIp(req);
|
const ip = clientIp(req);
|
||||||
connectionsPerIp.set(ip, (connectionsPerIp.get(ip) ?? 0) + 1);
|
connectionsPerIp.set(ip, (connectionsPerIp.get(ip) ?? 0) + 1);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const STORE_SCREENSHOT_RE = /^data:image\/(png|jpe?g|webp);base64,[A-Za-z0-9+/]+
|
|||||||
// grow unbounded from spam that slips past rate limiting (a fresh IP per
|
// grow unbounded from spam that slips past rate limiting (a fresh IP per
|
||||||
// submission, say). Bounds worst case to ~300 * 450KB =~ 135MB in RAM.
|
// submission, say). Bounds worst case to ~300 * 450KB =~ 135MB in RAM.
|
||||||
const STORE_MAX_THEMES = 300;
|
const STORE_MAX_THEMES = 300;
|
||||||
const STORE_BASE_THEMES = new Set(["standard", "nova", "greenteaspeak", "pulse", "ide"]);
|
const STORE_BASE_THEMES = new Set(["standard", "nova", "pulse", "ide"]);
|
||||||
|
|
||||||
// A handful of names (the operator's own) that only whoever holds
|
// A handful of names (the operator's own) that only whoever holds
|
||||||
// STORE_ADMIN_TOKEN may publish under - stops anyone else from impersonating
|
// STORE_ADMIN_TOKEN may publish under - stops anyone else from impersonating
|
||||||
|
|||||||
+964
-3
@@ -43,6 +43,9 @@
|
|||||||
.ts-app.ts-force-mobile {
|
.ts-app.ts-force-mobile {
|
||||||
max-width: 390px;
|
max-width: 390px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
/* Makes position:fixed children (FABs, dialogs) stick to this phone frame
|
||||||
|
instead of the browser window. */
|
||||||
|
transform: translateZ(0);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 0 0 1px rgba(0, 0, 0, 0.4),
|
0 0 0 1px rgba(0, 0, 0, 0.4),
|
||||||
0 0 40px rgba(0, 0, 0, 0.5);
|
0 0 40px rgba(0, 0, 0, 0.5);
|
||||||
@@ -3007,6 +3010,13 @@
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The unique ID is 28 base64 characters - don't cut it off. */
|
||||||
|
input.ts-identities-uid {
|
||||||
|
width: 36ch;
|
||||||
|
max-width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-identities-status {
|
.ts-identities-status {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
@@ -3603,9 +3613,6 @@
|
|||||||
box-shadow: inset 0 0 0 1px #7fb0e8;
|
box-shadow: inset 0 0 0 1px #7fb0e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-design-theme-swatch-greenteaspeak {
|
|
||||||
background: linear-gradient(135deg, #1f2329 40%, #6fbf5c 40%, #386896 70%, #c8b882 70%);
|
|
||||||
}
|
|
||||||
.ts-design-theme-swatch-pulse {
|
.ts-design-theme-swatch-pulse {
|
||||||
background: linear-gradient(135deg, oklch(0.22 0.02 285) 0%, oklch(0.15 0.03 290) 100%);
|
background: linear-gradient(135deg, oklch(0.22 0.02 285) 0%, oklch(0.15 0.03 290) 100%);
|
||||||
box-shadow: inset 0 0 0 1px #9d8cf0;
|
box-shadow: inset 0 0 0 1px #9d8cf0;
|
||||||
@@ -4929,3 +4936,957 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Multi-join server tabs. No theme defines --bg-app/--bg-toolbar, so this
|
||||||
|
strip is always dark: its text colors are fixed, not the theme's --text (which is dark
|
||||||
|
in the light theme and made the active tab unreadable). */
|
||||||
|
.ts-app .gts-connection-tabs {
|
||||||
|
display: flex;
|
||||||
|
gap: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: var(--bg-app, #1a1a1a);
|
||||||
|
border-bottom: 1px solid var(--border, #333);
|
||||||
|
height: 24px;
|
||||||
|
min-height: 24px;
|
||||||
|
align-items: stretch;
|
||||||
|
overflow: hidden;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app .gts-connection-tab {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
background: var(--bg-toolbar, #2a2a2a);
|
||||||
|
border: 1px solid var(--border, #444);
|
||||||
|
border-bottom: none;
|
||||||
|
color: #aaa;
|
||||||
|
padding: 0 4px 0 10px;
|
||||||
|
max-width: 280px;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app .gts-connection-tab-active {
|
||||||
|
background: var(--bg-panel, #333);
|
||||||
|
color: #eee;
|
||||||
|
border-color: #b0b8c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app .gts-connection-tab-label {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app .gts-connection-tab-close {
|
||||||
|
flex-shrink: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: inherit;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app .gts-connection-tab-close:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------------
|
||||||
|
Mobile shell (.ts-mobile is set from JS below 700px or via the demo toggle).
|
||||||
|
Own layout instead of the squeezed desktop one: slim header with the menu
|
||||||
|
behind ☰, one full-height panel at a time (channels / chat / info), big
|
||||||
|
voice controls and tabs at the bottom. Touch targets are >= 44px.
|
||||||
|
--------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile {
|
||||||
|
height: 100dvh;
|
||||||
|
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||||
|
--m-radius: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile > .ts-toolbar,
|
||||||
|
.ts-app.ts-mobile > .ts-log,
|
||||||
|
.ts-app.ts-mobile .ts-resize-handle-vertical,
|
||||||
|
.ts-app.ts-mobile .ts-resize-handle-horizontal {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Header */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile > .ts-menubar {
|
||||||
|
position: relative;
|
||||||
|
min-height: 56px;
|
||||||
|
padding: 0 8px 0 4px;
|
||||||
|
gap: 6px;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile > .ts-menubar .ts-nova-menu-dropdown {
|
||||||
|
position: static;
|
||||||
|
order: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-toggle {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
font-size: 22px;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-mobile-title {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-mobile-title-name {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: var(--text);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-mobile-title-status {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-mobile-title-status::before {
|
||||||
|
content: "";
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-mobile-title-status-on::before {
|
||||||
|
background: #3ba55d;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The ☰ panel becomes a full-width sheet with inline (accordion) submenus. */
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open {
|
||||||
|
left: 8px;
|
||||||
|
right: 8px;
|
||||||
|
top: calc(100% + 4px);
|
||||||
|
margin: 0;
|
||||||
|
padding: 8px;
|
||||||
|
max-height: calc(100dvh - 140px);
|
||||||
|
overflow-y: auto;
|
||||||
|
border-radius: var(--m-radius);
|
||||||
|
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item,
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item-active {
|
||||||
|
min-height: 48px;
|
||||||
|
padding: 0 14px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text);
|
||||||
|
text-align: left;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menu {
|
||||||
|
position: static;
|
||||||
|
margin: 0 0 6px 10px;
|
||||||
|
width: auto;
|
||||||
|
min-width: 0;
|
||||||
|
max-height: none;
|
||||||
|
border: none;
|
||||||
|
border-left: 2px solid var(--border-soft);
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-menu-item {
|
||||||
|
min-height: 44px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Body: one panel at a time */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-body {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-upper {
|
||||||
|
height: auto !important;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-tree-panel,
|
||||||
|
.ts-app.ts-mobile .ts-side-panel {
|
||||||
|
width: 100% !important;
|
||||||
|
max-height: none;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-panel {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile-tab-tree .ts-side-panel,
|
||||||
|
.ts-app.ts-mobile-tab-tree .ts-chat-panel,
|
||||||
|
.ts-app.ts-mobile-tab-info .ts-tree-panel,
|
||||||
|
.ts-app.ts-mobile-tab-info .ts-chat-panel,
|
||||||
|
.ts-app.ts-mobile-tab-chat .ts-upper {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tree: big, rounded rows */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-tree-panel {
|
||||||
|
padding: 6px 8px 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-tree-panel .ts-row {
|
||||||
|
min-height: 44px;
|
||||||
|
line-height: 1.3;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
padding-right: 10px;
|
||||||
|
gap: 8px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-tree-panel .ts-server-row {
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-tree-search {
|
||||||
|
min-height: 42px;
|
||||||
|
margin: 6px 0;
|
||||||
|
padding: 0 14px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-side-panel {
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chat */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-messages {
|
||||||
|
font-size: 15px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-tabs {
|
||||||
|
overflow-x: auto;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-tab {
|
||||||
|
min-height: 36px;
|
||||||
|
padding: 0 14px;
|
||||||
|
border-radius: 999px;
|
||||||
|
font-size: 14px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-input-row {
|
||||||
|
padding: 8px;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-input-row textarea {
|
||||||
|
min-height: 44px;
|
||||||
|
font-size: 16px; /* < 16px makes iOS zoom into the field */
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-radius: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-input-row button {
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0 18px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
border: none;
|
||||||
|
border-radius: 22px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bottom: voice bar + tabs */
|
||||||
|
|
||||||
|
.ts-mobile-bottom {
|
||||||
|
flex-shrink: 0;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
border-top: 1px solid var(--border-soft);
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voicebar {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 8px 10px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-btn {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 56px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--m-radius, 14px);
|
||||||
|
background: var(--input-bg);
|
||||||
|
color: var(--text);
|
||||||
|
cursor: pointer;
|
||||||
|
touch-action: manipulation;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-label {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-on {
|
||||||
|
background: #3ba55d;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-off {
|
||||||
|
background: #b3403a;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-on .ts-mobile-voice-label,
|
||||||
|
.ts-mobile-voice-off .ts-mobile-voice-label,
|
||||||
|
.ts-mobile-voice-hangup .ts-mobile-voice-label {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-voice-hangup {
|
||||||
|
flex: 0 0 72px;
|
||||||
|
background: #d6403d;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-ptt {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-connect-btn {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 52px;
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--m-radius, 14px);
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg);
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tabs {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tab {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 52px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 2px;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
position: relative;
|
||||||
|
touch-action: manipulation;
|
||||||
|
margin: 4px 18px;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-icon {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tab-active {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tab-active {
|
||||||
|
background: color-mix(in srgb, var(--accent) 18%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tab-unread::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
left: calc(50% + 10px);
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #d6403d;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Floating buttons sit above the bottom bars instead of on top of them. */
|
||||||
|
.ts-app.ts-mobile .ts-donate-fab {
|
||||||
|
bottom: calc(150px + env(safe-area-inset-bottom));
|
||||||
|
right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-feedback-fab-wrap {
|
||||||
|
bottom: calc(150px + env(safe-area-inset-bottom));
|
||||||
|
right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-feedback-fab-wrap-stacked {
|
||||||
|
bottom: calc(200px + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-mobile-tab > * {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In the chat tab the floating buttons would cover the send button. */
|
||||||
|
.ts-app.ts-mobile-tab-chat .ts-donate-fab,
|
||||||
|
.ts-app.ts-mobile-tab-chat .ts-feedback-fab-wrap {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-chat-tabs {
|
||||||
|
order: -1;
|
||||||
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Disconnected: the header already says so, keep the panel calm and centered. */
|
||||||
|
.ts-app.ts-mobile .ts-tree-panel > .ts-tree-empty:only-child {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Mobile: settings dialogs as full-screen pages ------------------------ */
|
||||||
|
|
||||||
|
.ts-options-back {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
width: 100% !important;
|
||||||
|
max-height: none;
|
||||||
|
height: 100dvh;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-dialog-titlebar {
|
||||||
|
min-height: 56px;
|
||||||
|
padding: 0 4px 0 16px;
|
||||||
|
font-size: 17px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-dialog-titlebar > button:last-child {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-body {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-dialog-buttons {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Section list */
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav .ts-options-sidebar {
|
||||||
|
flex-direction: column;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
|
||||||
|
border: none;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav .ts-options-sidebar-item {
|
||||||
|
min-height: 52px;
|
||||||
|
padding: 0 12px;
|
||||||
|
gap: 14px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav .ts-options-sidebar-item::after {
|
||||||
|
content: "›";
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 22px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav .ts-options-sidebar-icon {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav:not(.ts-options-detail) .ts-options-content,
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav.ts-options-detail .ts-options-sidebar,
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog-nav.ts-options-detail .ts-options-title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-detail .ts-options-back {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0 8px 0 0;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-back span {
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Other dialogs sharing this layout (server edit): tabs as a scrolling pill row */
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog:not(.ts-options-dialog-nav) .ts-options-sidebar {
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow-x: auto;
|
||||||
|
width: 100%;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog:not(.ts-options-dialog-nav) .ts-options-sidebar-item {
|
||||||
|
min-height: 38px;
|
||||||
|
padding: 0 14px;
|
||||||
|
border-radius: 999px;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog:not(.ts-options-dialog-nav) .ts-dialog-buttons {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Page content: touch-sized controls */
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content {
|
||||||
|
padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content select,
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content textarea {
|
||||||
|
min-height: 44px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content button {
|
||||||
|
min-height: 44px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content input[type="checkbox"],
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content input[type="radio"] {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content fieldset {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-options-dialog .ts-options-content label {
|
||||||
|
min-height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Mobile: ☰ menu as drill-down (tap "Extras" -> only its items) ------- */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open {
|
||||||
|
z-index: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile:has(.ts-nova-menu-panel-open) .ts-donate-fab,
|
||||||
|
.ts-app.ts-mobile:has(.ts-nova-menu-panel-open) .ts-feedback-fab-wrap {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown > .ts-menubar-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown > .ts-menubar-item::after {
|
||||||
|
content: "›";
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* One submenu open: hide its siblings, its trigger becomes the back row. */
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open:has(> .ts-menubar-dropdown > .ts-menu) > .ts-menubar-dropdown:not(:has(> .ts-menu)) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown:has(> .ts-menu) > .ts-menubar-item {
|
||||||
|
font-size: 17px;
|
||||||
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown:has(> .ts-menu) > .ts-menubar-item::before {
|
||||||
|
content: "";
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Back chevron drawn with borders: a glyph sits on the baseline and looks low. */
|
||||||
|
.ts-app.ts-mobile .ts-options-back span,
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown:has(> .ts-menu) > .ts-menubar-item::before {
|
||||||
|
display: inline-block;
|
||||||
|
flex: none;
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
margin-left: 6px;
|
||||||
|
border-left: 2.5px solid var(--accent);
|
||||||
|
border-bottom: 2.5px solid var(--accent);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown:has(> .ts-menu) > .ts-menubar-item::after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel-open .ts-menu {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menu-item {
|
||||||
|
min-height: 50px;
|
||||||
|
padding: 0 10px;
|
||||||
|
gap: 14px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menu-item-icon {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
font-size: 17px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keyboard shortcuts mean nothing on a phone. */
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menu-item-shortcut {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menu-separator {
|
||||||
|
margin: 6px 10px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* An open submenu takes the whole screen, its back row acts as the title bar. */
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open:has(> .ts-menubar-dropdown > .ts-menu) {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
max-height: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 8px calc(16px + env(safe-area-inset-bottom));
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open .ts-menubar-dropdown:has(> .ts-menu) > .ts-menubar-item {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
min-height: 56px;
|
||||||
|
margin: 0 -8px 6px;
|
||||||
|
padding: env(safe-area-inset-top) 16px 0 12px;
|
||||||
|
border-radius: 0;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Mobile: all other dialogs ------------------------------------------- */
|
||||||
|
/* Small prompts slide up as a bottom sheet; list/admin dialogs fill the
|
||||||
|
screen. :where() keeps this below the options-dialog rules above. */
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-dialog-backdrop {
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) {
|
||||||
|
width: 100% !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
max-width: none !important;
|
||||||
|
max-height: 100dvh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-y: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
border: none;
|
||||||
|
border-radius: 20px 20px 0 0;
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(
|
||||||
|
.ts-client-log-dialog, .ts-server-protocol-log-dialog, .ts-ban-list-dialog,
|
||||||
|
.ts-complain-list-dialog, .ts-offline-messages-dialog, .ts-collected-urls-dialog,
|
||||||
|
.ts-contacts-dialog, .ts-identities-dialog, .ts-favorites-dialog,
|
||||||
|
.ts-file-browser-dialog, .ts-transfers-window, .ts-perms-editor-dialog,
|
||||||
|
.ts-permission-overview-dialog, .ts-whisper-lists-dialog,
|
||||||
|
.ts-whisper-history-dialog, .ts-server-icons-dialog, .ts-group-assign-dialog,
|
||||||
|
.ts-tos-dialog, .ts-connection-info-dialog, .ts-feedback-dialog, .ts-about-dialog
|
||||||
|
) {
|
||||||
|
height: 100dvh;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > .ts-dialog-titlebar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 2;
|
||||||
|
min-height: 56px;
|
||||||
|
padding: 0 4px 0 16px;
|
||||||
|
font-size: 17px;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > .ts-dialog-titlebar button {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > .ts-dialog-buttons {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 2;
|
||||||
|
margin-top: auto;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The scrolling list inside a full-screen dialog takes the free height. */
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > :not(.ts-dialog-titlebar):not(.ts-dialog-buttons) {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) table {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) button {
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 0 16px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) :where(select, textarea,
|
||||||
|
input:not([type="checkbox"]):not([type="radio"]):not([type="range"])) {
|
||||||
|
min-height: 44px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) :where(input[type="checkbox"], input[type="radio"]) {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) .ts-dialog-field {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile: buttons share each wrapped row evenly; log-level filters as a chip row. */
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > .ts-dialog-buttons > div {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex: 1 1 100%;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) > .ts-dialog-buttons button {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile :where(.ts-dialog) .ts-dialog-row {
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile .ts-log-level-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 6px 14px;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile .ts-log-level-row > .ts-dialog-checkbox {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Mobile: ☰ top level as a left drawer, as wide as its longest entry ---- */
|
||||||
|
.ts-app.ts-mobile .ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open:not(:has(> .ts-menubar-dropdown > .ts-menu)) {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
width: max-content;
|
||||||
|
max-width: 85%;
|
||||||
|
max-height: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: calc(12px + env(safe-area-inset-top)) 8px calc(12px + env(safe-area-inset-bottom));
|
||||||
|
border: none;
|
||||||
|
border-radius: 0 20px 20px 0;
|
||||||
|
box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45), 8px 0 24px rgba(0, 0, 0, 0.3);
|
||||||
|
animation: ts-mobile-drawer-in 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-mobile .ts-nova-menu-panel-open:not(:has(> .ts-menubar-dropdown > .ts-menu)) .ts-menubar-dropdown > .ts-menubar-item {
|
||||||
|
gap: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes ts-mobile-drawer-in {
|
||||||
|
from { transform: translateX(-100%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Mobile × design themes: themes keep colours/fonts, the mobile layout wins */
|
||||||
|
/* Nova/Pulse reorder the app's flex children; pin the mobile bar + ticker last. */
|
||||||
|
.ts-app.ts-mobile > .ts-mobile-bottom {
|
||||||
|
order: 10;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile > .ts-news-ticker {
|
||||||
|
order: 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nova/Pulse send buttons are icon-only; keep them round instead of the text pill. */
|
||||||
|
.ts-app.ts-mobile:is(.ts-design-nova, .ts-design-pulse) .ts-chat-input-row button {
|
||||||
|
width: 44px;
|
||||||
|
min-width: 44px;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IDE: undo its floating hamburger and three-column grid. */
|
||||||
|
.ts-app.ts-mobile.ts-design-ide > .ts-menubar {
|
||||||
|
height: auto;
|
||||||
|
padding: 0 12px;
|
||||||
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile.ts-design-ide > .ts-menubar .ts-nova-menu-dropdown {
|
||||||
|
position: static;
|
||||||
|
order: 0;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile.ts-design-ide > .ts-body {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile.ts-design-ide .ts-upper {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.ts-app.ts-mobile.ts-design-ide .ts-tree-panel {
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
+231
-54
@@ -9,6 +9,7 @@ import {
|
|||||||
useSyncExternalStore,
|
useSyncExternalStore,
|
||||||
type ReactNode,
|
type ReactNode,
|
||||||
} from "react";
|
} from "react";
|
||||||
|
import { identityUid } from "./identityUid";
|
||||||
import qrcode from "qrcode-generator";
|
import qrcode from "qrcode-generator";
|
||||||
import { useRegisterSW } from "virtual:pwa-register/react";
|
import { useRegisterSW } from "virtual:pwa-register/react";
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
@@ -231,10 +232,8 @@ import {
|
|||||||
type ChatSettings,
|
type ChatSettings,
|
||||||
} from "./chatlog";
|
} from "./chatlog";
|
||||||
import {
|
import {
|
||||||
GREENTEASPEAK_THEME_ID,
|
ConnectionTabs,
|
||||||
GreenteaSpeakChrome,
|
} from "./ConnectionTabs";
|
||||||
isGreenteaSpeakTheme,
|
|
||||||
} from "./themes/greenteaspeak";
|
|
||||||
import { BARE_URL_REGEX, renderBbcode, wrapUrls } from "./lib/bbcode";
|
import { BARE_URL_REGEX, renderBbcode, wrapUrls } from "./lib/bbcode";
|
||||||
import { parseChannelName, spacerDisplayName } from "./lib/spacer";
|
import { parseChannelName, spacerDisplayName } from "./lib/spacer";
|
||||||
import akimoPhoto from "./assets/akimo.jpg";
|
import akimoPhoto from "./assets/akimo.jpg";
|
||||||
@@ -497,18 +496,18 @@ const CONTINUOUS_KEY = "webspeak3:continuous-transmission";
|
|||||||
const TYPING_ATTENUATION_KEY = "webspeak3:typing-attenuation";
|
const TYPING_ATTENUATION_KEY = "webspeak3:typing-attenuation";
|
||||||
const PTT_BINDING_KEY = "webspeak3:ptt-key";
|
const PTT_BINDING_KEY = "webspeak3:ptt-key";
|
||||||
const DESIGN_THEME_KEY = "webspeak3:design-theme";
|
const DESIGN_THEME_KEY = "webspeak3:design-theme";
|
||||||
// The user's actual pick - "standard" | "nova" | "greenteaspeak" | "custom:<id>".
|
// The user's actual pick - "standard" | "nova" | "pulse" | "ide" | "custom:<id>".
|
||||||
// DESIGN_THEME_KEY above keeps tracking just the resolved structural base, since a
|
// DESIGN_THEME_KEY above keeps tracking just the resolved structural base, since a
|
||||||
// couple of early call sites (e.g. the host-field default below) need that cheaply,
|
// couple of early call sites (e.g. the host-field default below) need that cheaply,
|
||||||
// before customThemes is loaded.
|
// before customThemes is loaded.
|
||||||
const DESIGN_SELECTION_KEY = "webspeak3:design-selection";
|
const DESIGN_SELECTION_KEY = "webspeak3:design-selection";
|
||||||
const CUSTOM_THEMES_KEY = "webspeak3:custom-themes";
|
const CUSTOM_THEMES_KEY = "webspeak3:custom-themes";
|
||||||
|
|
||||||
type DesignTheme = "standard" | "nova" | "greenteaspeak" | "pulse" | "ide";
|
type DesignTheme = "standard" | "nova" | "pulse" | "ide";
|
||||||
|
|
||||||
/** A user-authored theme package: a name, which built-in layout it behaves like
|
/** A user-authored theme package: a name, which built-in layout it behaves like
|
||||||
* (Standard's plain chrome, Nova's collapsed menu/splash, GreenTeaSpeak shell,
|
* (Standard's plain chrome, Nova's collapsed menu/splash, Pulse's card/sidebar
|
||||||
* or Pulse's card/sidebar layout), and raw CSS that gets injected while it's
|
* layout or IDE), and raw CSS that gets injected while it's
|
||||||
* active - free-form, so it can restyle or even reflow the existing markup
|
* active - free-form, so it can restyle or even reflow the existing markup
|
||||||
* (e.g. via flex `order`, `display:none`, overlays). */
|
* (e.g. via flex `order`, `display:none`, overlays). */
|
||||||
type CustomTheme = {
|
type CustomTheme = {
|
||||||
@@ -545,7 +544,7 @@ const STORE_SCREENSHOT_MAX_DATA_URL_LENGTH = 400_000;
|
|||||||
|
|
||||||
function isDesignTheme(value: string): value is DesignTheme {
|
function isDesignTheme(value: string): value is DesignTheme {
|
||||||
return (
|
return (
|
||||||
value === "standard" || value === "nova" || value === "greenteaspeak" || value === "pulse" || value === "ide"
|
value === "standard" || value === "nova" || value === "pulse" || value === "ide"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,7 +556,9 @@ function loadDesignTheme(): DesignTheme {
|
|||||||
|
|
||||||
function resolveDesignThemeBase(selection: string, customThemes: CustomTheme[]): DesignTheme {
|
function resolveDesignThemeBase(selection: string, customThemes: CustomTheme[]): DesignTheme {
|
||||||
if (selection.startsWith("custom:")) {
|
if (selection.startsWith("custom:")) {
|
||||||
return customThemes.find((th) => `custom:${th.id}` === selection)?.baseTheme ?? "standard";
|
// A removed base (e.g. the old GreenTeaSpeak theme) falls back to Standard.
|
||||||
|
const base = customThemes.find((th) => `custom:${th.id}` === selection)?.baseTheme;
|
||||||
|
return base && isDesignTheme(base) ? base : "standard";
|
||||||
}
|
}
|
||||||
return isDesignTheme(selection) ? selection : "standard";
|
return isDesignTheme(selection) ? selection : "standard";
|
||||||
}
|
}
|
||||||
@@ -566,13 +567,11 @@ function designThemeClassName(theme: DesignTheme): string {
|
|||||||
if (theme === "nova") return " ts-design-nova";
|
if (theme === "nova") return " ts-design-nova";
|
||||||
if (theme === "pulse") return " ts-design-pulse";
|
if (theme === "pulse") return " ts-design-pulse";
|
||||||
if (theme === "ide") return " ts-design-ide";
|
if (theme === "ide") return " ts-design-ide";
|
||||||
if (isGreenteaSpeakTheme(theme)) return " ts-design-greenteaspeak";
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function designThemeLabel(theme: DesignTheme, t: (key: string) => string): string {
|
function designThemeLabel(theme: DesignTheme, t: (key: string) => string): string {
|
||||||
if (theme === "nova") return t("design.theme.nova");
|
if (theme === "nova") return t("design.theme.nova");
|
||||||
if (theme === "greenteaspeak") return t("design.theme.greenteaspeak");
|
|
||||||
if (theme === "pulse") return t("design.theme.pulse");
|
if (theme === "pulse") return t("design.theme.pulse");
|
||||||
if (theme === "ide") return t("design.theme.ide");
|
if (theme === "ide") return t("design.theme.ide");
|
||||||
return t("design.theme.standard");
|
return t("design.theme.standard");
|
||||||
@@ -602,7 +601,9 @@ function saveCustomThemes(list: CustomTheme[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadDesignSelection(): string {
|
function loadDesignSelection(): string {
|
||||||
return localStorage.getItem(DESIGN_SELECTION_KEY) ?? loadDesignTheme();
|
const raw = localStorage.getItem(DESIGN_SELECTION_KEY);
|
||||||
|
// A removed builtin (e.g. "greenteaspeak") falls back to Standard.
|
||||||
|
return raw && (raw.startsWith("custom:") || isDesignTheme(raw)) ? raw : loadDesignTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadBoolPref(key: string, fallback: boolean): boolean {
|
function loadBoolPref(key: string, fallback: boolean): boolean {
|
||||||
@@ -2587,17 +2588,18 @@ function SegmentedChoice<T extends string | number>({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function StreamSettingsDialog({
|
function StreamSettingsDialog({
|
||||||
defaultName,
|
ownName,
|
||||||
onStart,
|
onStart,
|
||||||
onCancel,
|
onCancel,
|
||||||
}: {
|
}: {
|
||||||
defaultName: string;
|
ownName: string;
|
||||||
onStart: (options: StreamPublishOptions) => void;
|
onStart: (options: StreamPublishOptions) => void;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
}) {
|
}) {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
const backdrop = useBackdropDismiss(onCancel);
|
const backdrop = useBackdropDismiss(onCancel);
|
||||||
const [preset, setPreset] = useState<string | null>("720");
|
const [preset, setPreset] = useState<string | null>("720");
|
||||||
|
const [source, setSource] = useState<"display" | "camera">("display");
|
||||||
const [audio, setAudio] = useState(true);
|
const [audio, setAudio] = useState(true);
|
||||||
const [accessibility, setAccessibility] = useState<number>(StreamAccess.PUBLIC);
|
const [accessibility, setAccessibility] = useState<number>(StreamAccess.PUBLIC);
|
||||||
const [advanced, setAdvanced] = useState(false);
|
const [advanced, setAdvanced] = useState(false);
|
||||||
@@ -2643,6 +2645,18 @@ function StreamSettingsDialog({
|
|||||||
<p className="ts-alpha-note">{t("publish.alphaNote")}</p>
|
<p className="ts-alpha-note">{t("publish.alphaNote")}</p>
|
||||||
<h4 className="ts-stream-settings-section">{t("publish.dialog.basic")}</h4>
|
<h4 className="ts-stream-settings-section">{t("publish.dialog.basic")}</h4>
|
||||||
|
|
||||||
|
<div className="ts-stream-settings-row">
|
||||||
|
<span>{t("publish.kind")}</span>
|
||||||
|
<SegmentedChoice
|
||||||
|
value={source}
|
||||||
|
onChange={setSource}
|
||||||
|
options={[
|
||||||
|
{ value: "display", label: `🖥️ ${t("publish.kind.display")}` },
|
||||||
|
{ value: "camera", label: `📷 ${t("publish.camera")}` },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="ts-stream-settings-row">
|
<div className="ts-stream-settings-row">
|
||||||
<span>{t("publish.preset")}</span>
|
<span>{t("publish.preset")}</span>
|
||||||
<SegmentedChoice
|
<SegmentedChoice
|
||||||
@@ -2658,8 +2672,16 @@ function StreamSettingsDialog({
|
|||||||
|
|
||||||
<div className="ts-stream-settings-row">
|
<div className="ts-stream-settings-row">
|
||||||
<span>{t("publish.audio")}</span>
|
<span>{t("publish.audio")}</span>
|
||||||
<label className="ts-stream-settings-toggle">
|
<label
|
||||||
<input type="checkbox" checked={audio} onChange={(e) => setAudio(e.target.checked)} />
|
className="ts-stream-settings-toggle"
|
||||||
|
title={source === "camera" ? t("publish.audio.cameraHint") : undefined}
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={audio && source === "display"}
|
||||||
|
disabled={source === "camera"}
|
||||||
|
onChange={(e) => setAudio(e.target.checked)}
|
||||||
|
/>
|
||||||
<span />
|
<span />
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -2730,7 +2752,7 @@ function StreamSettingsDialog({
|
|||||||
<SegmentedChoice
|
<SegmentedChoice
|
||||||
value={audioBitrateKbps}
|
value={audioBitrateKbps}
|
||||||
onChange={custom(setAudioBitrateKbps)}
|
onChange={custom(setAudioBitrateKbps)}
|
||||||
disabled={!audio}
|
disabled={!audio || source === "camera"}
|
||||||
options={AUDIO_BITRATE_CHOICES.map((v) => ({ value: v, label: String(v) }))}
|
options={AUDIO_BITRATE_CHOICES.map((v) => ({ value: v, label: String(v) }))}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -2786,8 +2808,9 @@ function StreamSettingsDialog({
|
|||||||
className="ts-stream-settings-go"
|
className="ts-stream-settings-go"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
onStart({
|
onStart({
|
||||||
name: defaultName,
|
name: `${ownName} - ${t(source === "camera" ? "publish.camera" : "publish.screen")}`,
|
||||||
audio,
|
source,
|
||||||
|
audio: audio && source === "display",
|
||||||
accessibility,
|
accessibility,
|
||||||
mode,
|
mode,
|
||||||
viewerLimit,
|
viewerLimit,
|
||||||
@@ -3027,6 +3050,9 @@ type NewsItem =
|
|||||||
|
|
||||||
const NEWS_DISMISSED_STORAGE_KEY = "webspeak3.newsTicker.dismissed";
|
const NEWS_DISMISSED_STORAGE_KEY = "webspeak3.newsTicker.dismissed";
|
||||||
|
|
||||||
|
/** Hash links that open a dialog in this client (#about, #options/<section>). */
|
||||||
|
const isInAppHash = (hash: string) => hash === "#about" || OPTIONS_SECTIONS.some((s) => hash === `#options/${s.id}`);
|
||||||
|
|
||||||
// Like the scrolling news line at the bottom of the native TS3 client.
|
// Like the scrolling news line at the bottom of the native TS3 client.
|
||||||
// Dismissing hides the current set of items until a new one shows up.
|
// Dismissing hides the current set of items until a new one shows up.
|
||||||
function NewsTicker() {
|
function NewsTicker() {
|
||||||
@@ -3073,9 +3099,13 @@ function NewsTicker() {
|
|||||||
: item.text;
|
: item.text;
|
||||||
const entries = items.map((item) => {
|
const entries = items.map((item) => {
|
||||||
const url = item.kind === "theme" ? undefined : item.url;
|
const url = item.kind === "theme" ? undefined : item.url;
|
||||||
|
// https://…/#options/konto or #about: open the dialog here instead of a new tab.
|
||||||
|
const inApp = url && isInAppHash(new URL(url).hash);
|
||||||
return (
|
return (
|
||||||
<span key={item.id} className="ts-news-item">
|
<span key={item.id} className="ts-news-item">
|
||||||
{url ? (
|
{inApp ? (
|
||||||
|
<a href={new URL(url).hash}>{label(item)}</a>
|
||||||
|
) : url ? (
|
||||||
<a href={url} target="_blank" rel="noopener noreferrer">
|
<a href={url} target="_blank" rel="noopener noreferrer">
|
||||||
{label(item)}
|
{label(item)}
|
||||||
</a>
|
</a>
|
||||||
@@ -3120,6 +3150,27 @@ function NewsTicker() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Line icons for the mobile shell (24px grid, stroke = currentColor). */
|
||||||
|
const MOBILE_ICONS = {
|
||||||
|
mic: "M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3",
|
||||||
|
micOff: "M3 3l18 18M9 9v3a3 3 0 0 0 5.1 2.1M15 9.3V6a3 3 0 0 0-5.7-1.3M5 11a7 7 0 0 0 11.9 4.9M19 11a7 7 0 0 1-.6 2.8M12 18v3",
|
||||||
|
sound: "M11 5L6 9H3v6h3l5 4zM15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13",
|
||||||
|
soundOff: "M11 5L6 9H3v6h3l5 4zM22 9l-6 6M16 9l6 6",
|
||||||
|
leave: "M3.6 13.4c4.6-4.5 12.2-4.5 16.8 0l-2.3 2.3-3-1.3v-2.1a11 11 0 0 0-6.2 0v2.1l-3 1.3z",
|
||||||
|
talk: "M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3zM5 11a7 7 0 0 0 14 0M12 18v3M2 8v4M22 8v4",
|
||||||
|
tree: "M4 5h16M8 10h12M8 15h12M4 5v15M4 10h4M4 15h4M8 20h12M4 20h4",
|
||||||
|
chat: "M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z",
|
||||||
|
info: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 11v6M12 7.5v.5",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
function MobileIcon({ name }: { name: keyof typeof MOBILE_ICONS }) {
|
||||||
|
return (
|
||||||
|
<svg className="ts-mobile-icon" viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">
|
||||||
|
<path d={MOBILE_ICONS[name]} />
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function DonateFab() {
|
function DonateFab() {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
if (!DONATE_URL) return null;
|
if (!DONATE_URL) return null;
|
||||||
@@ -5596,6 +5647,15 @@ function IdentitiesDialog({
|
|||||||
const importInputRef = useRef<HTMLInputElement>(null);
|
const importInputRef = useRef<HTMLInputElement>(null);
|
||||||
const [selectedId, setSelectedId] = useState(activeId ?? identities[0]?.id ?? null);
|
const [selectedId, setSelectedId] = useState(activeId ?? identities[0]?.id ?? null);
|
||||||
const selected = identities.find((i) => i.id === selectedId) ?? identities[0] ?? null;
|
const selected = identities.find((i) => i.id === selectedId) ?? identities[0] ?? null;
|
||||||
|
const [computedUid, setComputedUid] = useState<string | null>(null);
|
||||||
|
useEffect(() => {
|
||||||
|
let current = true;
|
||||||
|
setComputedUid(null);
|
||||||
|
if (selected?.blob) void identityUid(selected.blob).then((uid) => current && setComputedUid(uid));
|
||||||
|
return () => {
|
||||||
|
current = false;
|
||||||
|
};
|
||||||
|
}, [selected?.blob]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||||
@@ -5651,8 +5711,8 @@ function IdentitiesDialog({
|
|||||||
{t("identities.uniqueId")}
|
{t("identities.uniqueId")}
|
||||||
<input
|
<input
|
||||||
readOnly
|
readOnly
|
||||||
value={selected.id === activeId && ownUid ? ownUid : t("identities.unknown")}
|
value={computedUid || (selected.id === activeId && ownUid) || t("identities.unknown")}
|
||||||
className="ts-identities-readonly"
|
className="ts-identities-readonly ts-identities-uid"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
<div className="ts-identities-status">
|
<div className="ts-identities-status">
|
||||||
@@ -6431,10 +6491,11 @@ function AnwendungPanel({
|
|||||||
<option value="zh-CN">{t("app.language.zh-CN")}</option>
|
<option value="zh-CN">{t("app.language.zh-CN")}</option>
|
||||||
<option value="fa">{t("app.language.fa")}</option>
|
<option value="fa">{t("app.language.fa")}</option>
|
||||||
<option value="cs-CZ">{t("app.language.cs-CZ")}</option>
|
<option value="cs-CZ">{t("app.language.cs-CZ")}</option>
|
||||||
|
<option value="ru">{t("app.language.ru")}</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<p className="ts-options-hint">
|
<p className="ts-options-hint">
|
||||||
<a href="https://hosted.weblate.org/projects/webspeak3/" target="_blank" rel="noreferrer">
|
<a href="https://github.com/WebSpeak3/webspeak3#translating" target="_blank" rel="noreferrer">
|
||||||
{t("app.language.helpTranslate")}
|
{t("app.language.helpTranslate")}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@@ -7450,11 +7511,6 @@ function DesignPanel({
|
|||||||
const builtins: { id: DesignTheme; name: string; desc: string }[] = [
|
const builtins: { id: DesignTheme; name: string; desc: string }[] = [
|
||||||
{ id: "standard", name: t("design.theme.standard"), desc: t("design.theme.standard.desc") },
|
{ id: "standard", name: t("design.theme.standard"), desc: t("design.theme.standard.desc") },
|
||||||
{ id: "nova", name: t("design.theme.nova"), desc: t("design.theme.nova.desc") },
|
{ id: "nova", name: t("design.theme.nova"), desc: t("design.theme.nova.desc") },
|
||||||
{
|
|
||||||
id: GREENTEASPEAK_THEME_ID,
|
|
||||||
name: t("design.theme.greenteaspeak"),
|
|
||||||
desc: t("design.theme.greenteaspeak.desc"),
|
|
||||||
},
|
|
||||||
{ id: "pulse", name: t("design.theme.pulse"), desc: t("design.theme.pulse.desc") },
|
{ id: "pulse", name: t("design.theme.pulse"), desc: t("design.theme.pulse.desc") },
|
||||||
{ id: "ide", name: t("design.theme.ide"), desc: t("design.theme.ide.desc") },
|
{ id: "ide", name: t("design.theme.ide"), desc: t("design.theme.ide.desc") },
|
||||||
];
|
];
|
||||||
@@ -7545,7 +7601,6 @@ function DesignPanel({
|
|||||||
>
|
>
|
||||||
<option value="standard">{t("design.theme.standard")}</option>
|
<option value="standard">{t("design.theme.standard")}</option>
|
||||||
<option value="nova">{t("design.theme.nova")}</option>
|
<option value="nova">{t("design.theme.nova")}</option>
|
||||||
<option value="greenteaspeak">{t("design.theme.greenteaspeak")}</option>
|
|
||||||
<option value="pulse">{t("design.theme.pulse")}</option>
|
<option value="pulse">{t("design.theme.pulse")}</option>
|
||||||
<option value="ide">{t("design.theme.ide")}</option>
|
<option value="ide">{t("design.theme.ide")}</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -8407,11 +8462,19 @@ function OptionsDialog({
|
|||||||
const t = useT();
|
const t = useT();
|
||||||
const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0];
|
const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0];
|
||||||
const backdrop = useBackdropDismiss(onClose);
|
const backdrop = useBackdropDismiss(onClose);
|
||||||
|
// Mobile only (CSS): list of sections first, tapping one shows just that page.
|
||||||
|
const [mobileDetail, setMobileDetail] = useState(false);
|
||||||
return (
|
return (
|
||||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||||
<div className="ts-dialog ts-options-dialog" onClick={(e) => e.stopPropagation()}>
|
<div
|
||||||
|
className={`ts-dialog ts-options-dialog ts-options-dialog-nav${mobileDetail ? " ts-options-detail" : ""}`}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
<div className="ts-dialog-titlebar">
|
<div className="ts-dialog-titlebar">
|
||||||
<span>{t("options.title")}</span>
|
<button className="ts-options-back" onClick={() => setMobileDetail(false)}>
|
||||||
|
<span aria-hidden="true">‹</span> {t(`options.section.${active.id}`)}
|
||||||
|
</button>
|
||||||
|
<span className="ts-options-title">{t("options.title")}</span>
|
||||||
<button onClick={onClose} title={t("dialog.close")} aria-label={t("dialog.close")}>
|
<button onClick={onClose} title={t("dialog.close")} aria-label={t("dialog.close")}>
|
||||||
✕
|
✕
|
||||||
</button>
|
</button>
|
||||||
@@ -8422,7 +8485,10 @@ function OptionsDialog({
|
|||||||
<button
|
<button
|
||||||
key={s.id}
|
key={s.id}
|
||||||
className={`ts-options-sidebar-item${s.id === active.id ? " ts-options-sidebar-item-active" : ""}`}
|
className={`ts-options-sidebar-item${s.id === active.id ? " ts-options-sidebar-item-active" : ""}`}
|
||||||
onClick={() => onSectionChange(s.id)}
|
onClick={() => {
|
||||||
|
onSectionChange(s.id);
|
||||||
|
setMobileDetail(true);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="ts-options-sidebar-icon">{s.icon}</span>
|
<span className="ts-options-sidebar-icon">{s.icon}</span>
|
||||||
<span>{t(`options.section.${s.id}`)}</span>
|
<span>{t(`options.section.${s.id}`)}</span>
|
||||||
@@ -8872,6 +8938,17 @@ function AppInner() {
|
|||||||
const [banSeconds, setBanSeconds] = useState("0");
|
const [banSeconds, setBanSeconds] = useState("0");
|
||||||
const banBackdrop = useBackdropDismiss(() => setBanTarget(null));
|
const banBackdrop = useBackdropDismiss(() => setBanTarget(null));
|
||||||
const [demoForceMobile, setDemoForceMobile] = useState(false);
|
const [demoForceMobile, setDemoForceMobile] = useState(false);
|
||||||
|
// Phones get their own shell (header + big tree + bottom voice bar/tabs)
|
||||||
|
// instead of the squeezed desktop layout.
|
||||||
|
const [narrowScreen, setNarrowScreen] = useState(() => window.matchMedia("(max-width: 700px)").matches);
|
||||||
|
useEffect(() => {
|
||||||
|
const mq = window.matchMedia("(max-width: 700px)");
|
||||||
|
const onChange = () => setNarrowScreen(mq.matches);
|
||||||
|
mq.addEventListener("change", onChange);
|
||||||
|
return () => mq.removeEventListener("change", onChange);
|
||||||
|
}, []);
|
||||||
|
const mobile = narrowScreen || demoForceMobile;
|
||||||
|
const [mobileTab, setMobileTab] = useState<"tree" | "chat" | "info">("tree");
|
||||||
const [clientContextMenu, setClientContextMenu] = useState<{
|
const [clientContextMenu, setClientContextMenu] = useState<{
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
@@ -8903,7 +8980,7 @@ function AppInner() {
|
|||||||
? customThemes.find((th) => `custom:${th.id}` === designSelection) ?? null
|
? customThemes.find((th) => `custom:${th.id}` === designSelection) ?? null
|
||||||
: null;
|
: null;
|
||||||
// Structural base - everywhere else in the app that branches on "nova" /
|
// Structural base - everywhere else in the app that branches on "nova" /
|
||||||
// "greenteaspeak" behavior keeps working unchanged, whether that behavior
|
// "pulse" behavior keeps working unchanged, whether that behavior
|
||||||
// came from picking the builtin directly or from a custom theme on top of it.
|
// came from picking the builtin directly or from a custom theme on top of it.
|
||||||
const designTheme: DesignTheme = resolveDesignThemeBase(designSelection, customThemes);
|
const designTheme: DesignTheme = resolveDesignThemeBase(designSelection, customThemes);
|
||||||
useEffect(() => setSoundStyle(designTheme === "ide" ? "ide" : "classic"), [designTheme]);
|
useEffect(() => setSoundStyle(designTheme === "ide" ? "ide" : "classic"), [designTheme]);
|
||||||
@@ -9128,8 +9205,23 @@ function AppInner() {
|
|||||||
const entry: ClientLogEntry = { id: ++logIdRef.current, timestamp: Date.now(), category, level, message };
|
const entry: ClientLogEntry = { id: ++logIdRef.current, timestamp: Date.now(), category, level, message };
|
||||||
setLogEntries((prev) => [...prev.slice(-(MAX_LOG_ENTRIES - 1)), entry]);
|
setLogEntries((prev) => [...prev.slice(-(MAX_LOG_ENTRIES - 1)), entry]);
|
||||||
};
|
};
|
||||||
const [optionsDialogOpen, setOptionsDialogOpen] = useState(false);
|
// client.webspeak3.de/#options/konto opens Options on that section (shareable link, e.g. for the ticker).
|
||||||
const [optionsSection, setOptionsSection] = useState<string>(OPTIONS_SECTIONS[0].id);
|
const linkedOptionsSection = OPTIONS_SECTIONS.find((s) => window.location.hash === `#options/${s.id}`)?.id;
|
||||||
|
const [optionsDialogOpen, setOptionsDialogOpen] = useState(!!linkedOptionsSection);
|
||||||
|
const [optionsSection, setOptionsSection] = useState<string>(linkedOptionsSection ?? OPTIONS_SECTIONS[0].id);
|
||||||
|
useEffect(() => {
|
||||||
|
const onHash = () => {
|
||||||
|
const hash = window.location.hash;
|
||||||
|
if (hash === "#about") setAboutOpen(true);
|
||||||
|
const section = OPTIONS_SECTIONS.find((s) => hash === `#options/${s.id}`)?.id;
|
||||||
|
if (section) {
|
||||||
|
setOptionsSection(section);
|
||||||
|
setOptionsDialogOpen(true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
window.addEventListener("hashchange", onHash);
|
||||||
|
return () => window.removeEventListener("hashchange", onHash);
|
||||||
|
}, []);
|
||||||
const socketRef = useRef<WebSocket | DemoSocket | null>(null);
|
const socketRef = useRef<WebSocket | DemoSocket | null>(null);
|
||||||
/** Multi-join: one gateway WebSocket (+ connector) per session tab. */
|
/** Multi-join: one gateway WebSocket (+ connector) per session tab. */
|
||||||
const [sessionTabs, setSessionTabs] = useState<SessionTabInfo[]>([]);
|
const [sessionTabs, setSessionTabs] = useState<SessionTabInfo[]>([]);
|
||||||
@@ -10230,7 +10322,7 @@ function AppInner() {
|
|||||||
appendLog({ text: data.message, kind: "error" });
|
appendLog({ text: data.message, kind: "error" });
|
||||||
} else {
|
} else {
|
||||||
setConnecting(false);
|
setConnecting(false);
|
||||||
setConnectError(data.message);
|
setConnectError(data.code === "gateway_full" ? t("connectError.gatewayFull") : data.message);
|
||||||
updateTabMeta(sessionId, { connecting: false, connected: false });
|
updateTabMeta(sessionId, { connecting: false, connected: false });
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -12519,7 +12611,7 @@ function AppInner() {
|
|||||||
: treeClients.length;
|
: treeClients.length;
|
||||||
const novaSplash = designTheme === "nova" && !connected;
|
const novaSplash = designTheme === "nova" && !connected;
|
||||||
// Nova and IDE collapse the menubar behind a hamburger button.
|
// Nova and IDE collapse the menubar behind a hamburger button.
|
||||||
const compactMenu = designTheme === "nova" || designTheme === "ide";
|
const compactMenu = designTheme === "nova" || designTheme === "ide" || mobile;
|
||||||
const micLabel = !micOn ? t("toolbar.micEnable") : inputMuted ? t("toolbar.micUnmute") : t("toolbar.micMute");
|
const micLabel = !micOn ? t("toolbar.micEnable") : inputMuted ? t("toolbar.micUnmute") : t("toolbar.micMute");
|
||||||
const streamLabel = DEMO_MODE
|
const streamLabel = DEMO_MODE
|
||||||
? t("publish.demoUnavailable")
|
? t("publish.demoUnavailable")
|
||||||
@@ -12530,7 +12622,7 @@ function AppInner() {
|
|||||||
<div
|
<div
|
||||||
className={`ts-app ts-theme-${theme}${designThemeClassName(designTheme)}${
|
className={`ts-app ts-theme-${theme}${designThemeClassName(designTheme)}${
|
||||||
activeCustomTheme ? " ts-design-custom" : ""
|
activeCustomTheme ? " ts-design-custom" : ""
|
||||||
}${demoForceMobile ? " ts-force-mobile" : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
}${demoForceMobile ? " ts-force-mobile" : ""}${mobile ? ` ts-mobile ts-mobile-tab-${mobileTab}` : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
||||||
designTheme === "ide" && !idePixelFont ? " ts-ide-plain-font" : ""
|
designTheme === "ide" && !idePixelFont ? " ts-ide-plain-font" : ""
|
||||||
}`}
|
}`}
|
||||||
data-custom-theme={activeCustomTheme?.id}
|
data-custom-theme={activeCustomTheme?.id}
|
||||||
@@ -12542,9 +12634,9 @@ function AppInner() {
|
|||||||
<a href="https://github.com/WebSpeak3/webspeak3" target="_blank" rel="noreferrer">
|
<a href="https://github.com/WebSpeak3/webspeak3" target="_blank" rel="noreferrer">
|
||||||
Get WebSpeak3
|
Get WebSpeak3
|
||||||
</a>
|
</a>
|
||||||
<button className="ts-demo-mobile-toggle" onClick={() => setDemoForceMobile((v) => !v)}>
|
{!narrowScreen && <button className="ts-demo-mobile-toggle" onClick={() => setDemoForceMobile((v) => !v)}>
|
||||||
{demoForceMobile ? "🖥 Desktop view" : "📱 Mobile view"}
|
{demoForceMobile ? "🖥 Desktop view" : "📱 Mobile view"}
|
||||||
</button>
|
</button>}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="ts-menubar">
|
<div className="ts-menubar">
|
||||||
@@ -12563,6 +12655,11 @@ function AppInner() {
|
|||||||
className={`ts-menubar-items${compactMenu ? " ts-nova-menu-panel" : ""}${
|
className={`ts-menubar-items${compactMenu ? " ts-nova-menu-panel" : ""}${
|
||||||
novaMenuOpen ? " ts-nova-menu-panel-open" : ""
|
novaMenuOpen ? " ts-nova-menu-panel-open" : ""
|
||||||
}`}
|
}`}
|
||||||
|
// Picking an entry closes the whole ☰ panel, not just the submenu -
|
||||||
|
// otherwise it stays on top of the dialog the entry just opened.
|
||||||
|
onClick={(e) => {
|
||||||
|
if (compactMenu && (e.target as HTMLElement).closest(".ts-menu-item")) setNovaMenuOpen(false);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
||||||
<button
|
<button
|
||||||
@@ -13066,7 +13163,7 @@ function AppInner() {
|
|||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
className="ts-menu-item"
|
className="ts-menu-item"
|
||||||
href="https://hosted.weblate.org/projects/webspeak3/"
|
href="https://github.com/WebSpeak3/webspeak3#translating"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
onClick={() => setHelpMenuOpen(false)}
|
onClick={() => setHelpMenuOpen(false)}
|
||||||
@@ -13092,6 +13189,14 @@ function AppInner() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{mobile && designTheme !== "nova" && (
|
||||||
|
<div className="ts-mobile-title">
|
||||||
|
<span className="ts-mobile-title-name">{connected ? serverName || host : "WebSpeak3"}</span>
|
||||||
|
<span className={`ts-mobile-title-status${connected ? " ts-mobile-title-status-on" : ""}`}>
|
||||||
|
{connected ? ownClient?.name ?? t("design.status.connected") : t("tree.notConnected")}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{designTheme === "nova" && (
|
{designTheme === "nova" && (
|
||||||
<div className="ts-nova-topbar-server">
|
<div className="ts-nova-topbar-server">
|
||||||
<span className="ts-nova-topbar-logo">W</span>
|
<span className="ts-nova-topbar-logo">W</span>
|
||||||
@@ -13118,14 +13223,6 @@ function AppInner() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{isGreenteaSpeakTheme(designTheme) && (
|
|
||||||
<div className="gts-toolbar-brand" title="GreenTeaSpeak">
|
|
||||||
<span className="gts-toolbar-brand-mark">GTS</span>
|
|
||||||
<span className="gts-toolbar-brand-name">
|
|
||||||
{connected ? serverName || host || "GreenTeaSpeak" : "GreenTeaSpeak"}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="ts-toolbar-icons">
|
<div className="ts-toolbar-icons">
|
||||||
<div className="ts-toolbar-away" ref={awayMenuRef}>
|
<div className="ts-toolbar-away" ref={awayMenuRef}>
|
||||||
<button
|
<button
|
||||||
@@ -13364,8 +13461,8 @@ function AppInner() {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{sessionTabs.length > 0 || isGreenteaSpeakTheme(designTheme) ? (
|
{sessionTabs.length > (mobile ? 1 : 0) ? (
|
||||||
<GreenteaSpeakChrome
|
<ConnectionTabs
|
||||||
tabs={sessionTabs}
|
tabs={sessionTabs}
|
||||||
activeTabId={activeSessionId}
|
activeTabId={activeSessionId}
|
||||||
onSelectTab={switchToSession}
|
onSelectTab={switchToSession}
|
||||||
@@ -13714,7 +13811,10 @@ function AppInner() {
|
|||||||
onClearCache={handleClearCache}
|
onClearCache={handleClearCache}
|
||||||
section={optionsSection}
|
section={optionsSection}
|
||||||
onSectionChange={setOptionsSection}
|
onSectionChange={setOptionsSection}
|
||||||
onClose={() => setOptionsDialogOpen(false)}
|
onClose={() => {
|
||||||
|
setOptionsDialogOpen(false);
|
||||||
|
if (window.location.hash.startsWith("#options/")) window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
||||||
|
}}
|
||||||
designSelection={designSelection}
|
designSelection={designSelection}
|
||||||
onDesignSelectionChange={handleDesignSelectionChange}
|
onDesignSelectionChange={handleDesignSelectionChange}
|
||||||
customThemes={customThemes}
|
customThemes={customThemes}
|
||||||
@@ -13954,7 +14054,7 @@ function AppInner() {
|
|||||||
|
|
||||||
{streamSettingsOpen && (
|
{streamSettingsOpen && (
|
||||||
<StreamSettingsDialog
|
<StreamSettingsDialog
|
||||||
defaultName={`${ownClient?.name ?? "WebSpeak3"} - ${t("publish.screen")}`}
|
ownName={ownClient?.name ?? "WebSpeak3"}
|
||||||
onStart={handleStartPublishing}
|
onStart={handleStartPublishing}
|
||||||
onCancel={() => setStreamSettingsOpen(false)}
|
onCancel={() => setStreamSettingsOpen(false)}
|
||||||
/>
|
/>
|
||||||
@@ -14613,6 +14713,83 @@ function AppInner() {
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
{mobile && (
|
||||||
|
<div className="ts-mobile-bottom">
|
||||||
|
{connected ? (
|
||||||
|
<div className="ts-mobile-voicebar">
|
||||||
|
{pushToTalk && micOn && (
|
||||||
|
<button
|
||||||
|
className={`ts-mobile-voice-btn ts-mobile-ptt${pttPressed ? " ts-mobile-voice-on" : ""}`}
|
||||||
|
onPointerDown={(e) => {
|
||||||
|
e.currentTarget.setPointerCapture(e.pointerId);
|
||||||
|
setPttPressed(true);
|
||||||
|
}}
|
||||||
|
onPointerUp={() => setPttPressed(false)}
|
||||||
|
onPointerCancel={() => setPttPressed(false)}
|
||||||
|
onContextMenu={(e) => e.preventDefault()}
|
||||||
|
aria-label={t("toolbar.pushToTalk")}
|
||||||
|
aria-pressed={pttPressed}
|
||||||
|
>
|
||||||
|
<MobileIcon name="talk" />
|
||||||
|
<span className="ts-mobile-voice-label">{t("mobile.talk")}</span>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
<button
|
||||||
|
className={`ts-mobile-voice-btn${micOn && !inputMuted ? " ts-mobile-voice-on" : ""}${
|
||||||
|
micOn && inputMuted ? " ts-mobile-voice-off" : ""
|
||||||
|
}`}
|
||||||
|
onClick={handleToggleMic}
|
||||||
|
aria-label={micLabel}
|
||||||
|
>
|
||||||
|
<MobileIcon name={micOn && !inputMuted ? "mic" : "micOff"} />
|
||||||
|
<span className="ts-mobile-voice-label">{t("mobile.mic")}</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className={`ts-mobile-voice-btn${outputMuted ? " ts-mobile-voice-off" : ""}`}
|
||||||
|
onClick={handleToggleOutputMuted}
|
||||||
|
aria-label={outputMuted ? t("toolbar.unmuteSound") : t("toolbar.muteSound")}
|
||||||
|
>
|
||||||
|
<MobileIcon name={outputMuted ? "soundOff" : "sound"} />
|
||||||
|
<span className="ts-mobile-voice-label">{t("mobile.sound")}</span>
|
||||||
|
</button>
|
||||||
|
<button className="ts-mobile-voice-btn ts-mobile-voice-hangup" onClick={handleDisconnect} aria-label={t("menu.connections.disconnectCurrent")}>
|
||||||
|
<MobileIcon name="leave" />
|
||||||
|
<span className="ts-mobile-voice-label">{t("mobile.leave")}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="ts-mobile-voicebar">
|
||||||
|
<button className="ts-mobile-connect-btn" onClick={() => setConnectDialogOpen(true)} disabled={connecting}>
|
||||||
|
{t("menu.connections.connect")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<nav className="ts-mobile-tabs">
|
||||||
|
{(
|
||||||
|
[
|
||||||
|
["tree", t("mobile.tab.channels")],
|
||||||
|
["chat", t("mobile.tab.chat")],
|
||||||
|
["info", t("mobile.tab.info")],
|
||||||
|
] as const
|
||||||
|
).map(([id, label]) => (
|
||||||
|
<button
|
||||||
|
key={id}
|
||||||
|
className={`ts-mobile-tab${mobileTab === id ? " ts-mobile-tab-active" : ""}${
|
||||||
|
id === "chat" && (chatUnread.server || chatUnread.channel || Object.values(pmThreads).some((p) => p.unread))
|
||||||
|
? " ts-mobile-tab-unread"
|
||||||
|
: ""
|
||||||
|
}`}
|
||||||
|
onClick={() => setMobileTab(id)}
|
||||||
|
aria-current={mobileTab === id ? "page" : undefined}
|
||||||
|
>
|
||||||
|
<MobileIcon name={id} />
|
||||||
|
{label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="ts-log">
|
<div className="ts-log">
|
||||||
{log.slice(-50).map((entry, i) => {
|
{log.slice(-50).map((entry, i) => {
|
||||||
let text = entry.text;
|
let text = entry.text;
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
import { useT } from "./i18n";
|
||||||
|
|
||||||
|
export type ConnectionTabItem = {
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
connected?: boolean;
|
||||||
|
connecting?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Server tab strip for multi-join: one tab per open connection. */
|
||||||
|
export function ConnectionTabs({
|
||||||
|
tabs,
|
||||||
|
activeTabId,
|
||||||
|
onSelectTab,
|
||||||
|
onCloseTab,
|
||||||
|
}: {
|
||||||
|
tabs: ConnectionTabItem[];
|
||||||
|
activeTabId?: string | null;
|
||||||
|
onSelectTab?: (id: string) => void;
|
||||||
|
onCloseTab?: (id: string) => void;
|
||||||
|
}) {
|
||||||
|
const t = useT();
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="gts-connection-tabs"
|
||||||
|
role="tablist"
|
||||||
|
aria-label={t("tabs.connections")}
|
||||||
|
>
|
||||||
|
{tabs.map((tab) => {
|
||||||
|
const isActive = tab.id === (activeTabId ?? tabs[0]?.id);
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={tab.id}
|
||||||
|
role="tab"
|
||||||
|
aria-selected={isActive}
|
||||||
|
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
|
||||||
|
tab.connecting ? " gts-connection-tab-connecting" : ""
|
||||||
|
}`}
|
||||||
|
onClick={() => onSelectTab?.(tab.id)}
|
||||||
|
tabIndex={0}
|
||||||
|
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.target !== e.currentTarget) return;
|
||||||
|
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
|
||||||
|
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
|
||||||
|
else if (e.key === "Enter" || e.key === " ")
|
||||||
|
onSelectTab?.(tab.id);
|
||||||
|
else return;
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
|
title={tab.label}
|
||||||
|
>
|
||||||
|
<span className="gts-connection-tab-label">{tab.label}</span>
|
||||||
|
{onCloseTab ? (
|
||||||
|
<span
|
||||||
|
className="gts-connection-tab-close"
|
||||||
|
aria-hidden="true"
|
||||||
|
title={t("tabs.disconnect")}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
onCloseTab(tab.id);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+6
-3
@@ -5,8 +5,9 @@ import en from "./locales/en.json";
|
|||||||
import zhCN from "./locales/zh-CN.json";
|
import zhCN from "./locales/zh-CN.json";
|
||||||
import fa from "./locales/fa.json";
|
import fa from "./locales/fa.json";
|
||||||
import csCZ from "./locales/cs-CZ.json";
|
import csCZ from "./locales/cs-CZ.json";
|
||||||
|
import ru from "./locales/ru.json";
|
||||||
|
|
||||||
export type Lang = "de" | "en" | "zh-CN" | "fa" | "cs-CZ";
|
export type Lang = "de" | "en" | "zh-CN" | "fa" | "cs-CZ" | "ru";
|
||||||
const RTL_LANGS = new Set<Lang>(["fa"]);
|
const RTL_LANGS = new Set<Lang>(["fa"]);
|
||||||
export type LangPref = "auto" | Lang;
|
export type LangPref = "auto" | Lang;
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ const LANGUAGE_KEY = "webspeak3:language";
|
|||||||
// user-facing string in the app should have an entry in every file - falls
|
// user-facing string in the app should have an entry in every file - falls
|
||||||
// back to the English string (or the raw key) if a translation is missing,
|
// back to the English string (or the raw key) if a translation is missing,
|
||||||
// so a partial dictionary never blanks out the UI. Plain JSON (not inline
|
// so a partial dictionary never blanks out the UI. Plain JSON (not inline
|
||||||
// TS objects) so translation tools like Weblate can read/write these files
|
// TS objects) so translation tools can read/write these files
|
||||||
// directly.
|
// directly.
|
||||||
const translations: Record<Lang, Record<string, string>> = {
|
const translations: Record<Lang, Record<string, string>> = {
|
||||||
de,
|
de,
|
||||||
@@ -24,6 +25,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"zh-CN": zhCN,
|
"zh-CN": zhCN,
|
||||||
fa,
|
fa,
|
||||||
"cs-CZ": csCZ,
|
"cs-CZ": csCZ,
|
||||||
|
ru,
|
||||||
};
|
};
|
||||||
|
|
||||||
function detectSystemLang(): Lang {
|
function detectSystemLang(): Lang {
|
||||||
@@ -32,6 +34,7 @@ function detectSystemLang(): Lang {
|
|||||||
if (normalized.startsWith("zh")) return "zh-CN";
|
if (normalized.startsWith("zh")) return "zh-CN";
|
||||||
if (normalized.startsWith("fa")) return "fa";
|
if (normalized.startsWith("fa")) return "fa";
|
||||||
if (normalized.startsWith("cs")) return "cs-CZ";
|
if (normalized.startsWith("cs")) return "cs-CZ";
|
||||||
|
if (normalized.startsWith("ru")) return "ru";
|
||||||
return normalized.startsWith("de") ? "de" : "en";
|
return normalized.startsWith("de") ? "de" : "en";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@ export function resolveLang(pref: LangPref): Lang {
|
|||||||
|
|
||||||
export function loadLangPref(): LangPref {
|
export function loadLangPref(): LangPref {
|
||||||
const raw = localStorage.getItem(LANGUAGE_KEY);
|
const raw = localStorage.getItem(LANGUAGE_KEY);
|
||||||
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "cs-CZ" || raw === "auto" ? raw : "auto";
|
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "cs-CZ" || raw === "ru" || raw === "auto" ? raw : "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveLangPref(pref: LangPref) {
|
export function saveLangPref(pref: LangPref) {
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
// Computes a TeamSpeak client UID from a stored identity, so the Identitäten dialog
|
||||||
|
// can show it without connecting. UID = base64(sha1(base64(tomcrypt public key DER))),
|
||||||
|
// same as tsproto's EccKeyPubP256::get_uid. Accepts what an identity blob can be:
|
||||||
|
// tsclientlib's JSON ({"key": base64 scalar}), a native "<counter>V<obfuscated>" string,
|
||||||
|
// or a plain base64 tomcrypt key. Needs crypto.subtle, so null on plain-http origins.
|
||||||
|
|
||||||
|
const OBFUSCATION = new TextEncoder().encode(
|
||||||
|
"b9dfaa7bee6ac57ac7b65f1094a1c155e747327bc2fe5d51c512023fe54a280201004e90ad1daaae1075d53b7d571c30e063b5a62a4a017bb394833aa0983e6e"
|
||||||
|
);
|
||||||
|
|
||||||
|
const unb64 = (s: string) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));
|
||||||
|
const b64 = (bytes: Uint8Array) => btoa(String.fromCharCode(...bytes));
|
||||||
|
const sha1 = async (data: Uint8Array) => new Uint8Array(await crypto.subtle.digest("SHA-1", data as BufferSource));
|
||||||
|
|
||||||
|
/** One DER element at pos -> [tag, content, end]. */
|
||||||
|
function derRead(buf: Uint8Array, pos: number): [number, Uint8Array, number] {
|
||||||
|
let len = buf[pos + 1];
|
||||||
|
let start = pos + 2;
|
||||||
|
if (len & 0x80) {
|
||||||
|
const n = len & 0x7f;
|
||||||
|
len = 0;
|
||||||
|
for (let i = 0; i < n; i++) len = (len << 8) | buf[start + i];
|
||||||
|
start += n;
|
||||||
|
}
|
||||||
|
if (start + len > buf.length) throw new Error("bad der");
|
||||||
|
return [buf[pos], buf.subarray(start, start + len), start + len];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Top-level DER sequence -> its elements as [tag, content]. */
|
||||||
|
function derSequence(der: Uint8Array): [number, Uint8Array][] {
|
||||||
|
const [tag, body] = derRead(der, 0);
|
||||||
|
if (tag !== 0x30) throw new Error("no sequence");
|
||||||
|
const items: [number, Uint8Array][] = [];
|
||||||
|
for (let pos = 0; pos < body.length; ) {
|
||||||
|
const [t, content, end] = derRead(body, pos);
|
||||||
|
items.push([t, content]);
|
||||||
|
pos = end;
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
function derLength(n: number): number[] {
|
||||||
|
return n < 0x80 ? [n] : [0x81, n];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** DER INTEGER content for an unsigned big-endian number. */
|
||||||
|
function derUint(bytes: Uint8Array): Uint8Array {
|
||||||
|
let i = 0;
|
||||||
|
while (i < bytes.length - 1 && bytes[i] === 0) i++;
|
||||||
|
const trimmed = bytes.subarray(i);
|
||||||
|
return trimmed[0] & 0x80 ? Uint8Array.of(0, ...trimmed) : trimmed;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function uidFromPoint(x: Uint8Array, y: Uint8Array): Promise<string> {
|
||||||
|
const parts = [
|
||||||
|
[0x03, 0x02, 0x07, 0x00], // BIT STRING: 1 bit, 0 = public key only
|
||||||
|
[0x02, 0x01, 0x20], // INTEGER 32
|
||||||
|
[0x02, ...derLength(x.length), ...x],
|
||||||
|
[0x02, ...derLength(y.length), ...y],
|
||||||
|
].flat();
|
||||||
|
const der = Uint8Array.of(0x30, ...derLength(parts.length), ...parts);
|
||||||
|
return b64(await sha1(new TextEncoder().encode(b64(der))));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Public point from a bare P-256 scalar, via a PKCS#8 import without public key. */
|
||||||
|
async function uidFromScalar(scalar: Uint8Array): Promise<string> {
|
||||||
|
const d = new Uint8Array(32);
|
||||||
|
d.set(scalar.subarray(Math.max(0, scalar.length - 32)), 32 - Math.min(32, scalar.length));
|
||||||
|
const pkcs8 = Uint8Array.of(
|
||||||
|
...[0x30, 0x41, 0x02, 0x01, 0x00, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01],
|
||||||
|
...[0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x04, 0x27, 0x30, 0x25, 0x02, 0x01, 0x01, 0x04, 0x20],
|
||||||
|
...d
|
||||||
|
);
|
||||||
|
const key = await crypto.subtle.importKey("pkcs8", pkcs8, { name: "ECDSA", namedCurve: "P-256" }, true, ["sign"]);
|
||||||
|
const jwk = await crypto.subtle.exportKey("jwk", key);
|
||||||
|
const fromUrl = (s: string) => unb64(s.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(s.length / 4) * 4, "="));
|
||||||
|
return uidFromPoint(derUint(fromUrl(jwk.x!)), derUint(fromUrl(jwk.y!)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** tomcrypt private key DER (with or without the public point, like tsproto's from_tomcrypt). */
|
||||||
|
async function uidFromTomcrypt(der: Uint8Array): Promise<string> {
|
||||||
|
const items = derSequence(der);
|
||||||
|
const [bitTag, bits] = items[0];
|
||||||
|
if (bitTag !== 0x03) throw new Error("no bit string");
|
||||||
|
// TS3AudioBot keys set two bits and leave out the public point.
|
||||||
|
const withPoint = bits[0] === 0x07;
|
||||||
|
if (withPoint) return uidFromPoint(items[2][1], items[3][1]);
|
||||||
|
return uidFromScalar(items[2][1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deobfuscate(data: Uint8Array): Promise<Uint8Array> {
|
||||||
|
const out = data.slice();
|
||||||
|
let end = out.indexOf(0, 20);
|
||||||
|
if (end < 0) end = out.length;
|
||||||
|
const hash = await sha1(out.subarray(20, end));
|
||||||
|
for (let i = 0; i < 20; i++) out[i] ^= hash[i];
|
||||||
|
for (let i = 0; i < Math.min(out.length, 100); i++) out[i] ^= OBFUSCATION[i];
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function identityUid(blob: string): Promise<string | null> {
|
||||||
|
if (!crypto.subtle) return null;
|
||||||
|
try {
|
||||||
|
const text = blob.trim().replace(/^"|"$/g, "");
|
||||||
|
if (text.startsWith("{")) return await uidFromScalar(unb64(JSON.parse(text).key));
|
||||||
|
const native = /^\d+V(.+)$/.exec(text);
|
||||||
|
const tomcrypt = native ? atob(new TextDecoder().decode(await deobfuscate(unb64(native[1])))) : atob(text);
|
||||||
|
return await uidFromTomcrypt(Uint8Array.from(tomcrypt, (c) => c.charCodeAt(0)));
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"menu.help.about": "O WebSpeak3",
|
"menu.help.about": "O WebSpeak3",
|
||||||
"menu.help.github": "GitHub",
|
"menu.help.github": "GitHub",
|
||||||
"menu.help.changelog": "Seznam změn",
|
"menu.help.changelog": "Seznam změn",
|
||||||
"menu.help.translate": "Pomozte s překladem (Weblate)",
|
"menu.help.translate": "Pomozte s překladem (GitHub)",
|
||||||
"menu.extras.identities": "Identity",
|
"menu.extras.identities": "Identity",
|
||||||
"menu.extras.contacts": "Kontakty",
|
"menu.extras.contacts": "Kontakty",
|
||||||
"menu.extras.collectedUrls": "Shromážděné URL",
|
"menu.extras.collectedUrls": "Shromážděné URL",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"restartNotice.ack": "Rozumím",
|
"restartNotice.ack": "Rozumím",
|
||||||
"menu.extras.tos": "Podmínky používání",
|
"menu.extras.tos": "Podmínky používání",
|
||||||
"tos.title": "Podmínky používání pro client.webspeak3.de",
|
"tos.title": "Podmínky používání pro client.webspeak3.de",
|
||||||
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via browser.",
|
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via browser.",
|
||||||
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting service, and circumventing bans.",
|
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting service, and circumventing bans.",
|
||||||
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to relevant authorities.",
|
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to relevant authorities.",
|
||||||
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see",
|
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see",
|
||||||
@@ -298,8 +298,6 @@
|
|||||||
"design.theme.standard.desc": "Původní vzhled WebSpeak3.",
|
"design.theme.standard.desc": "Původní vzhled WebSpeak3.",
|
||||||
"design.theme.nova": "Nova",
|
"design.theme.nova": "Nova",
|
||||||
"design.theme.nova.desc": "Modernější tmavý vzhled se zaoblenými prvky.",
|
"design.theme.nova.desc": "Modernější tmavý vzhled se zaoblenými prvky.",
|
||||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
|
||||||
"design.theme.greenteaspeak.desc": "Klasické rozvržení klienta GreenTeaSpeak s tmavými panely a zlatou lištou nabídky.",
|
|
||||||
"design.theme.pulse": "Pulse",
|
"design.theme.pulse": "Pulse",
|
||||||
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
|
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
|
||||||
"design.theme.ide": "Command Center",
|
"design.theme.ide": "Command Center",
|
||||||
@@ -409,7 +407,8 @@
|
|||||||
"app.language.zh-CN": "简体中文",
|
"app.language.zh-CN": "简体中文",
|
||||||
"app.language.fa": "فارسی (بتا)",
|
"app.language.fa": "فارسی (بتا)",
|
||||||
"app.language.cs-CZ": "Čeština",
|
"app.language.cs-CZ": "Čeština",
|
||||||
"app.language.helpTranslate": "Missing your language or spotted wrong translation? Help out on Weblate →",
|
"app.language.ru": "Русский (бета)",
|
||||||
|
"app.language.helpTranslate": "Chybí váš jazyk nebo jste našli chybu v překladu? Takto můžete pomoct →",
|
||||||
"app.serverBanner": "Zobrazovat bannery serveru",
|
"app.serverBanner": "Zobrazovat bannery serveru",
|
||||||
"app.serverBanner.hint": "Banner se načítá přímo z adresy nastavené administrátorem serveru a tento hostitel vidí vaši IP adresu.",
|
"app.serverBanner.hint": "Banner se načítá přímo z adresy nastavené administrátorem serveru a tento hostitel vidí vaši IP adresu.",
|
||||||
"app.chatImages": "Načítat obrázky v chatu",
|
"app.chatImages": "Načítat obrázky v chatu",
|
||||||
@@ -491,10 +490,13 @@
|
|||||||
"publish.alphaTitle": "Alfa – nestabilní, může se kdykoli změnit nebo přestat fungovat",
|
"publish.alphaTitle": "Alfa – nestabilní, může se kdykoli změnit nebo přestat fungovat",
|
||||||
"publish.demoUnavailable": "Streamování není v demu dostupné – vyžaduje skutečný server TeamSpeak 6.",
|
"publish.demoUnavailable": "Streamování není v demu dostupné – vyžaduje skutečný server TeamSpeak 6.",
|
||||||
"publish.alphaNote": "Streamování je ve fázi alfa. Používá nezdokumentovaný protokol Stream/Call služby TeamSpeak 6, takže připojení, kvalita obrazu i práce s diváky mohou selhat nebo se bez upozornění změnit. Není určeno pro produkční použití.",
|
"publish.alphaNote": "Streamování je ve fázi alfa. Používá nezdokumentovaný protokol Stream/Call služby TeamSpeak 6, takže připojení, kvalita obrazu i práce s diváky mohou selhat nebo se bez upozornění změnit. Není určeno pro produkční použití.",
|
||||||
"publish.start": "Sdílet obrazovku",
|
"publish.start": "Sdílet obrazovku nebo kameru",
|
||||||
"publish.stop": "Zastavit sdílení",
|
"publish.stop": "Zastavit sdílení",
|
||||||
"publish.title": "Vaše vysílání",
|
"publish.title": "Vaše vysílání",
|
||||||
"publish.screen": "Obrazovka",
|
"publish.screen": "Obrazovka",
|
||||||
|
"publish.camera": "Kamera",
|
||||||
|
"publish.kind": "Sdílet",
|
||||||
|
"publish.kind.display": "Obrazovka / okno",
|
||||||
"publish.starting": "Spouštění…",
|
"publish.starting": "Spouštění…",
|
||||||
"publish.viewers": "Sleduje {count} diváků",
|
"publish.viewers": "Sleduje {count} diváků",
|
||||||
"publish.request.allow": "Povolit",
|
"publish.request.allow": "Povolit",
|
||||||
@@ -509,6 +511,7 @@
|
|||||||
"publish.preset": "Předvolba",
|
"publish.preset": "Předvolba",
|
||||||
"publish.preset.presentation": "Prezentace",
|
"publish.preset.presentation": "Prezentace",
|
||||||
"publish.audio": "Snímat zvuk",
|
"publish.audio": "Snímat zvuk",
|
||||||
|
"publish.audio.cameraHint": "U kamery jde tvůj zvuk jako obvykle přes mikrofon.",
|
||||||
"publish.privacy": "Soukromí",
|
"publish.privacy": "Soukromí",
|
||||||
"publish.privacy.public": "Veřejné",
|
"publish.privacy.public": "Veřejné",
|
||||||
"publish.privacy.contacts": "Kontakty",
|
"publish.privacy.contacts": "Kontakty",
|
||||||
@@ -711,6 +714,7 @@
|
|||||||
"serverContext.addFavorite": "Přidat do oblíbených",
|
"serverContext.addFavorite": "Přidat do oblíbených",
|
||||||
"serverContext.disconnect": "Odpojit",
|
"serverContext.disconnect": "Odpojit",
|
||||||
"connectError.dismiss": "Zavřít",
|
"connectError.dismiss": "Zavřít",
|
||||||
|
"connectError.gatewayFull": "Brána je právě plná. Zkus to za pár minut znovu – nebo si WebSpeak3 hostuj sám: github.com/WebSpeak3/webspeak3",
|
||||||
"dialog.close": "Zavřít",
|
"dialog.close": "Zavřít",
|
||||||
"sounds.title": "Zvuky",
|
"sounds.title": "Zvuky",
|
||||||
"sounds.subtitle": "Nastavit zvuková upozornění na události",
|
"sounds.subtitle": "Nastavit zvuková upozornění na události",
|
||||||
@@ -995,5 +999,12 @@
|
|||||||
"sync.error.pow_required": "Bezpečnostní kontrola selhala, zkus to znovu.",
|
"sync.error.pow_required": "Bezpečnostní kontrola selhala, zkus to znovu.",
|
||||||
"sync.error.conflict": "Jiné zařízení mezitím něco změnilo.",
|
"sync.error.conflict": "Jiné zařízení mezitím něco změnilo.",
|
||||||
"sync.error.payload_too_large": "Příliš mnoho dat pro synchronizaci (max. 1 MB).",
|
"sync.error.payload_too_large": "Příliš mnoho dat pro synchronizaci (max. 1 MB).",
|
||||||
"sync.error.generic": "Synchronizace selhala."
|
"sync.error.generic": "Synchronizace selhala.",
|
||||||
|
"mobile.tab.channels": "Kanály",
|
||||||
|
"mobile.tab.chat": "Chat",
|
||||||
|
"mobile.tab.info": "Info",
|
||||||
|
"mobile.mic": "Mikrofon",
|
||||||
|
"mobile.sound": "Zvuk",
|
||||||
|
"mobile.leave": "Odpojit",
|
||||||
|
"mobile.talk": "Mluvit"
|
||||||
}
|
}
|
||||||
+18
-7
@@ -19,7 +19,7 @@
|
|||||||
"menu.help.about": "Über WebSpeak3",
|
"menu.help.about": "Über WebSpeak3",
|
||||||
"menu.help.github": "GitHub",
|
"menu.help.github": "GitHub",
|
||||||
"menu.help.changelog": "Changelog",
|
"menu.help.changelog": "Changelog",
|
||||||
"menu.help.translate": "Mitübersetzen (Weblate)",
|
"menu.help.translate": "Mitübersetzen (GitHub)",
|
||||||
"menu.extras.identities": "Identitäten",
|
"menu.extras.identities": "Identitäten",
|
||||||
"menu.extras.contacts": "Kontakte",
|
"menu.extras.contacts": "Kontakte",
|
||||||
"menu.extras.collectedUrls": "Gesammelte URLs",
|
"menu.extras.collectedUrls": "Gesammelte URLs",
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
"restartNotice.ack": "Verstanden",
|
"restartNotice.ack": "Verstanden",
|
||||||
"menu.extras.tos": "Nutzungsbedingungen",
|
"menu.extras.tos": "Nutzungsbedingungen",
|
||||||
"tos.title": "Nutzungsbedingungen für client.webspeak3.de",
|
"tos.title": "Nutzungsbedingungen für client.webspeak3.de",
|
||||||
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/GreenTeaSpeak-Servern über den Browser.",
|
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/VoySpeak-Servern über den Browser.",
|
||||||
"tos.rule2": "Verboten sind insbesondere: Straftaten jeder Art, Belästigung und Hassrede, Spam und Flooding, Störung des Dienstes sowie die Umgehung von Sperren.",
|
"tos.rule2": "Verboten sind insbesondere: Straftaten jeder Art, Belästigung und Hassrede, Spam und Flooding, Störung des Dienstes sowie die Umgehung von Sperren.",
|
||||||
"tos.rule3": "Bei Verstößen kann der Zugang ohne Vorwarnung gesperrt werden; schwerwiegende Fälle werden ggf. an die zuständigen Behörden gemeldet.",
|
"tos.rule3": "Bei Verstößen kann der Zugang ohne Vorwarnung gesperrt werden; schwerwiegende Fälle werden ggf. an die zuständigen Behörden gemeldet.",
|
||||||
"tos.rule4Pre": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) und nach 90 Tagen automatisch gelöscht – siehe ",
|
"tos.rule4Pre": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) und nach 90 Tagen automatisch gelöscht – siehe ",
|
||||||
@@ -298,8 +298,6 @@
|
|||||||
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
|
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
|
||||||
"design.theme.nova": "Nova",
|
"design.theme.nova": "Nova",
|
||||||
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
|
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
|
||||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
|
||||||
"design.theme.greenteaspeak.desc": "Klassisches GreenTeaSpeak-Client-Layout mit dunklen Panels und goldener Menüleiste.",
|
|
||||||
"design.theme.pulse": "Pulse",
|
"design.theme.pulse": "Pulse",
|
||||||
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
|
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
|
||||||
"design.theme.ide": "Command Center",
|
"design.theme.ide": "Command Center",
|
||||||
@@ -409,7 +407,8 @@
|
|||||||
"app.language.zh-CN": "简体中文",
|
"app.language.zh-CN": "简体中文",
|
||||||
"app.language.fa": "فارسی (بتا)",
|
"app.language.fa": "فارسی (بتا)",
|
||||||
"app.language.cs-CZ": "Čeština",
|
"app.language.cs-CZ": "Čeština",
|
||||||
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? Hilf mit auf Weblate →",
|
"app.language.ru": "Русский (бета)",
|
||||||
|
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? So hilfst du mit →",
|
||||||
"app.serverBanner": "Server-Banner anzeigen",
|
"app.serverBanner": "Server-Banner anzeigen",
|
||||||
"app.serverBanner.hint": "Das Banner lädt direkt von der Adresse, die der Serverbetreiber eingetragen hat. Dieser Host sieht dabei deine IP-Adresse.",
|
"app.serverBanner.hint": "Das Banner lädt direkt von der Adresse, die der Serverbetreiber eingetragen hat. Dieser Host sieht dabei deine IP-Adresse.",
|
||||||
"app.chatImages": "Bilder im Chat laden",
|
"app.chatImages": "Bilder im Chat laden",
|
||||||
@@ -491,10 +490,13 @@
|
|||||||
"publish.alphaTitle": "Alpha – instabil, kann sich jederzeit ändern oder brechen",
|
"publish.alphaTitle": "Alpha – instabil, kann sich jederzeit ändern oder brechen",
|
||||||
"publish.demoUnavailable": "Übertragen ist in der Demo nicht verfügbar – dafür braucht es einen echten TeamSpeak-6-Server.",
|
"publish.demoUnavailable": "Übertragen ist in der Demo nicht verfügbar – dafür braucht es einen echten TeamSpeak-6-Server.",
|
||||||
"publish.alphaNote": "Streaming ist Alpha. Es spricht TeamSpeak 6s Stream/Call-Protokoll, das nicht dokumentiert ist – Verbindungsaufbau, Bildqualität und Zuschauerverwaltung können fehlschlagen oder sich ohne Vorankündigung ändern. Nicht für produktive Nutzung gedacht.",
|
"publish.alphaNote": "Streaming ist Alpha. Es spricht TeamSpeak 6s Stream/Call-Protokoll, das nicht dokumentiert ist – Verbindungsaufbau, Bildqualität und Zuschauerverwaltung können fehlschlagen oder sich ohne Vorankündigung ändern. Nicht für produktive Nutzung gedacht.",
|
||||||
"publish.start": "Bildschirm übertragen",
|
"publish.start": "Bildschirm oder Kamera übertragen",
|
||||||
"publish.stop": "Übertragung beenden",
|
"publish.stop": "Übertragung beenden",
|
||||||
"publish.title": "Deine Übertragung",
|
"publish.title": "Deine Übertragung",
|
||||||
"publish.screen": "Bildschirm",
|
"publish.screen": "Bildschirm",
|
||||||
|
"publish.camera": "Kamera",
|
||||||
|
"publish.kind": "Übertragen",
|
||||||
|
"publish.kind.display": "Bildschirm / Fenster",
|
||||||
"publish.starting": "Wird gestartet…",
|
"publish.starting": "Wird gestartet…",
|
||||||
"publish.viewers": "{count} Zuschauer",
|
"publish.viewers": "{count} Zuschauer",
|
||||||
"publish.request.allow": "Zulassen",
|
"publish.request.allow": "Zulassen",
|
||||||
@@ -509,6 +511,7 @@
|
|||||||
"publish.preset": "Voreinstellung",
|
"publish.preset": "Voreinstellung",
|
||||||
"publish.preset.presentation": "Präsentation",
|
"publish.preset.presentation": "Präsentation",
|
||||||
"publish.audio": "Audio aufnehmen",
|
"publish.audio": "Audio aufnehmen",
|
||||||
|
"publish.audio.cameraHint": "Bei der Kamera läuft dein Ton wie gewohnt übers Mikrofon.",
|
||||||
"publish.privacy": "Privatsphäre",
|
"publish.privacy": "Privatsphäre",
|
||||||
"publish.privacy.public": "Öffentlich",
|
"publish.privacy.public": "Öffentlich",
|
||||||
"publish.privacy.contacts": "Kontakte",
|
"publish.privacy.contacts": "Kontakte",
|
||||||
@@ -711,6 +714,7 @@
|
|||||||
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
|
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
|
||||||
"serverContext.disconnect": "Verbindung trennen",
|
"serverContext.disconnect": "Verbindung trennen",
|
||||||
"connectError.dismiss": "Schließen",
|
"connectError.dismiss": "Schließen",
|
||||||
|
"connectError.gatewayFull": "Das Gateway ist gerade voll. Versuch es in ein paar Minuten nochmal – oder hoste WebSpeak3 selbst: github.com/WebSpeak3/webspeak3",
|
||||||
"dialog.close": "Schließen",
|
"dialog.close": "Schließen",
|
||||||
"sounds.title": "Sounds",
|
"sounds.title": "Sounds",
|
||||||
"sounds.subtitle": "Sound-Benachrichtigungen für Ereignisse festlegen",
|
"sounds.subtitle": "Sound-Benachrichtigungen für Ereignisse festlegen",
|
||||||
@@ -995,5 +999,12 @@
|
|||||||
"sync.error.pow_required": "Sicherheitsprüfung fehlgeschlagen, bitte nochmal versuchen.",
|
"sync.error.pow_required": "Sicherheitsprüfung fehlgeschlagen, bitte nochmal versuchen.",
|
||||||
"sync.error.conflict": "Ein anderes Gerät hat inzwischen etwas geändert.",
|
"sync.error.conflict": "Ein anderes Gerät hat inzwischen etwas geändert.",
|
||||||
"sync.error.payload_too_large": "Zu viele Daten für die Synchronisierung (max. 1 MB).",
|
"sync.error.payload_too_large": "Zu viele Daten für die Synchronisierung (max. 1 MB).",
|
||||||
"sync.error.generic": "Synchronisierung fehlgeschlagen."
|
"sync.error.generic": "Synchronisierung fehlgeschlagen.",
|
||||||
|
"mobile.tab.channels": "Kanäle",
|
||||||
|
"mobile.tab.chat": "Chat",
|
||||||
|
"mobile.tab.info": "Info",
|
||||||
|
"mobile.mic": "Mikro",
|
||||||
|
"mobile.sound": "Ton",
|
||||||
|
"mobile.leave": "Trennen",
|
||||||
|
"mobile.talk": "Sprechen"
|
||||||
}
|
}
|
||||||
+18
-7
@@ -19,7 +19,7 @@
|
|||||||
"menu.help.about": "About WebSpeak3",
|
"menu.help.about": "About WebSpeak3",
|
||||||
"menu.help.github": "GitHub",
|
"menu.help.github": "GitHub",
|
||||||
"menu.help.changelog": "Changelog",
|
"menu.help.changelog": "Changelog",
|
||||||
"menu.help.translate": "Help translate (Weblate)",
|
"menu.help.translate": "Help translate (GitHub)",
|
||||||
"menu.extras.identities": "Identities",
|
"menu.extras.identities": "Identities",
|
||||||
"menu.extras.contacts": "Contacts",
|
"menu.extras.contacts": "Contacts",
|
||||||
"menu.extras.collectedUrls": "Collected URLs",
|
"menu.extras.collectedUrls": "Collected URLs",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"restartNotice.ack": "Got it",
|
"restartNotice.ack": "Got it",
|
||||||
"menu.extras.tos": "Terms of use",
|
"menu.extras.tos": "Terms of use",
|
||||||
"tos.title": "Terms of use for client.webspeak3.de",
|
"tos.title": "Terms of use for client.webspeak3.de",
|
||||||
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via the browser.",
|
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via the browser.",
|
||||||
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting the service, and circumventing bans.",
|
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting the service, and circumventing bans.",
|
||||||
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to the relevant authorities.",
|
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to the relevant authorities.",
|
||||||
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see the ",
|
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see the ",
|
||||||
@@ -298,8 +298,6 @@
|
|||||||
"design.theme.standard.desc": "The original WebSpeak3 design.",
|
"design.theme.standard.desc": "The original WebSpeak3 design.",
|
||||||
"design.theme.nova": "Nova",
|
"design.theme.nova": "Nova",
|
||||||
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
|
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
|
||||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
|
||||||
"design.theme.greenteaspeak.desc": "Classic GreenTeaSpeak client layout with dark panels and a gold menu bar.",
|
|
||||||
"design.theme.pulse": "Pulse",
|
"design.theme.pulse": "Pulse",
|
||||||
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
|
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
|
||||||
"design.theme.ide": "Command Center",
|
"design.theme.ide": "Command Center",
|
||||||
@@ -409,7 +407,8 @@
|
|||||||
"app.language.zh-CN": "简体中文",
|
"app.language.zh-CN": "简体中文",
|
||||||
"app.language.fa": "فارسی (بتا)",
|
"app.language.fa": "فارسی (بتا)",
|
||||||
"app.language.cs-CZ": "Čeština",
|
"app.language.cs-CZ": "Čeština",
|
||||||
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Help out on Weblate →",
|
"app.language.ru": "Русский (бета)",
|
||||||
|
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Here's how to help →",
|
||||||
"app.serverBanner": "Show server banners",
|
"app.serverBanner": "Show server banners",
|
||||||
"app.serverBanner.hint": "The banner loads straight from the address the server admin set, and that host sees your IP address.",
|
"app.serverBanner.hint": "The banner loads straight from the address the server admin set, and that host sees your IP address.",
|
||||||
"app.chatImages": "Load images in chat",
|
"app.chatImages": "Load images in chat",
|
||||||
@@ -491,10 +490,13 @@
|
|||||||
"publish.alphaTitle": "Alpha - unstable, may change or break at any time",
|
"publish.alphaTitle": "Alpha - unstable, may change or break at any time",
|
||||||
"publish.demoUnavailable": "Streaming is not available in the demo - it needs a real TeamSpeak 6 server.",
|
"publish.demoUnavailable": "Streaming is not available in the demo - it needs a real TeamSpeak 6 server.",
|
||||||
"publish.alphaNote": "Streaming is alpha. It speaks TeamSpeak 6's undocumented Stream/Call protocol, so connecting, picture quality and viewer handling can fail or change without notice. Not meant for production use.",
|
"publish.alphaNote": "Streaming is alpha. It speaks TeamSpeak 6's undocumented Stream/Call protocol, so connecting, picture quality and viewer handling can fail or change without notice. Not meant for production use.",
|
||||||
"publish.start": "Share your screen",
|
"publish.start": "Share your screen or camera",
|
||||||
"publish.stop": "Stop sharing",
|
"publish.stop": "Stop sharing",
|
||||||
"publish.title": "Your broadcast",
|
"publish.title": "Your broadcast",
|
||||||
"publish.screen": "Screen",
|
"publish.screen": "Screen",
|
||||||
|
"publish.camera": "Camera",
|
||||||
|
"publish.kind": "Share",
|
||||||
|
"publish.kind.display": "Screen / window",
|
||||||
"publish.starting": "Starting…",
|
"publish.starting": "Starting…",
|
||||||
"publish.viewers": "{count} watching",
|
"publish.viewers": "{count} watching",
|
||||||
"publish.request.allow": "Allow",
|
"publish.request.allow": "Allow",
|
||||||
@@ -509,6 +511,7 @@
|
|||||||
"publish.preset": "Preset",
|
"publish.preset": "Preset",
|
||||||
"publish.preset.presentation": "Presentation",
|
"publish.preset.presentation": "Presentation",
|
||||||
"publish.audio": "Capture audio",
|
"publish.audio": "Capture audio",
|
||||||
|
"publish.audio.cameraHint": "With the camera, your sound goes out through your microphone as usual.",
|
||||||
"publish.privacy": "Privacy",
|
"publish.privacy": "Privacy",
|
||||||
"publish.privacy.public": "Public",
|
"publish.privacy.public": "Public",
|
||||||
"publish.privacy.contacts": "Contacts",
|
"publish.privacy.contacts": "Contacts",
|
||||||
@@ -711,6 +714,7 @@
|
|||||||
"serverContext.addFavorite": "Add to favorites",
|
"serverContext.addFavorite": "Add to favorites",
|
||||||
"serverContext.disconnect": "Disconnect",
|
"serverContext.disconnect": "Disconnect",
|
||||||
"connectError.dismiss": "Dismiss",
|
"connectError.dismiss": "Dismiss",
|
||||||
|
"connectError.gatewayFull": "The gateway is full right now. Try again in a few minutes – or host WebSpeak3 yourself: github.com/WebSpeak3/webspeak3",
|
||||||
"dialog.close": "Close",
|
"dialog.close": "Close",
|
||||||
"sounds.title": "Sounds",
|
"sounds.title": "Sounds",
|
||||||
"sounds.subtitle": "Configure sound notifications for events",
|
"sounds.subtitle": "Configure sound notifications for events",
|
||||||
@@ -995,5 +999,12 @@
|
|||||||
"sync.error.pow_required": "Security check failed, please try again.",
|
"sync.error.pow_required": "Security check failed, please try again.",
|
||||||
"sync.error.conflict": "Another device changed something in the meantime.",
|
"sync.error.conflict": "Another device changed something in the meantime.",
|
||||||
"sync.error.payload_too_large": "Too much data to sync (max. 1 MB).",
|
"sync.error.payload_too_large": "Too much data to sync (max. 1 MB).",
|
||||||
"sync.error.generic": "Sync failed."
|
"sync.error.generic": "Sync failed.",
|
||||||
|
"mobile.tab.channels": "Channels",
|
||||||
|
"mobile.tab.chat": "Chat",
|
||||||
|
"mobile.tab.info": "Info",
|
||||||
|
"mobile.mic": "Mic",
|
||||||
|
"mobile.sound": "Sound",
|
||||||
|
"mobile.leave": "Leave",
|
||||||
|
"mobile.talk": "Talk"
|
||||||
}
|
}
|
||||||
+18
-7
@@ -19,7 +19,7 @@
|
|||||||
"menu.help.about": "درباره WebSpeak3",
|
"menu.help.about": "درباره WebSpeak3",
|
||||||
"menu.help.github": "گیتهاب",
|
"menu.help.github": "گیتهاب",
|
||||||
"menu.help.changelog": "تاریخچه تغییرات",
|
"menu.help.changelog": "تاریخچه تغییرات",
|
||||||
"menu.help.translate": "کمک به ترجمه (Weblate)",
|
"menu.help.translate": "کمک به ترجمه (GitHub)",
|
||||||
"menu.extras.identities": "هویتها",
|
"menu.extras.identities": "هویتها",
|
||||||
"menu.extras.contacts": "مخاطبین",
|
"menu.extras.contacts": "مخاطبین",
|
||||||
"menu.extras.collectedUrls": "لینکهای جمعآوریشده",
|
"menu.extras.collectedUrls": "لینکهای جمعآوریشده",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"restartNotice.ack": "متوجه شدم",
|
"restartNotice.ack": "متوجه شدم",
|
||||||
"menu.extras.tos": "شرایط استفاده",
|
"menu.extras.tos": "شرایط استفاده",
|
||||||
"tos.title": "شرایط استفاده از client.webspeak3.de",
|
"tos.title": "شرایط استفاده از client.webspeak3.de",
|
||||||
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/GreenTeaSpeak از طریق مرورگر است.",
|
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/VoySpeak از طریق مرورگر است.",
|
||||||
"tos.rule2": "بهطور خاص ممنوع است: هرگونه فعالیت مجرمانه، آزار و سخنان نفرتپراکنانه، اسپم و سیل پیام، ایجاد اختلال در سرویس، و دور زدن مسدودیتها.",
|
"tos.rule2": "بهطور خاص ممنوع است: هرگونه فعالیت مجرمانه، آزار و سخنان نفرتپراکنانه، اسپم و سیل پیام، ایجاد اختلال در سرویس، و دور زدن مسدودیتها.",
|
||||||
"tos.rule3": "تخلفات ممکن است بدون هشدار منجر به مسدود شدن دسترسی شوند؛ در موارد جدی، گزارش به مراجع ذیصلاح نیز ممکن است.",
|
"tos.rule3": "تخلفات ممکن است بدون هشدار منجر به مسدود شدن دسترسی شوند؛ در موارد جدی، گزارش به مراجع ذیصلاح نیز ممکن است.",
|
||||||
"tos.rule4Pre": "بهمنظور امنیت عملیاتی و شناسایی سوءاستفاده، اطلاعات اتصال (آدرس سرور، نام سرور، زمان اتصال) ثبت میشود و پس از ۹۰ روز بهصورت خودکار حذف میشود - برای جزئیات به ",
|
"tos.rule4Pre": "بهمنظور امنیت عملیاتی و شناسایی سوءاستفاده، اطلاعات اتصال (آدرس سرور، نام سرور، زمان اتصال) ثبت میشود و پس از ۹۰ روز بهصورت خودکار حذف میشود - برای جزئیات به ",
|
||||||
@@ -298,8 +298,6 @@
|
|||||||
"design.theme.standard.desc": "طراحی اصلی WebSpeak3.",
|
"design.theme.standard.desc": "طراحی اصلی WebSpeak3.",
|
||||||
"design.theme.nova": "Nova",
|
"design.theme.nova": "Nova",
|
||||||
"design.theme.nova.desc": "طراحی مدرنتر و تیره با عناصر گرد.",
|
"design.theme.nova.desc": "طراحی مدرنتر و تیره با عناصر گرد.",
|
||||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
|
||||||
"design.theme.greenteaspeak.desc": "چیدمان کلاسیک کلاینت GreenTeaSpeak با پنلهای تیره و نوار منوی طلایی.",
|
|
||||||
"design.theme.pulse": "Pulse",
|
"design.theme.pulse": "Pulse",
|
||||||
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
|
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
|
||||||
"design.theme.ide": "Command Center",
|
"design.theme.ide": "Command Center",
|
||||||
@@ -409,7 +407,8 @@
|
|||||||
"app.language.zh-CN": "简体中文",
|
"app.language.zh-CN": "简体中文",
|
||||||
"app.language.fa": "فارسی (بتا)",
|
"app.language.fa": "فارسی (بتا)",
|
||||||
"app.language.cs-CZ": "Čeština",
|
"app.language.cs-CZ": "Čeština",
|
||||||
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمهای اشتباه دیدید؟ در Weblate کمک کنید →",
|
"app.language.ru": "Русский (бета)",
|
||||||
|
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمهای اشتباه دیدید؟ روش کمک کردن →",
|
||||||
"app.serverBanner": "نمایش بنر سرور",
|
"app.serverBanner": "نمایش بنر سرور",
|
||||||
"app.serverBanner.hint": "بنر مستقیماً از نشانیای بارگیری میشود که مدیر سرور تعیین کرده است و آن میزبان نشانی IP شما را میبیند.",
|
"app.serverBanner.hint": "بنر مستقیماً از نشانیای بارگیری میشود که مدیر سرور تعیین کرده است و آن میزبان نشانی IP شما را میبیند.",
|
||||||
"app.chatImages": "بارگیری تصاویر در گفتگو",
|
"app.chatImages": "بارگیری تصاویر در گفتگو",
|
||||||
@@ -490,10 +489,13 @@
|
|||||||
"publish.alphaTitle": "آلفا - ناپایدار، ممکن است هر زمان تغییر کند یا از کار بیفتد",
|
"publish.alphaTitle": "آلفا - ناپایدار، ممکن است هر زمان تغییر کند یا از کار بیفتد",
|
||||||
"publish.demoUnavailable": "پخش زنده در حالت دمو در دسترس نیست - به یک سرور واقعی TeamSpeak 6 نیاز دارد.",
|
"publish.demoUnavailable": "پخش زنده در حالت دمو در دسترس نیست - به یک سرور واقعی TeamSpeak 6 نیاز دارد.",
|
||||||
"publish.alphaNote": "پخش زنده در مرحله آلفا است. این ویژگی از پروتکل مستندنشده Stream/Call در TeamSpeak 6 استفاده میکند، بنابراین اتصال، کیفیت تصویر و مدیریت بینندگان ممکن است بدون اطلاع قبلی دچار خطا شوند یا تغییر کنند. برای استفاده تولیدی مناسب نیست.",
|
"publish.alphaNote": "پخش زنده در مرحله آلفا است. این ویژگی از پروتکل مستندنشده Stream/Call در TeamSpeak 6 استفاده میکند، بنابراین اتصال، کیفیت تصویر و مدیریت بینندگان ممکن است بدون اطلاع قبلی دچار خطا شوند یا تغییر کنند. برای استفاده تولیدی مناسب نیست.",
|
||||||
"publish.start": "اشتراکگذاری صفحه",
|
"publish.start": "اشتراکگذاری صفحه یا دوربین",
|
||||||
"publish.stop": "توقف اشتراکگذاری",
|
"publish.stop": "توقف اشتراکگذاری",
|
||||||
"publish.title": "پخش زنده تو",
|
"publish.title": "پخش زنده تو",
|
||||||
"publish.screen": "صفحه نمایش",
|
"publish.screen": "صفحه نمایش",
|
||||||
|
"publish.camera": "دوربین",
|
||||||
|
"publish.kind": "اشتراکگذاری",
|
||||||
|
"publish.kind.display": "صفحه / پنجره",
|
||||||
"publish.starting": "در حال شروع…",
|
"publish.starting": "در حال شروع…",
|
||||||
"publish.viewers": "{count} بیننده",
|
"publish.viewers": "{count} بیننده",
|
||||||
"publish.request.allow": "اجازه دادن",
|
"publish.request.allow": "اجازه دادن",
|
||||||
@@ -508,6 +510,7 @@
|
|||||||
"publish.preset": "پیشتنظیم",
|
"publish.preset": "پیشتنظیم",
|
||||||
"publish.preset.presentation": "ارائه",
|
"publish.preset.presentation": "ارائه",
|
||||||
"publish.audio": "ضبط صدا",
|
"publish.audio": "ضبط صدا",
|
||||||
|
"publish.audio.cameraHint": "با دوربین، صدای شما مثل همیشه از طریق میکروفون ارسال میشود.",
|
||||||
"publish.privacy": "حریم خصوصی",
|
"publish.privacy": "حریم خصوصی",
|
||||||
"publish.privacy.public": "عمومی",
|
"publish.privacy.public": "عمومی",
|
||||||
"publish.privacy.contacts": "مخاطبین",
|
"publish.privacy.contacts": "مخاطبین",
|
||||||
@@ -710,6 +713,7 @@
|
|||||||
"serverContext.addFavorite": "افزودن به نشانکها",
|
"serverContext.addFavorite": "افزودن به نشانکها",
|
||||||
"serverContext.disconnect": "قطع اتصال",
|
"serverContext.disconnect": "قطع اتصال",
|
||||||
"connectError.dismiss": "رد کردن",
|
"connectError.dismiss": "رد کردن",
|
||||||
|
"connectError.gatewayFull": "گیتوی در حال حاضر پر است. چند دقیقه دیگر دوباره امتحان کنید – یا WebSpeak3 را خودتان میزبانی کنید: github.com/WebSpeak3/webspeak3",
|
||||||
"dialog.close": "بستن",
|
"dialog.close": "بستن",
|
||||||
"sounds.title": "صداها",
|
"sounds.title": "صداها",
|
||||||
"sounds.subtitle": "پیکربندی اعلانهای صوتی برای رویدادها",
|
"sounds.subtitle": "پیکربندی اعلانهای صوتی برای رویدادها",
|
||||||
@@ -994,5 +998,12 @@
|
|||||||
"sync.error.pow_required": "بررسی امنیتی ناموفق بود، دوباره امتحان کن.",
|
"sync.error.pow_required": "بررسی امنیتی ناموفق بود، دوباره امتحان کن.",
|
||||||
"sync.error.conflict": "دستگاه دیگری در این فاصله چیزی را تغییر داده است.",
|
"sync.error.conflict": "دستگاه دیگری در این فاصله چیزی را تغییر داده است.",
|
||||||
"sync.error.payload_too_large": "داده برای همگامسازی بیش از حد است (حداکثر ۱ مگابایت).",
|
"sync.error.payload_too_large": "داده برای همگامسازی بیش از حد است (حداکثر ۱ مگابایت).",
|
||||||
"sync.error.generic": "همگامسازی ناموفق بود."
|
"sync.error.generic": "همگامسازی ناموفق بود.",
|
||||||
|
"mobile.tab.channels": "کانالها",
|
||||||
|
"mobile.tab.chat": "گفتگو",
|
||||||
|
"mobile.tab.info": "اطلاعات",
|
||||||
|
"mobile.mic": "میکروفون",
|
||||||
|
"mobile.sound": "صدا",
|
||||||
|
"mobile.leave": "خروج",
|
||||||
|
"mobile.talk": "صحبت"
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -237,8 +237,6 @@
|
|||||||
"design.theme.standard.desc": "原始 WebSpeak3 设计。",
|
"design.theme.standard.desc": "原始 WebSpeak3 设计。",
|
||||||
"design.theme.nova": "Nova",
|
"design.theme.nova": "Nova",
|
||||||
"design.theme.nova.desc": "更现代的深色设计,带圆角元素。",
|
"design.theme.nova.desc": "更现代的深色设计,带圆角元素。",
|
||||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
|
||||||
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
|
|
||||||
"design.theme.pulse": "Pulse",
|
"design.theme.pulse": "Pulse",
|
||||||
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
|
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
|
||||||
"design.theme.ide": "Command Center",
|
"design.theme.ide": "Command Center",
|
||||||
@@ -303,7 +301,8 @@
|
|||||||
"app.language.zh-CN": "简体中文",
|
"app.language.zh-CN": "简体中文",
|
||||||
"app.language.fa": "فارسی (بتا)",
|
"app.language.fa": "فارسی (بتا)",
|
||||||
"app.language.cs-CZ": "Čeština",
|
"app.language.cs-CZ": "Čeština",
|
||||||
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?欢迎到 Weblate 参与改进 →",
|
"app.language.ru": "Русский (бета)",
|
||||||
|
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?了解如何参与 →",
|
||||||
"app.serverBanner": "显示服务器横幅",
|
"app.serverBanner": "显示服务器横幅",
|
||||||
"app.serverBanner.hint": "横幅直接从服务器管理员设置的地址加载,该主机会看到你的 IP 地址。",
|
"app.serverBanner.hint": "横幅直接从服务器管理员设置的地址加载,该主机会看到你的 IP 地址。",
|
||||||
"app.chatImages": "在聊天中加载图片",
|
"app.chatImages": "在聊天中加载图片",
|
||||||
@@ -556,6 +555,7 @@
|
|||||||
"serverContext.addFavorite": "添加到收藏夹",
|
"serverContext.addFavorite": "添加到收藏夹",
|
||||||
"serverContext.disconnect": "断开连接",
|
"serverContext.disconnect": "断开连接",
|
||||||
"connectError.dismiss": "关闭",
|
"connectError.dismiss": "关闭",
|
||||||
|
"connectError.gatewayFull": "网关当前已满。请几分钟后再试,或自行部署 WebSpeak3:github.com/WebSpeak3/webspeak3",
|
||||||
"dialog.close": "关闭",
|
"dialog.close": "关闭",
|
||||||
"sounds.title": "声音",
|
"sounds.title": "声音",
|
||||||
"sounds.subtitle": "配置事件提示音",
|
"sounds.subtitle": "配置事件提示音",
|
||||||
@@ -593,7 +593,7 @@
|
|||||||
"menu.help.about": "关于 WebSpeak3",
|
"menu.help.about": "关于 WebSpeak3",
|
||||||
"menu.help.github": "GitHub",
|
"menu.help.github": "GitHub",
|
||||||
"menu.help.changelog": "更新日志",
|
"menu.help.changelog": "更新日志",
|
||||||
"menu.help.translate": "参与翻译(Weblate)",
|
"menu.help.translate": "参与翻译(GitHub)",
|
||||||
"menu.extras.feedback": "发送反馈",
|
"menu.extras.feedback": "发送反馈",
|
||||||
"feedback.fab.nudge": "你觉得 WebSpeak3 怎么样?欢迎反馈!",
|
"feedback.fab.nudge": "你觉得 WebSpeak3 怎么样?欢迎反馈!",
|
||||||
"donate.label": "捐助",
|
"donate.label": "捐助",
|
||||||
@@ -633,7 +633,7 @@
|
|||||||
"restartNotice.ack": "知道了",
|
"restartNotice.ack": "知道了",
|
||||||
"menu.extras.tos": "使用条款",
|
"menu.extras.tos": "使用条款",
|
||||||
"tos.title": "client.webspeak3.de 使用条款",
|
"tos.title": "client.webspeak3.de 使用条款",
|
||||||
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / GreenTeaSpeak 服务器。",
|
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / VoySpeak 服务器。",
|
||||||
"tos.rule2": "尤其禁止:任何违法行为、骚扰与仇恨言论、垃圾信息与刷屏、干扰服务运行,以及规避封禁。",
|
"tos.rule2": "尤其禁止:任何违法行为、骚扰与仇恨言论、垃圾信息与刷屏、干扰服务运行,以及规避封禁。",
|
||||||
"tos.rule3": "违规可能导致访问权限被无预警封禁;严重情况可能会上报相关部门。",
|
"tos.rule3": "违规可能导致访问权限被无预警封禁;严重情况可能会上报相关部门。",
|
||||||
"tos.rule4Pre": "出于运行安全和滥用检测的目的,连接信息(服务器地址、服务器名称、连接时间)会被记录,并在 90 天后自动删除 —— 详见",
|
"tos.rule4Pre": "出于运行安全和滥用检测的目的,连接信息(服务器地址、服务器名称、连接时间)会被记录,并在 90 天后自动删除 —— 详见",
|
||||||
@@ -702,10 +702,13 @@
|
|||||||
"publish.alphaTitle": "内测阶段 —— 不稳定,可能随时变更或失效",
|
"publish.alphaTitle": "内测阶段 —— 不稳定,可能随时变更或失效",
|
||||||
"publish.demoUnavailable": "演示模式下无法使用直播功能 —— 需要真实的 TeamSpeak 6 服务器。",
|
"publish.demoUnavailable": "演示模式下无法使用直播功能 —— 需要真实的 TeamSpeak 6 服务器。",
|
||||||
"publish.alphaNote": "直播功能处于内测阶段,使用的是 TeamSpeak 6 未公开文档的 Stream/Call 协议,因此连接、画质和观众处理可能会出错或在无预警的情况下发生变化,不建议用于正式场合。",
|
"publish.alphaNote": "直播功能处于内测阶段,使用的是 TeamSpeak 6 未公开文档的 Stream/Call 协议,因此连接、画质和观众处理可能会出错或在无预警的情况下发生变化,不建议用于正式场合。",
|
||||||
"publish.start": "共享屏幕",
|
"publish.start": "共享屏幕或摄像头",
|
||||||
"publish.stop": "停止共享",
|
"publish.stop": "停止共享",
|
||||||
"publish.title": "你的直播",
|
"publish.title": "你的直播",
|
||||||
"publish.screen": "屏幕",
|
"publish.screen": "屏幕",
|
||||||
|
"publish.camera": "摄像头",
|
||||||
|
"publish.kind": "共享内容",
|
||||||
|
"publish.kind.display": "屏幕 / 窗口",
|
||||||
"publish.starting": "启动中…",
|
"publish.starting": "启动中…",
|
||||||
"publish.viewers": "{count} 人观看",
|
"publish.viewers": "{count} 人观看",
|
||||||
"publish.request.allow": "允许",
|
"publish.request.allow": "允许",
|
||||||
@@ -720,6 +723,7 @@
|
|||||||
"publish.preset": "预设",
|
"publish.preset": "预设",
|
||||||
"publish.preset.presentation": "演示",
|
"publish.preset.presentation": "演示",
|
||||||
"publish.audio": "采集音频",
|
"publish.audio": "采集音频",
|
||||||
|
"publish.audio.cameraHint": "使用摄像头时,你的声音照常通过麦克风发送。",
|
||||||
"publish.privacy": "可见范围",
|
"publish.privacy": "可见范围",
|
||||||
"publish.privacy.public": "公开",
|
"publish.privacy.public": "公开",
|
||||||
"publish.privacy.contacts": "联系人",
|
"publish.privacy.contacts": "联系人",
|
||||||
@@ -994,5 +998,12 @@
|
|||||||
"sync.error.pow_required": "安全检查失败,请重试。",
|
"sync.error.pow_required": "安全检查失败,请重试。",
|
||||||
"sync.error.conflict": "另一台设备在此期间做了更改。",
|
"sync.error.conflict": "另一台设备在此期间做了更改。",
|
||||||
"sync.error.payload_too_large": "同步数据过多(最多 1 MB)。",
|
"sync.error.payload_too_large": "同步数据过多(最多 1 MB)。",
|
||||||
"sync.error.generic": "同步失败。"
|
"sync.error.generic": "同步失败。",
|
||||||
|
"mobile.tab.channels": "频道",
|
||||||
|
"mobile.tab.chat": "聊天",
|
||||||
|
"mobile.tab.info": "信息",
|
||||||
|
"mobile.mic": "麦克风",
|
||||||
|
"mobile.sound": "声音",
|
||||||
|
"mobile.leave": "断开",
|
||||||
|
"mobile.talk": "说话"
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ import './storageFallback'
|
|||||||
import { StrictMode, useState, type FormEvent, type ReactNode } from 'react'
|
import { StrictMode, useState, type FormEvent, type ReactNode } from 'react'
|
||||||
import { createRoot } from 'react-dom/client'
|
import { createRoot } from 'react-dom/client'
|
||||||
import './index.css'
|
import './index.css'
|
||||||
import './styles/greenteaspeak.css'
|
|
||||||
import './App.css'
|
import './App.css'
|
||||||
import { LanguageProvider, useT } from './i18n'
|
import { LanguageProvider, useT } from './i18n'
|
||||||
import { discardVault, hasVault, unlockVault } from './vault'
|
import { discardVault, hasVault, unlockVault } from './vault'
|
||||||
|
|||||||
+15
-9
@@ -46,6 +46,8 @@ export const StreamMode = {
|
|||||||
|
|
||||||
export interface StreamPublishOptions {
|
export interface StreamPublishOptions {
|
||||||
name: string;
|
name: string;
|
||||||
|
/** Screen/window via the browser's picker, or the webcam. */
|
||||||
|
source: "display" | "camera";
|
||||||
/** Send the capture's audio track too, when the source has one. */
|
/** Send the capture's audio track too, when the source has one. */
|
||||||
audio: boolean;
|
audio: boolean;
|
||||||
/** One of StreamAccess. */
|
/** One of StreamAccess. */
|
||||||
@@ -112,15 +114,16 @@ export class StreamPublisher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Captures a screen and announces the stream.
|
* Captures a screen or the webcam and announces the stream.
|
||||||
*
|
*
|
||||||
* `getDisplayMedia` is secure-context-only, so this throws on a plain-http
|
* Both capture APIs are secure-context-only, so this fails on a plain-http
|
||||||
* origin - the same limitation the microphone already has.
|
* origin - the same limitation the microphone already has.
|
||||||
*/
|
*/
|
||||||
async start(options: StreamPublishOptions): Promise<void> {
|
async start(options: StreamPublishOptions): Promise<void> {
|
||||||
if (this.state === "live" || this.state === "starting") return;
|
if (this.state === "live" || this.state === "starting") return;
|
||||||
if (!navigator.mediaDevices?.getDisplayMedia) {
|
const camera = options.source === "camera";
|
||||||
this.fail("Screen sharing requires HTTPS (or localhost) - the site is not a secure context.");
|
if (!(camera ? navigator.mediaDevices?.getUserMedia : navigator.mediaDevices?.getDisplayMedia)) {
|
||||||
|
this.fail("Streaming requires HTTPS (or localhost) - the site is not a secure context.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,13 +135,15 @@ export class StreamPublisher {
|
|||||||
if (options.fps > 0) video.frameRate = { ideal: options.fps };
|
if (options.fps > 0) video.frameRate = { ideal: options.fps };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.media = await navigator.mediaDevices.getDisplayMedia({
|
const constraints = { video: Object.keys(video).length > 0 ? video : true };
|
||||||
video: Object.keys(video).length > 0 ? video : true,
|
// A camera's "audio" would be the microphone, which already goes out as
|
||||||
audio: options.audio,
|
// voice - sending it again would only echo.
|
||||||
});
|
this.media = camera
|
||||||
|
? await navigator.mediaDevices.getUserMedia({ ...constraints, audio: false })
|
||||||
|
: await navigator.mediaDevices.getDisplayMedia({ ...constraints, audio: options.audio });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.setState("idle");
|
this.setState("idle");
|
||||||
this.fail(`Could not capture the screen: ${describe(err)}`);
|
this.fail(`Could not capture the ${camera ? "camera" : "screen"}: ${describe(err)}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,6 +428,7 @@ export class StreamPublisher {
|
|||||||
* advance. A browser tab has no TS6 equivalent and reads closest to a window.
|
* advance. A browser tab has no TS6 equivalent and reads closest to a window.
|
||||||
*/
|
*/
|
||||||
private detectSourceType(): number {
|
private detectSourceType(): number {
|
||||||
|
if (this.options?.source === "camera") return StreamSource.CAMERA;
|
||||||
const surface = this.media?.getVideoTracks()[0]?.getSettings().displaySurface;
|
const surface = this.media?.getVideoTracks()[0]?.getSettings().displaySurface;
|
||||||
return surface === "monitor" ? StreamSource.SCREEN : StreamSource.WINDOW;
|
return surface === "monitor" ? StreamSource.SCREEN : StreamSource.WINDOW;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,98 +0,0 @@
|
|||||||
import type { ReactNode } from "react";
|
|
||||||
import { useT } from "../../i18n";
|
|
||||||
|
|
||||||
export type ConnectionTabItem = {
|
|
||||||
id: string;
|
|
||||||
label: string;
|
|
||||||
connected?: boolean;
|
|
||||||
connecting?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type GreenteaSpeakChromeProps = {
|
|
||||||
/** @deprecated Prefer `tabs` + `activeTabId` for multi-join. */
|
|
||||||
connected?: boolean;
|
|
||||||
/** @deprecated Prefer `tabs`. */
|
|
||||||
serverName?: string;
|
|
||||||
tabs?: ConnectionTabItem[];
|
|
||||||
activeTabId?: string | null;
|
|
||||||
onSelectTab?: (id: string) => void;
|
|
||||||
onCloseTab?: (id: string) => void;
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GTS branding chrome: connection-tab strip (multi-join) + brand label when empty.
|
|
||||||
* Renders children unchanged — WebSpeak keeps its own React state/handlers.
|
|
||||||
*/
|
|
||||||
export function GreenteaSpeakChrome({
|
|
||||||
connected,
|
|
||||||
serverName,
|
|
||||||
tabs,
|
|
||||||
activeTabId,
|
|
||||||
onSelectTab,
|
|
||||||
onCloseTab,
|
|
||||||
children,
|
|
||||||
}: GreenteaSpeakChromeProps) {
|
|
||||||
const resolvedTabs: ConnectionTabItem[] =
|
|
||||||
tabs ??
|
|
||||||
(connected
|
|
||||||
? [{ id: "legacy", label: (serverName ?? "").trim() || "GreenTeaSpeak", connected: true }]
|
|
||||||
: []);
|
|
||||||
|
|
||||||
const hasTabs = resolvedTabs.length > 0;
|
|
||||||
const t = useT();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{hasTabs ? (
|
|
||||||
<div className="gts-connection-tabs" role="tablist" aria-label={t("tabs.connections")}>
|
|
||||||
{resolvedTabs.map((tab) => {
|
|
||||||
const isActive = tab.id === (activeTabId ?? resolvedTabs[0]?.id);
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={tab.id}
|
|
||||||
role="tab"
|
|
||||||
aria-selected={isActive}
|
|
||||||
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
|
|
||||||
tab.connecting ? " gts-connection-tab-connecting" : ""
|
|
||||||
}`}
|
|
||||||
onClick={() => onSelectTab?.(tab.id)}
|
|
||||||
tabIndex={0}
|
|
||||||
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
|
|
||||||
onKeyDown={(e) => {
|
|
||||||
if (e.target !== e.currentTarget) return;
|
|
||||||
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
|
|
||||||
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
|
|
||||||
else if (e.key === "Enter" || e.key === " ") onSelectTab?.(tab.id);
|
|
||||||
else return;
|
|
||||||
e.preventDefault();
|
|
||||||
}}
|
|
||||||
title={tab.label}
|
|
||||||
>
|
|
||||||
<span className="gts-connection-tab-label">{tab.label}</span>
|
|
||||||
{onCloseTab ? (
|
|
||||||
<span
|
|
||||||
className="gts-connection-tab-close"
|
|
||||||
aria-hidden="true"
|
|
||||||
title={t("tabs.disconnect")}
|
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
onCloseTab(tab.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
×
|
|
||||||
</span>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="gts-connection-tabs gts-brand-strip">
|
|
||||||
<span className="gts-brand-label">GreenTeaSpeak</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{children}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* Maps WebSpeak gateway WebSocket payloads to the shape the GreenTeaSpeak
|
|
||||||
* shell expects. The browser UI still uses App.tsx state; this module is the
|
|
||||||
* contract layer so GTS chrome never talks to Electron IPC.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export type GatewayServerType = "auto" | "teamspeak" | "teaspeak";
|
|
||||||
|
|
||||||
export type GatewayConnectPayload = {
|
|
||||||
type: "connect";
|
|
||||||
host: string;
|
|
||||||
nickname: string;
|
|
||||||
serverPassword?: string;
|
|
||||||
channelPassword?: string;
|
|
||||||
defaultChannel?: string;
|
|
||||||
identity?: string;
|
|
||||||
privilegeKey?: string;
|
|
||||||
serverType?: GatewayServerType;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type GatewayOutboundAction =
|
|
||||||
| GatewayConnectPayload
|
|
||||||
| { type: "disconnect" }
|
|
||||||
| { type: "switchChannel"; channelId: number }
|
|
||||||
| { type: "sendChat"; message: string; target?: "channel" | "server" | number }
|
|
||||||
| { type: string; [key: string]: unknown };
|
|
||||||
|
|
||||||
/** Build the connect message sent on the WebSpeak gateway socket. */
|
|
||||||
export function buildGatewayConnect(input: {
|
|
||||||
host: string;
|
|
||||||
nickname: string;
|
|
||||||
serverPassword?: string;
|
|
||||||
channelPassword?: string;
|
|
||||||
defaultChannel?: string;
|
|
||||||
identity?: string;
|
|
||||||
privilegeKey?: string;
|
|
||||||
serverType?: GatewayServerType;
|
|
||||||
}): GatewayConnectPayload {
|
|
||||||
return {
|
|
||||||
type: "connect",
|
|
||||||
host: input.host.trim(),
|
|
||||||
nickname: input.nickname.trim(),
|
|
||||||
serverPassword: input.serverPassword?.trim() || undefined,
|
|
||||||
channelPassword: input.channelPassword?.trim() || undefined,
|
|
||||||
defaultChannel: input.defaultChannel?.trim() || undefined,
|
|
||||||
identity: input.identity || undefined,
|
|
||||||
privilegeKey: input.privilegeKey?.trim() || undefined,
|
|
||||||
serverType: input.serverType || "auto",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sendGatewayAction(ws: WebSocket | null, action: GatewayOutboundAction): boolean {
|
|
||||||
if (!ws || ws.readyState !== WebSocket.OPEN) return false;
|
|
||||||
ws.send(JSON.stringify(action));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
export const GREENTEASPEAK_THEME_ID = "greenteaspeak" as const;
|
|
||||||
|
|
||||||
export function isGreenteaSpeakTheme(theme: string): boolean {
|
|
||||||
return theme === GREENTEASPEAK_THEME_ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
GreenteaSpeakChrome,
|
|
||||||
type GreenteaSpeakChromeProps,
|
|
||||||
type ConnectionTabItem,
|
|
||||||
} from "./GreenteaSpeakChrome";
|
|
||||||
|
|
||||||
export {
|
|
||||||
buildGatewayConnect,
|
|
||||||
sendGatewayAction,
|
|
||||||
type GatewayConnectPayload,
|
|
||||||
type GatewayOutboundAction,
|
|
||||||
type GatewayServerType,
|
|
||||||
} from "./gatewayAdapter";
|
|
||||||
Reference in new issue
Block a user