From 999262b6df5c5fa463e9946cfcca3a81fa0ed553 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Sun, 25 Oct 2026 20:44:59 +0000 Subject: [PATCH] Remove the GreenTeaSpeak theme; it is VoySpeak now GreenTeaSpeak was renamed to VoySpeak with new colours, so the theme no longer matches anything. The server tab strip that lived in the theme module moves to ConnectionTabs. A saved GreenTeaSpeak pick or custom-theme base falls back to Standard. Server-compat wording says VoySpeak. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- README.md | 21 +- docs/teaspeak.md | 3 +- gateway/src/store.ts | 2 +- web/src/App.css | 69 +- web/src/App.tsx | 46 +- web/src/ConnectionTabs.tsx | 72 ++ web/src/locales/cs-CZ.json | 4 +- web/src/locales/de.json | 4 +- web/src/locales/en.json | 4 +- web/src/locales/fa.json | 4 +- web/src/locales/zh-CN.json | 4 +- web/src/main.tsx | 1 - web/src/styles/greenteaspeak.css | 1047 ----------------- .../greenteaspeak/GreenteaSpeakChrome.tsx | 98 -- .../themes/greenteaspeak/gatewayAdapter.ts | 56 - web/src/themes/greenteaspeak/index.ts | 19 - 16 files changed, 171 insertions(+), 1283 deletions(-) create mode 100644 web/src/ConnectionTabs.tsx delete mode 100644 web/src/styles/greenteaspeak.css delete mode 100644 web/src/themes/greenteaspeak/GreenteaSpeakChrome.tsx delete mode 100644 web/src/themes/greenteaspeak/gatewayAdapter.ts delete mode 100644 web/src/themes/greenteaspeak/index.ts diff --git a/README.md b/README.md index bc0f7da..7c774c4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

- A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and GreenTeaSpeak servers — no install, just open a tab. + A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and VoySpeak servers — no install, just open a tab.

@@ -53,7 +53,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, -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. > Voice requires a secure context. Microphone access works on `localhost`; for @@ -63,7 +63,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 | | 🤫 **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` | @@ -80,10 +80,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 | | 🌍 **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 | -| 🔁 **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 | | ⌨️ **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** | **ALPHA · UNSTABLE** 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 @@ -108,19 +108,18 @@ gateway is required that speaks the real TS protocol on one side and 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 - tabs, voice controls. Optional GreenTeaSpeak-styled chrome for the - connection-tab strip and menu bar. + tabs, voice controls. - **`gateway/`** — Node.js/TypeScript WebSocket server. Spawns the Rust connector **per browser WebSocket** and relays newline-delimited JSON events between it and the browser. Multi-join opens one `/ws` connection per server tab (parallel connectors). - **`connector/`** — Rust binary wrapping [`tsclientlib`](https://github.com/ReSpeak/tsclientlib) (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, and Opus-encoded voice. Auto-detects the server dialect on connect (or it can be forced via `--server-type`). @@ -399,8 +398,8 @@ any way officially connected with TeamSpeak Systems GmbH. "TeamSpeak", "TS3", and related logos or names are registered trademarks of TeamSpeak Systems GmbH. Likewise, WebSpeak3 is not affiliated with, -associated with, authorized by, or endorsed by TeaSpeak or GreenTeaSpeak; -"TeaSpeak" and "GreenTeaSpeak" are names of their respective projects/ +associated with, authorized by, or endorsed by TeaSpeak or VoySpeak (formerly GreenTeaSpeak); +"TeaSpeak" and "VoySpeak" are names of their respective projects/ operators. All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them. diff --git a/docs/teaspeak.md b/docs/teaspeak.md index 76824eb..f18029d 100644 --- a/docs/teaspeak.md +++ b/docs/teaspeak.md @@ -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`. 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 - TEAMSPEAK identity handshake after crypto when needed - DNS SRV `_gts._udp` in addition to `_ts3._udp` -- Design theme **GreenTeaSpeak** (third UI style) Verified against `ts.greenteaspeak.de` (Official GreenTeaSpeak Public Server). diff --git a/gateway/src/store.ts b/gateway/src/store.ts index 8bf5ee9..9a590bb 100644 --- a/gateway/src/store.ts +++ b/gateway/src/store.ts @@ -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 // submission, say). Bounds worst case to ~300 * 450KB =~ 135MB in RAM. 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 // STORE_ADMIN_TOKEN may publish under - stops anyone else from impersonating diff --git a/web/src/App.css b/web/src/App.css index 53e9a96..1080748 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -3610,9 +3610,6 @@ input.ts-identities-uid { 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 { 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; @@ -4936,3 +4933,69 @@ input.ts-identities-uid { max-width: 100%; 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; +} diff --git a/web/src/App.tsx b/web/src/App.tsx index 65156d0..cac434e 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -232,10 +232,8 @@ import { type ChatSettings, } from "./chatlog"; import { - GREENTEASPEAK_THEME_ID, - GreenteaSpeakChrome, - isGreenteaSpeakTheme, -} from "./themes/greenteaspeak"; + ConnectionTabs, +} from "./ConnectionTabs"; import { BARE_URL_REGEX, renderBbcode, wrapUrls } from "./lib/bbcode"; import { parseChannelName, spacerDisplayName } from "./lib/spacer"; import akimoPhoto from "./assets/akimo.jpg"; @@ -498,18 +496,18 @@ const CONTINUOUS_KEY = "webspeak3:continuous-transmission"; const TYPING_ATTENUATION_KEY = "webspeak3:typing-attenuation"; const PTT_BINDING_KEY = "webspeak3:ptt-key"; const DESIGN_THEME_KEY = "webspeak3:design-theme"; -// The user's actual pick - "standard" | "nova" | "greenteaspeak" | "custom:". +// The user's actual pick - "standard" | "nova" | "pulse" | "ide" | "custom:". // 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, // before customThemes is loaded. const DESIGN_SELECTION_KEY = "webspeak3:design-selection"; 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 - * (Standard's plain chrome, Nova's collapsed menu/splash, GreenTeaSpeak shell, - * or Pulse's card/sidebar layout), and raw CSS that gets injected while it's + * (Standard's plain chrome, Nova's collapsed menu/splash, Pulse's card/sidebar + * 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 * (e.g. via flex `order`, `display:none`, overlays). */ type CustomTheme = { @@ -546,7 +544,7 @@ const STORE_SCREENSHOT_MAX_DATA_URL_LENGTH = 400_000; function isDesignTheme(value: string): value is DesignTheme { return ( - value === "standard" || value === "nova" || value === "greenteaspeak" || value === "pulse" || value === "ide" + value === "standard" || value === "nova" || value === "pulse" || value === "ide" ); } @@ -558,7 +556,9 @@ function loadDesignTheme(): DesignTheme { function resolveDesignThemeBase(selection: string, customThemes: CustomTheme[]): DesignTheme { 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"; } @@ -567,13 +567,11 @@ function designThemeClassName(theme: DesignTheme): string { if (theme === "nova") return " ts-design-nova"; if (theme === "pulse") return " ts-design-pulse"; if (theme === "ide") return " ts-design-ide"; - if (isGreenteaSpeakTheme(theme)) return " ts-design-greenteaspeak"; return ""; } function designThemeLabel(theme: DesignTheme, t: (key: string) => string): string { 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 === "ide") return t("design.theme.ide"); return t("design.theme.standard"); @@ -603,7 +601,9 @@ function saveCustomThemes(list: CustomTheme[]) { } 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 { @@ -7467,11 +7467,6 @@ function DesignPanel({ const builtins: { id: DesignTheme; name: string; desc: string }[] = [ { 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: 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: "ide", name: t("design.theme.ide"), desc: t("design.theme.ide.desc") }, ]; @@ -7562,7 +7557,6 @@ function DesignPanel({ > - @@ -8920,7 +8914,7 @@ function AppInner() { ? customThemes.find((th) => `custom:${th.id}` === designSelection) ?? null : null; // 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. const designTheme: DesignTheme = resolveDesignThemeBase(designSelection, customThemes); useEffect(() => setSoundStyle(designTheme === "ide" ? "ide" : "classic"), [designTheme]); @@ -13150,14 +13144,6 @@ function AppInner() { )} - {isGreenteaSpeakTheme(designTheme) && ( -

- GTS - - {connected ? serverName || host || "GreenTeaSpeak" : "GreenTeaSpeak"} - -
- )}