mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 01:12:49 +08:00
Compare commits
81
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9702c671e8 | ||
|
|
cd6928b407 | ||
|
|
e9ee12c7b5 | ||
|
|
804fa44ab6 | ||
|
|
563bca2a4b | ||
|
|
b14292a95d | ||
|
|
a6e2130d29 | ||
|
|
f490ca5776 | ||
|
|
24f070ce67 | ||
|
|
8c954f9540 | ||
|
|
3ad086aedd | ||
|
|
8e78ae98c9 | ||
|
|
e2c67ef23c | ||
|
|
34fdd04c1c | ||
|
|
b0eda9a22c | ||
|
|
bdfc0bcc10 | ||
|
|
6bdd0fa171 | ||
|
|
ccceacba07 | ||
|
|
f56990f033 | ||
|
|
a58a649818 | ||
|
|
a26b7e02ec | ||
|
|
386c6ad49b | ||
|
|
a8cf46f2da | ||
|
|
c5635102f0 | ||
|
|
27fbd3cd10 | ||
|
|
dfae1b53d2 | ||
|
|
e221c9d73d | ||
|
|
8ff35abdf1 | ||
|
|
bb152a9bda | ||
|
|
0b76f2e354 | ||
|
|
0ad64fd4f8 | ||
|
|
c6fbc04236 | ||
|
|
7deee1a8c3 | ||
|
|
69efb64db6 | ||
|
|
e917e8e906 | ||
|
|
5e2b2860ae | ||
|
|
80e36539f3 | ||
|
|
b70b4d1fc9 | ||
|
|
fd24ae740e | ||
|
|
c10572feda | ||
|
|
c305fc4e1e | ||
|
|
ec3a693292 | ||
|
|
6bc3dca567 | ||
|
|
0a1163d4f9 | ||
|
|
fee0169463 | ||
|
|
b7ef6f78e7 | ||
|
|
6e343c4d4c | ||
|
|
4847972c80 | ||
|
|
44450ab35f | ||
|
|
9d6dcebfa9 | ||
|
|
e26b02c449 | ||
|
|
f629666bc2 | ||
|
|
684e597529 | ||
|
|
79df26c3bc | ||
|
|
b4ec2a26b6 | ||
|
|
ecc07308f6 | ||
|
|
53ccb22189 | ||
|
|
17899ae137 | ||
|
|
ea7b97b161 | ||
|
|
6d6803d9b3 | ||
|
|
7901aafbb1 | ||
|
|
41ac845fbc | ||
|
|
0f8576ac6c | ||
|
|
db8b5ea958 | ||
|
|
203e8fba51 | ||
|
|
b9d4bd533d | ||
|
|
dbe9a3c2df | ||
|
|
bd0122812d | ||
|
|
4318ce359f | ||
|
|
181b0fc43b | ||
|
|
330ecccadb | ||
|
|
74f688aba8 | ||
|
|
a300daedeb | ||
|
|
46ae5b120e | ||
|
|
284645f18d | ||
|
|
67c4bc1072 | ||
|
|
7bcced06fd | ||
|
|
f5cb4dd160 | ||
|
|
a0ede4a12a | ||
|
|
6c1fec8dcc | ||
|
|
6c4ace585d |
No files matched your search
@@ -1,57 +0,0 @@
|
||||
name: Deploy demo to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "web/**"
|
||||
- ".github/workflows/deploy-demo.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: web
|
||||
run: npm ci
|
||||
|
||||
- name: Build (demo mode)
|
||||
working-directory: web
|
||||
env:
|
||||
VITE_DEMO_MODE: "true"
|
||||
VITE_BASE_PATH: /webspeak3/
|
||||
run: npm run build
|
||||
|
||||
- uses: actions/configure-pages@v5
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: web/dist
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -0,0 +1,52 @@
|
||||
name: Build and publish Docker image
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: docker-publish-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build and push moepchi/webspeak3
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Determine image tags
|
||||
id: tags
|
||||
run: |
|
||||
TAGS="moepchi/webspeak3:latest"
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
TAGS="$TAGS,moepchi/webspeak3:${{ github.event.release.tag_name }}"
|
||||
fi
|
||||
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Safari WebSpeak3 client check
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "web/src/**"
|
||||
- "web/index.html"
|
||||
- "web/public/**"
|
||||
- ".github/workflows/safari-check.yml"
|
||||
- "tests/safari_smoke.py"
|
||||
schedule:
|
||||
- cron: "17 5 * * 1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: safari-client-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
safari:
|
||||
name: Safari on macOS
|
||||
runs-on: macos-15
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install and build WebSpeak3 client
|
||||
working-directory: web
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Start local preview
|
||||
working-directory: web
|
||||
run: |
|
||||
npm run preview -- --host 127.0.0.1 --port 4173 > /tmp/webspeak3-preview.log 2>&1 &
|
||||
for attempt in {1..30}; do
|
||||
curl --fail --silent http://127.0.0.1:4173/ > /dev/null && exit 0
|
||||
sleep 1
|
||||
done
|
||||
cat /tmp/webspeak3-preview.log
|
||||
exit 1
|
||||
|
||||
- name: Prepare Safari automation
|
||||
run: |
|
||||
sudo safaridriver --enable
|
||||
python3 -m venv .venv-safari
|
||||
.venv-safari/bin/python -m pip install selenium
|
||||
|
||||
- name: Test WebSpeak3 client in Safari
|
||||
env:
|
||||
BASE_URL: http://127.0.0.1:4173/
|
||||
run: .venv-safari/bin/python tests/safari_smoke.py
|
||||
|
||||
- name: Upload Safari screenshots
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: safari-client-screenshots
|
||||
path: test-results/safari-client-*.png
|
||||
if-no-files-found: ignore
|
||||
retention-days: 14
|
||||
@@ -7,3 +7,6 @@ dist-ssr/
|
||||
.env.local
|
||||
.DS_Store
|
||||
docker-compose.override.yml
|
||||
.claude/
|
||||
CLAUDE.md
|
||||
.serena/
|
||||
+21
-1
@@ -13,6 +13,15 @@ FROM node:22-bookworm-slim AS web-builder
|
||||
WORKDIR /src/web
|
||||
COPY web/package*.json ./
|
||||
RUN npm ci
|
||||
# Vite 8 pulls in Rolldown, which ships its bundler as a platform-specific
|
||||
# optional dependency (@rolldown/binding-linux-x64-gnu here). `npm ci`
|
||||
# intermittently fails to install it due to a long-standing npm bug
|
||||
# (https://github.com/npm/cli/issues/4828) without raising a non-zero exit
|
||||
# code, so `vite build` only fails later with a confusing MODULE_NOT_FOUND.
|
||||
# Verify the binding actually loaded and self-heal via the workaround from
|
||||
# npm's own error message before wasting a full build on a broken install.
|
||||
RUN node -e "require('@rolldown/binding-linux-x64-gnu')" \
|
||||
|| (rm -rf node_modules package-lock.json && npm install)
|
||||
COPY web/ ./
|
||||
# tsc -b currently fails on pre-existing type errors unrelated to this build;
|
||||
# vite build alone is enough to produce the production bundle.
|
||||
@@ -32,7 +41,15 @@ LABEL org.opencontainers.image.title="WebSpeak3"
|
||||
LABEL org.opencontainers.image.description="Self-hosted web client for TeamSpeak 3 servers"
|
||||
WORKDIR /app
|
||||
COPY gateway/package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
# npm/npx are only needed to install the gateway's runtime deps; the
|
||||
# container never runs either afterwards, so strip them (plus npm's own
|
||||
# cache/package tree) to shrink the image and drop npm's own CVEs from the
|
||||
# final attack surface. This does mean `docker exec ... npm ...` won't work
|
||||
# for ad-hoc debugging in a running container anymore.
|
||||
RUN npm ci --omit=dev \
|
||||
&& npm cache clean --force \
|
||||
&& rm -rf /root/.npm /usr/local/lib/node_modules/npm \
|
||||
&& rm -f /usr/local/bin/npm /usr/local/bin/npx
|
||||
COPY --from=gateway-builder /src/gateway/dist ./dist
|
||||
COPY --from=connector-builder /src/connector/target/release/ts-connector /app/connector-bin/ts-connector
|
||||
COPY --from=web-builder /src/web/dist /app/web/dist
|
||||
@@ -42,4 +59,7 @@ ENV WEB_DIST=/app/web/dist
|
||||
ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
|
||||
|
||||
CMD ["node", "dist/index.js"]
|
||||
@@ -1,4 +1,4 @@
|
||||
<p align="center">
|
||||
<p align="center">
|
||||
<img src="web/public/logo.png" width="140" alt="WebSpeak3 logo">
|
||||
</p>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<a href="Dockerfile"><img src="https://img.shields.io/badge/docker-build%20passing-2496ED?logo=docker&logoColor=white" alt="Docker Build"></a>
|
||||
<a href="gateway/package.json"><img src="https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white" alt="Node Version"></a>
|
||||
<a href="connector/Cargo.toml"><img src="https://img.shields.io/badge/rust-2021-000000?logo=rust&logoColor=white" alt="Rust Version"></a>
|
||||
<img src="https://img.shields.io/badge/status-beta%20%2F%20prototype-yellow" alt="Project Status">
|
||||
<a href="https://github.com/Moepchi/webspeak3/releases"><img src="https://img.shields.io/github/v/release/Moepchi/webspeak3?include_prereleases&label=release" alt="Latest Release"></a>
|
||||
<img src="https://img.shields.io/badge/status-public%20beta-f0b429" alt="Project Status">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -17,13 +18,16 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://moepchi.github.io/webspeak3/">🕹️ Live Demo</a> ·
|
||||
<a href="#-installation">🚀 Quick Start</a> ·
|
||||
<a href="https://webspeak3.de">🌐 Website</a> ·
|
||||
<a href="https://client.webspeak3.de">💬 Open Client</a> ·
|
||||
<a href="https://demo.webspeak3.de">🕹️ Live Demo</a> ·
|
||||
<a href="#-quick-start">🚀 Quick Start</a> ·
|
||||
<a href="#-installation">📖 Installation</a> ·
|
||||
<a href="ROADMAP.md">🗺️ Roadmap</a> ·
|
||||
<a href="https://github.com/Moepchi/webspeak3/issues">🐛 Report Bug</a>
|
||||
</p>
|
||||
|
||||
> The [live demo](https://moepchi.github.io/webspeak3/) runs entirely in your browser with simulated data — no real TeamSpeak server involved. It's there to show the UI, not the real connection.
|
||||
> The [live demo](https://demo.webspeak3.de) runs entirely in your browser with simulated data — no real TeamSpeak server involved. It's there to show the UI, not the real connection.
|
||||
|
||||
---
|
||||
|
||||
@@ -31,27 +35,51 @@
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Dark Mode</th>
|
||||
<th>Light Mode</th>
|
||||
<th>Desktop</th>
|
||||
<th>Mobile</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="docs/screenshots/webspeak_dark.png" width="100%" alt="Dark mode screenshot"></td>
|
||||
<td><img src="docs/screenshots/webspeak_light.png" width="100%" alt="Light mode screenshot"></td>
|
||||
<td width="72%"><img src="docs/screenshots/webspeak_current.png" width="100%" alt="WebSpeak3 desktop client connected to a TeamSpeak server"></td>
|
||||
<td width="28%" align="center"><img src="docs/screenshots/webspeak_mobile.png" width="260" alt="WebSpeak3 mobile client connected to a TeamSpeak server"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
Run the ready-made container and open **http://localhost:8080**:
|
||||
|
||||
```bash
|
||||
docker run -d --name webspeak3 --restart unless-stopped -p 8080:8080 moepchi/webspeak3:latest
|
||||
```
|
||||
|
||||
Enter the address and port of **any reachable TeamSpeak 3 or TeamSpeak 6
|
||||
server** in the connection dialog. The TeamSpeak 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
|
||||
> access from other devices, place WebSpeak3 behind an HTTPS reverse proxy.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6 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` |
|
||||
| 💬 **Full text chat** | Channel, server-wide, and private (1:1) chat, each in its own tab |
|
||||
| 🌳 **Live channel/client tree** | Correct ordering, status icons (channel commander, away, muted, deafened), click to switch channels |
|
||||
| 💬 **Full text chat** | Channel, server-wide, and private (1:1) chat, each in its own tab — Shift+Enter for a newline |
|
||||
| 🌳 **Live channel/client tree** | Correct ordering, status icons (channel commander, away, muted, deafened), country flags, click to switch channels |
|
||||
| 🖱️ **Right-click context menu** | Private chat, poke, copy name, and whisper-target toggle straight from a client's row |
|
||||
| 📜 **Server log** | Join/leave/switch, channel-group, and channel/server-change events shown inline, like the native client |
|
||||
| 🔔 **Custom sound notifications** | Per-event sounds (connect, poke, messages, ...) with volume control and `.ts3soundpack` import |
|
||||
| 🪪 **Persistent identity** | Keeps the same client UID across sessions instead of generating a new one every connect |
|
||||
| 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status |
|
||||
| ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab |
|
||||
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
||||
| 🌍 **Localized UI** | Interface available in German, English, and Simplified Chinese, detected automatically or switchable in Options |
|
||||
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
||||
| 🔁 **Seamless reconnect** | Switch connections mid-session — old state tears down cleanly, no leaks or duplicates |
|
||||
| 🔁 **Multi-join (server tabs)** | Several TeamSpeak connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
|
||||
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs |
|
||||
|
||||
## 🧱 Tech Stack
|
||||
|
||||
@@ -81,8 +109,9 @@ Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Ru
|
||||
- **`web/`** — Vite + React frontend. TS3-lookalike UI: channel tree, chat
|
||||
tabs, voice controls.
|
||||
- **`gateway/`** — Node.js/TypeScript WebSocket server. Spawns the Rust
|
||||
connector per browser connection and relays newline-delimited JSON events
|
||||
between it and the browser.
|
||||
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/`), the actual TS3/TS6
|
||||
protocol implementation. Handles connecting, channel/client state, chat,
|
||||
@@ -90,6 +119,19 @@ Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Ru
|
||||
|
||||
</details>
|
||||
|
||||
## 🌐 Browser Support
|
||||
|
||||
| Browser | Status | Notes |
|
||||
|---|---|---|
|
||||
| Chrome / Edge / Chromium | ✅ Primary target | Recommended for the most complete audio and device support |
|
||||
| Firefox | ✅ Supported | Core client and voice functionality are supported |
|
||||
| Safari | 🧪 Experimental | Audio and microphone behavior still needs broader real-device testing |
|
||||
| Mobile Chromium | ✅ Supported | Responsive client with microphone support over HTTPS |
|
||||
| Mobile Safari | 🧪 Experimental | UI is responsive; audio behavior remains under active validation |
|
||||
|
||||
WebSpeak3 is a public beta. See the [beta roadmap](ROADMAP.md) for the current
|
||||
scope, known limitations, and the next milestones.
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### 🐳 Docker (recommended)
|
||||
@@ -182,7 +224,7 @@ npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This starts the WebSocket gateway on `ws://localhost:8080`.
|
||||
This starts the WebSocket gateway on `ws://localhost:8080`. Open **http://localhost:8080** for the UI (serves `web/dist`). After UI changes run `cd web && npm run build`, then reload. Optional Vite (`npm run dev` in `web/`, typically `:5173`) is only for HMR. `WEB_STATIC=0 npm run dev` serves API/WebSocket only.
|
||||
|
||||
**4. Install and start the web frontend**
|
||||
|
||||
@@ -195,6 +237,9 @@ npm run dev
|
||||
```
|
||||
|
||||
Vite will print a local dev URL (typically `http://localhost:5173`) — open it in a browser.
|
||||
The Vite app connects to the gateway at `ws://localhost:8080/ws`.
|
||||
|
||||
> **Preferred UI:** **http://localhost:8080** (static `web/dist` — refresh after `cd web && npm run build`). Vite `:5173` is optional HMR only.
|
||||
|
||||
**5. Connect**
|
||||
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
# WebSpeak3 Beta Roadmap
|
||||
|
||||
WebSpeak3 is a public beta: it already connects to real TeamSpeak 3 and
|
||||
TeamSpeak 6 servers, but some browser-specific behavior and less common server
|
||||
features still need wider testing.
|
||||
|
||||
This roadmap is intentionally outcome-focused. It does not promise fixed dates.
|
||||
|
||||
## Available today
|
||||
|
||||
- Connect to any reachable TS3 or TS6 server through the WebSpeak3 gateway
|
||||
- Low-latency Opus voice, voice activation, whisper, and audio-device selection
|
||||
- Live channel/client tree with status updates and context actions
|
||||
- Server, channel, and private text chat
|
||||
- Favorites, identities, contacts, pokes, away state, and reconnect
|
||||
- File transfers, local session recording, sound packs, and administration tools
|
||||
- Responsive desktop and mobile interfaces in German and English
|
||||
- Docker image and Compose-based self-hosting
|
||||
|
||||
## Experimental or still being validated
|
||||
|
||||
- Safari and Mobile Safari audio/microphone behavior
|
||||
- Uncommon TeamSpeak permission combinations and large permission sets
|
||||
- Very large servers and long-running browser sessions
|
||||
- Mobile browser behavior across a wider range of devices
|
||||
- Reverse-proxy and hosting configurations beyond the documented examples
|
||||
|
||||
## Next milestones
|
||||
|
||||
### Beta hardening
|
||||
|
||||
- Expand real-browser audio testing, especially Safari
|
||||
- Improve reconnect and recovery behavior under unstable networks
|
||||
- Continue accessibility, keyboard-navigation, and mobile usability work
|
||||
- Turn recurring deployment and compatibility reports into documentation
|
||||
|
||||
### Deployment experience
|
||||
|
||||
- Keep the one-command Docker path reliable
|
||||
- Add clearer HTTPS and reverse-proxy examples
|
||||
- Document backup and upgrade expectations for persistent browser identities
|
||||
- Improve release notes and migration guidance when configuration changes
|
||||
|
||||
### Toward a stable release
|
||||
|
||||
- Define and complete a repeatable browser compatibility checklist
|
||||
- Resolve confirmed high-impact beta issues
|
||||
- Stabilize configuration and deployment contracts
|
||||
- Publish a support matrix based on verified devices and browsers
|
||||
|
||||
## Feedback
|
||||
|
||||
Please use [GitHub Issues](https://github.com/Moepchi/webspeak3/issues) for
|
||||
reproducible bugs and feature requests. Include the browser and version,
|
||||
operating system, deployment method, and whether the issue affects voice,
|
||||
microphone access, or only the interface.
|
||||
|
||||
WebSpeak3 is independent and is not affiliated with or endorsed by TeamSpeak
|
||||
Systems GmbH.
|
||||
Generated
+2
@@ -2639,8 +2639,10 @@ dependencies = [
|
||||
"base64",
|
||||
"clap",
|
||||
"futures",
|
||||
"num-traits",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"time",
|
||||
"tokio",
|
||||
"tracing-subscriber",
|
||||
"tsclientlib",
|
||||
|
||||
@@ -13,5 +13,7 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
anyhow = "1"
|
||||
num-traits = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
base64 = "0.22"
|
||||
time = "0.3"
|
||||
+1849
-33
File diff suppressed because it is too large.
Load diff
@@ -16,3 +16,15 @@ services:
|
||||
# webspeak3:
|
||||
# ports:
|
||||
# - "8080:8080"
|
||||
|
||||
cloudflared:
|
||||
image: cloudflare/cloudflared:latest
|
||||
container_name: webspeak3-cloudflared
|
||||
restart: unless-stopped
|
||||
command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN}
|
||||
# Token comes from a gitignored .env file next to this compose file:
|
||||
# CLOUDFLARE_TUNNEL_TOKEN=eyJ...
|
||||
# No depends_on/network wiring needed - the tunnel's Public Hostname
|
||||
# config (set in the Cloudflare dashboard) points at the webspeak3
|
||||
# service by its Compose service name (http://webspeak3:8080), and
|
||||
# Compose puts both services on the same default network automatically.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 421 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -0,0 +1,24 @@
|
||||
# TeaSpeak / 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`.
|
||||
|
||||
## Implemented
|
||||
|
||||
- `--server-type teamspeak|teaspeak|auto` (connector; UI Connect dialog; gateway relay)
|
||||
- `--privilege-key` / `client_default_token` on connect
|
||||
- `clientinitiv` with **`-teaspeak` switch** (not `teaspeak=1`), `ip=unknown`, alpha bit0
|
||||
- Classic TeaSpeak crypto via **`initivexpand`** (P-256 ECDH, 20-byte IV) when the server
|
||||
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).
|
||||
|
||||
## Not yet (follow-up)
|
||||
|
||||
- TEAFORO / forum identity (`greenteaspeak.de` login + method 0)
|
||||
- Native TeaSpeak POW / `teaclient_connection.node` parity
|
||||
- GTS badges / HWID extras beyond the basic handshake
|
||||
- Forum-reject → automatic ECC identity retry (GreenTeaSpeak 2 desktop behavior)
|
||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "ts-web-gateway",
|
||||
"name": "webspeak3-gateway",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ts-web-gateway",
|
||||
"name": "webspeak3-gateway",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"ws": "^8.18.0"
|
||||
|
||||
+204
-4
@@ -3,15 +3,34 @@ import { readFile } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { WebSocketServer, type WebSocket } from "ws";
|
||||
import { Ts3Connection, type Ts3ConnectOptions } from "./ts3/connection.js";
|
||||
import { Ts3Connection, type ServerType, type Ts3ConnectOptions } from "./ts3/connection.js";
|
||||
|
||||
const SERVER_TYPES = new Set<ServerType>(["teamspeak", "teaspeak", "auto"]);
|
||||
|
||||
function parseServerType(value: unknown): ServerType | undefined {
|
||||
return typeof value === "string" && SERVER_TYPES.has(value as ServerType)
|
||||
? (value as ServerType)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
function parsePrivilegeKey(msg: { privilegeKey?: unknown; token?: unknown }): string | undefined {
|
||||
const raw = msg.privilegeKey ?? msg.token;
|
||||
if (typeof raw !== "string") return undefined;
|
||||
const trimmed = raw.trim();
|
||||
return trimmed || undefined;
|
||||
}
|
||||
|
||||
const PORT = Number(process.env.PORT ?? 8080);
|
||||
|
||||
// In production (Docker), the built web app lives alongside the gateway and
|
||||
// is served from the same port as the WebSocket endpoint, so a single
|
||||
// reverse-proxied origin (e.g. a Zoraxy subdomain) is enough for everything.
|
||||
// Local Vite dev (`npm run dev` in web/) is a separate UI on :5173 that talks
|
||||
// to this gateway only via WebSocket — do not use :8080's HTML for UI work
|
||||
// unless you rebuilt web/dist. Set WEB_STATIC=0 to serve API/WS only.
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const WEB_DIST = process.env.WEB_DIST ?? path.resolve(__dirname, "../../web/dist");
|
||||
const SERVE_STATIC = process.env.WEB_STATIC !== "0";
|
||||
|
||||
const MIME_TYPES: Record<string, string> = {
|
||||
".html": "text/html",
|
||||
@@ -24,9 +43,23 @@ const MIME_TYPES: Record<string, string> = {
|
||||
".woff2": "font/woff2",
|
||||
};
|
||||
|
||||
const DEV_HINT = `<!doctype html><html><body style="font:14px system-ui;padding:2rem;max-width:40rem">
|
||||
<h1>WebSpeak3 gateway</h1>
|
||||
<p>WebSocket: <code>/ws</code></p>
|
||||
<p>Static UI is disabled (<code>WEB_STATIC=0</code>) or <code>web/dist</code> is missing.</p>
|
||||
<p>For local development open the Vite app at <a href="http://localhost:5173/">http://localhost:5173/</a>
|
||||
(run <code>npm run dev</code> in <code>web/</code>). Rebuild with <code>npm run build</code> in <code>web/</code>
|
||||
to serve the UI from this port again.</p>
|
||||
</body></html>`;
|
||||
|
||||
const server = createServer((req, res) => {
|
||||
void (async () => {
|
||||
try {
|
||||
if (!SERVE_STATIC) {
|
||||
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
||||
res.end(DEV_HINT);
|
||||
return;
|
||||
}
|
||||
const url = new URL(req.url ?? "/", "http://localhost");
|
||||
let filePath = path.join(WEB_DIST, decodeURIComponent(url.pathname));
|
||||
if (!filePath.startsWith(WEB_DIST)) {
|
||||
@@ -45,8 +78,8 @@ const server = createServer((req, res) => {
|
||||
res.writeHead(200, { "Content-Type": MIME_TYPES[path.extname(filePath)] ?? "application/octet-stream" });
|
||||
res.end(body);
|
||||
} catch {
|
||||
res.writeHead(404);
|
||||
res.end("Not found");
|
||||
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
|
||||
res.end(DEV_HINT);
|
||||
}
|
||||
})();
|
||||
});
|
||||
@@ -55,9 +88,17 @@ const wss = new WebSocketServer({ server, path: "/ws" });
|
||||
|
||||
server.listen(PORT, () => {
|
||||
console.log(`WebSpeak3 gateway listening on http://localhost:${PORT} (WebSocket at /ws)`);
|
||||
if (SERVE_STATIC) {
|
||||
console.log(`Serving static UI from ${WEB_DIST}`);
|
||||
console.log(`Dev tip: use http://localhost:5173/ for live UI; rebuild web/dist after UI changes if you open :${PORT}`);
|
||||
} else {
|
||||
console.log(`Static UI disabled (WEB_STATIC=0) — open http://localhost:5173/ for the Vite dev UI`);
|
||||
}
|
||||
});
|
||||
|
||||
wss.on("connection", (socket: WebSocket) => {
|
||||
// One browser WebSocket ↔ one Rust connector. Multi-join in the UI opens
|
||||
// multiple /ws connections in parallel (one per server tab).
|
||||
let connection: Ts3Connection | undefined;
|
||||
|
||||
socket.on("message", async (raw) => {
|
||||
@@ -65,6 +106,16 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
|
||||
switch (msg.type) {
|
||||
case "connect": {
|
||||
// Replacing a connection on the same socket: tear down the previous
|
||||
// connector so we don't leak processes.
|
||||
if (connection) {
|
||||
try {
|
||||
await connection.disconnect();
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
connection = undefined;
|
||||
}
|
||||
const options: Ts3ConnectOptions = {
|
||||
host: msg.host,
|
||||
nickname: msg.nickname,
|
||||
@@ -72,6 +123,8 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
channelPassword: msg.channelPassword,
|
||||
defaultChannel: msg.defaultChannel,
|
||||
identity: msg.identity,
|
||||
serverType: parseServerType(msg.serverType),
|
||||
privilegeKey: parsePrivilegeKey(msg),
|
||||
};
|
||||
connection = new Ts3Connection(options);
|
||||
connection.onEvent((event) => socket.send(JSON.stringify(event)));
|
||||
@@ -79,7 +132,10 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
break;
|
||||
}
|
||||
case "switchChannel": {
|
||||
await connection?.switchChannel(msg.channelId);
|
||||
const channelId = Number(msg.channelId);
|
||||
if (Number.isFinite(channelId)) {
|
||||
await connection?.switchChannel(channelId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "sendChatMessage": {
|
||||
@@ -114,10 +170,154 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
await connection?.setOutputMuted(msg.muted);
|
||||
break;
|
||||
}
|
||||
case "setNickname": {
|
||||
await connection?.setNickname(msg.nickname);
|
||||
break;
|
||||
}
|
||||
case "setWhisperTargets": {
|
||||
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
|
||||
break;
|
||||
}
|
||||
case "getClientConnectionInfo": {
|
||||
await connection?.getClientConnectionInfo(msg.clientId);
|
||||
break;
|
||||
}
|
||||
case "getServerConnectionInfo": {
|
||||
await connection?.getServerConnectionInfo();
|
||||
break;
|
||||
}
|
||||
case "kickFromChannel": {
|
||||
await connection?.kickFromChannel(msg.clientId, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "kickFromServer": {
|
||||
await connection?.kickFromServer(msg.clientId, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "banClient": {
|
||||
await connection?.banClient(msg.clientId, msg.seconds ?? 0, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "editServer": {
|
||||
await connection?.editServer(msg.payload ?? {});
|
||||
break;
|
||||
}
|
||||
case "getServerLog": {
|
||||
await connection?.getServerLog();
|
||||
break;
|
||||
}
|
||||
case "getBanList": {
|
||||
await connection?.getBanList();
|
||||
break;
|
||||
}
|
||||
case "deleteBan": {
|
||||
await connection?.deleteBan(msg.banId);
|
||||
break;
|
||||
}
|
||||
case "deleteAllBans": {
|
||||
await connection?.deleteAllBans();
|
||||
break;
|
||||
}
|
||||
case "getComplainList": {
|
||||
await connection?.getComplainList();
|
||||
break;
|
||||
}
|
||||
case "deleteComplaint": {
|
||||
await connection?.deleteComplaint(msg.targetClientDbId, msg.fromClientDbId);
|
||||
break;
|
||||
}
|
||||
case "deleteAllComplaintsFor": {
|
||||
await connection?.deleteAllComplaintsFor(msg.targetClientDbId);
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessageList": {
|
||||
await connection?.getOfflineMessageList();
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessage": {
|
||||
await connection?.getOfflineMessage(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "sendOfflineMessage": {
|
||||
await connection?.sendOfflineMessage(msg.clientUid, msg.subject, msg.message);
|
||||
break;
|
||||
}
|
||||
case "deleteOfflineMessage": {
|
||||
await connection?.deleteOfflineMessage(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "markOfflineMessageRead": {
|
||||
await connection?.markOfflineMessageRead(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "getChannelGroupList": {
|
||||
await connection?.getChannelGroupList();
|
||||
break;
|
||||
}
|
||||
case "getServerGroupList": {
|
||||
await connection?.getServerGroupList();
|
||||
break;
|
||||
}
|
||||
case "setChannelGroup": {
|
||||
await connection?.setChannelGroup(msg.channelGroupId, msg.channelId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "addServerGroup": {
|
||||
await connection?.addServerGroup(msg.serverGroupId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "removeServerGroup": {
|
||||
await connection?.removeServerGroup(msg.serverGroupId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "serverQueryLogin": {
|
||||
await connection?.serverQueryLogin(msg.username, msg.password);
|
||||
break;
|
||||
}
|
||||
case "getPermissionOverview": {
|
||||
await connection?.getPermissionOverview();
|
||||
break;
|
||||
}
|
||||
case "getFileList": {
|
||||
await connection?.getFileList(msg.channelId, msg.path);
|
||||
break;
|
||||
}
|
||||
case "createDirectory": {
|
||||
await connection?.createDirectory(msg.channelId, msg.dirname);
|
||||
break;
|
||||
}
|
||||
case "deleteFile": {
|
||||
await connection?.deleteFile(msg.channelId, msg.name);
|
||||
break;
|
||||
}
|
||||
case "renameFile": {
|
||||
await connection?.renameFile(msg.channelId, msg.oldName, msg.newName);
|
||||
break;
|
||||
}
|
||||
case "downloadFile": {
|
||||
await connection?.downloadFile(msg.channelId, msg.path);
|
||||
break;
|
||||
}
|
||||
case "uploadFile": {
|
||||
await connection?.uploadFile(msg.channelId, msg.path, msg.dataBase64);
|
||||
break;
|
||||
}
|
||||
case "getPermissionCatalog": {
|
||||
await connection?.getPermissionCatalog();
|
||||
break;
|
||||
}
|
||||
case "getPermList": {
|
||||
await connection?.getPermList(msg.scope, msg.id1, msg.id2);
|
||||
break;
|
||||
}
|
||||
case "addPermission": {
|
||||
await connection?.addPermission(msg.scope, msg.ids, msg.permId, msg.value, msg.negated, msg.skip);
|
||||
break;
|
||||
}
|
||||
case "removePermission": {
|
||||
await connection?.removePermission(msg.scope, msg.ids, msg.permId);
|
||||
break;
|
||||
}
|
||||
case "disconnect": {
|
||||
await connection?.disconnect(msg.message ?? "");
|
||||
break;
|
||||
|
||||
@@ -32,6 +32,71 @@ export interface ClientInfo {
|
||||
awayMessage: string;
|
||||
isChannelCommander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
hasTalkPower: boolean;
|
||||
}
|
||||
|
||||
export interface GroupEntry {
|
||||
id: number;
|
||||
name: string;
|
||||
iconId: number;
|
||||
}
|
||||
|
||||
export interface PermissionOverviewEntry {
|
||||
name: string;
|
||||
description: string;
|
||||
value: number;
|
||||
negated: boolean;
|
||||
skip: boolean;
|
||||
}
|
||||
|
||||
export interface PermissionCatalogEntry {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export type PermScope = "server" | "channelgroup" | "channel" | "client" | "channelclient";
|
||||
|
||||
export interface BanListEntry {
|
||||
banId: number;
|
||||
ip: string;
|
||||
name: string;
|
||||
uid: string;
|
||||
lastNickname: string;
|
||||
created: string;
|
||||
durationSecs: number;
|
||||
invokerName: string;
|
||||
reason: string;
|
||||
enforcements: number;
|
||||
}
|
||||
|
||||
export interface ComplainListEntry {
|
||||
targetClientDbId: number;
|
||||
targetName: string;
|
||||
fromClientDbId: number;
|
||||
fromName: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export interface OfflineMessageListEntry {
|
||||
messageId: number;
|
||||
clientUid: string;
|
||||
subject: string;
|
||||
timestamp: string;
|
||||
isRead: boolean;
|
||||
}
|
||||
|
||||
export interface FileListEntry {
|
||||
path: string;
|
||||
name: string;
|
||||
size: number;
|
||||
isFile: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export type ServerLogEntry =
|
||||
@@ -53,10 +118,11 @@ export type Ts3ConnectionEvent =
|
||||
serverMaxClients: number;
|
||||
serverVersion: string;
|
||||
serverLicense: string;
|
||||
serverLicenseId: number;
|
||||
serverBannerUrl: string;
|
||||
identity: string;
|
||||
}
|
||||
| { type: "channels"; channels: ChannelInfo[]; clients: ClientInfo[] }
|
||||
| { type: "channels"; channels: ChannelInfo[]; clients: ClientInfo[]; ownClientId: number; serverMaxClients: number; serverClientsOnline: number; serverChannelsOnline: number }
|
||||
| { type: "chatMessage"; from: string; message: string }
|
||||
| { type: "serverMessage"; from: string; message: string }
|
||||
| { type: "privateMessage"; partnerId: number; partnerName: string; fromSelf: boolean; message: string }
|
||||
@@ -65,7 +131,59 @@ export type Ts3ConnectionEvent =
|
||||
| { type: "talkers"; clients: number[] }
|
||||
| { type: "disconnected"; reason: string }
|
||||
| { type: "error"; message: string }
|
||||
| ({ type: "serverLog" } & ServerLogEntry);
|
||||
| ({ type: "serverLog" } & ServerLogEntry)
|
||||
| {
|
||||
type: "clientConnectionInfo";
|
||||
clientId: number;
|
||||
pingMs: number | null;
|
||||
connectedSecs: number | null;
|
||||
ip: string | null;
|
||||
packetsSent: number;
|
||||
bytesSent: number;
|
||||
packetsReceived: number;
|
||||
bytesReceived: number;
|
||||
packetLossPercent: number;
|
||||
}
|
||||
| {
|
||||
type: "serverConnectionInfo";
|
||||
pingMs: number;
|
||||
connectedSecs: number;
|
||||
packetLossPercent: number;
|
||||
packetsSentTotal: number;
|
||||
bytesSentTotal: number;
|
||||
packetsReceivedTotal: number;
|
||||
bytesReceivedTotal: number;
|
||||
bandwidthSentLastSecond: number;
|
||||
bandwidthReceivedLastSecond: number;
|
||||
bandwidthSentLastMinute: number;
|
||||
bandwidthReceivedLastMinute: number;
|
||||
filetransferBandwidthSent: number;
|
||||
filetransferBandwidthReceived: number;
|
||||
filetransferBytesSent: number;
|
||||
filetransferBytesReceived: number;
|
||||
}
|
||||
| { type: "serverProtocolLog"; lines: string[] }
|
||||
| { type: "banList"; entries: BanListEntry[] }
|
||||
| { type: "complainList"; entries: ComplainListEntry[] }
|
||||
| { type: "offlineMessageList"; entries: OfflineMessageListEntry[] }
|
||||
| {
|
||||
type: "offlineMessage";
|
||||
messageId: number;
|
||||
clientUid: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
| { type: "channelGroupList"; entries: GroupEntry[] }
|
||||
| { type: "serverGroupList"; entries: GroupEntry[] }
|
||||
| { type: "permissionOverview"; entries: PermissionOverviewEntry[] }
|
||||
| { type: "fileList"; cid: number; path: string; entries: FileListEntry[] }
|
||||
| { type: "fileDownloadData"; cid: number; path: string; data: string }
|
||||
| { type: "fileUploadDone"; cid: number; path: string }
|
||||
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
|
||||
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] };
|
||||
|
||||
export type ServerType = "teamspeak" | "teaspeak" | "auto";
|
||||
|
||||
export interface Ts3ConnectOptions {
|
||||
host: string;
|
||||
@@ -76,6 +194,10 @@ export interface Ts3ConnectOptions {
|
||||
/** Previously-issued identity (from a prior "connected" event) to keep
|
||||
* the same client UID across sessions. Omit to get a freshly generated one. */
|
||||
identity?: string;
|
||||
/** Protocol / server dialect hint for the connector (`auto` when omitted). */
|
||||
serverType?: ServerType;
|
||||
/** One-time privilege key / token to redeem on connect. */
|
||||
privilegeKey?: string;
|
||||
}
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
@@ -107,6 +229,8 @@ export class Ts3Connection {
|
||||
if (this.options.channelPassword) args.push("--channel-password", this.options.channelPassword);
|
||||
if (this.options.defaultChannel) args.push("--default-channel", this.options.defaultChannel);
|
||||
if (this.options.identity) args.push("--identity", this.options.identity);
|
||||
if (this.options.serverType) args.push("--server-type", this.options.serverType);
|
||||
if (this.options.privilegeKey) args.push("--privilege-key", this.options.privilegeKey);
|
||||
this.child = spawn(CONNECTOR_BIN, args);
|
||||
|
||||
createInterface({ input: this.child.stdout }).on("line", (line) => {
|
||||
@@ -122,6 +246,11 @@ export class Ts3Connection {
|
||||
away_message: string;
|
||||
is_channel_commander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
database_id: number;
|
||||
channel_group: number;
|
||||
server_groups: number[];
|
||||
has_talk_power: boolean;
|
||||
}
|
||||
|
||||
interface RawChannelInfo {
|
||||
@@ -143,10 +272,19 @@ export class Ts3Connection {
|
||||
server_max_clients: number;
|
||||
server_version: string;
|
||||
server_license: string;
|
||||
server_license_id?: number;
|
||||
server_banner_url: string;
|
||||
identity: string;
|
||||
}
|
||||
| { type: "channels"; channels: RawChannelInfo[]; clients: RawClientInfo[] }
|
||||
| {
|
||||
type: "channels";
|
||||
channels: RawChannelInfo[];
|
||||
clients: RawClientInfo[];
|
||||
own_client_id?: number;
|
||||
server_max_clients?: number;
|
||||
server_clients_online?: number;
|
||||
server_channels_online?: number;
|
||||
}
|
||||
| { type: "chatMessage"; from: string; message: string }
|
||||
| { type: "serverMessage"; from: string; message: string }
|
||||
| { type: "privateMessage"; partner_id: number; partner_name: string; from_self: boolean; message: string }
|
||||
@@ -155,7 +293,93 @@ export class Ts3Connection {
|
||||
| { type: "talkers"; clients: number[] }
|
||||
| { type: "disconnected"; reason: string }
|
||||
| { type: "error"; message: string }
|
||||
| ({ type: "serverLog" } & ServerLogEntry);
|
||||
| ({ type: "serverLog" } & ServerLogEntry)
|
||||
| {
|
||||
type: "clientConnectionInfo";
|
||||
client_id: number;
|
||||
ping_ms: number | null;
|
||||
connected_secs: number | null;
|
||||
ip: string | null;
|
||||
packets_sent: number;
|
||||
bytes_sent: number;
|
||||
packets_received: number;
|
||||
bytes_received: number;
|
||||
packet_loss_percent: number;
|
||||
}
|
||||
| {
|
||||
type: "serverConnectionInfo";
|
||||
ping_ms: number;
|
||||
connected_secs: number;
|
||||
packet_loss_percent: number;
|
||||
packets_sent_total: number;
|
||||
bytes_sent_total: number;
|
||||
packets_received_total: number;
|
||||
bytes_received_total: number;
|
||||
bandwidth_sent_last_second: number;
|
||||
bandwidth_received_last_second: number;
|
||||
bandwidth_sent_last_minute?: number;
|
||||
bandwidth_received_last_minute?: number;
|
||||
filetransfer_bandwidth_sent?: number;
|
||||
filetransfer_bandwidth_received?: number;
|
||||
filetransfer_bytes_sent?: number;
|
||||
filetransfer_bytes_received?: number;
|
||||
}
|
||||
| { type: "serverProtocolLog"; lines: string[] }
|
||||
| {
|
||||
type: "banList";
|
||||
entries: {
|
||||
ban_id: number;
|
||||
ip: string;
|
||||
name: string;
|
||||
uid: string;
|
||||
last_nickname: string;
|
||||
created: string;
|
||||
duration_secs: number;
|
||||
invoker_name: string;
|
||||
reason: string;
|
||||
enforcements: number;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "complainList";
|
||||
entries: {
|
||||
target_client_db_id: number;
|
||||
target_name: string;
|
||||
from_client_db_id: number;
|
||||
from_name: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "offlineMessageList";
|
||||
entries: {
|
||||
message_id: number;
|
||||
client_uid: string;
|
||||
subject: string;
|
||||
timestamp: string;
|
||||
is_read: boolean;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "offlineMessage";
|
||||
message_id: number;
|
||||
client_uid: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
| { type: "channelGroupList"; entries: GroupEntry[] }
|
||||
| { type: "serverGroupList"; entries: GroupEntry[] }
|
||||
| {
|
||||
type: "permissionOverview";
|
||||
entries: { name: string; description: string; value: number; negated: boolean; skip: boolean }[];
|
||||
}
|
||||
| { type: "fileList"; cid: number; path: string; entries: FileListEntry[] }
|
||||
| { type: "fileDownloadData"; cid: number; path: string; data: string }
|
||||
| { type: "fileUploadDone"; cid: number; path: string }
|
||||
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
|
||||
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] };
|
||||
|
||||
if (event.type === "connected") {
|
||||
this.emit({
|
||||
@@ -165,6 +389,7 @@ export class Ts3Connection {
|
||||
serverMaxClients: event.server_max_clients,
|
||||
serverVersion: event.server_version,
|
||||
serverLicense: event.server_license,
|
||||
serverLicenseId: event.server_license_id ?? 0,
|
||||
serverBannerUrl: event.server_banner_url,
|
||||
identity: event.identity,
|
||||
});
|
||||
@@ -192,7 +417,16 @@ export class Ts3Connection {
|
||||
awayMessage: c.away_message,
|
||||
isChannelCommander: c.is_channel_commander,
|
||||
country: c.country,
|
||||
uid: c.uid,
|
||||
databaseId: c.database_id,
|
||||
channelGroup: c.channel_group,
|
||||
serverGroups: c.server_groups,
|
||||
hasTalkPower: c.has_talk_power,
|
||||
})),
|
||||
ownClientId: event.own_client_id ?? 0,
|
||||
serverMaxClients: event.server_max_clients ?? 0,
|
||||
serverClientsOnline: event.server_clients_online ?? event.clients.length,
|
||||
serverChannelsOnline: event.server_channels_online ?? event.channels.length,
|
||||
});
|
||||
} else if (event.type === "privateMessage") {
|
||||
this.emit({
|
||||
@@ -202,6 +436,86 @@ export class Ts3Connection {
|
||||
fromSelf: event.from_self,
|
||||
message: event.message,
|
||||
});
|
||||
} else if (event.type === "clientConnectionInfo") {
|
||||
this.emit({
|
||||
type: "clientConnectionInfo",
|
||||
clientId: event.client_id,
|
||||
pingMs: event.ping_ms,
|
||||
connectedSecs: event.connected_secs,
|
||||
ip: event.ip,
|
||||
packetsSent: event.packets_sent,
|
||||
bytesSent: event.bytes_sent,
|
||||
packetsReceived: event.packets_received,
|
||||
bytesReceived: event.bytes_received,
|
||||
packetLossPercent: event.packet_loss_percent,
|
||||
});
|
||||
} else if (event.type === "serverConnectionInfo") {
|
||||
this.emit({
|
||||
type: "serverConnectionInfo",
|
||||
pingMs: event.ping_ms,
|
||||
connectedSecs: event.connected_secs,
|
||||
packetLossPercent: event.packet_loss_percent,
|
||||
packetsSentTotal: event.packets_sent_total,
|
||||
bytesSentTotal: event.bytes_sent_total,
|
||||
packetsReceivedTotal: event.packets_received_total,
|
||||
bytesReceivedTotal: event.bytes_received_total,
|
||||
bandwidthSentLastSecond: event.bandwidth_sent_last_second,
|
||||
bandwidthReceivedLastSecond: event.bandwidth_received_last_second,
|
||||
bandwidthSentLastMinute: event.bandwidth_sent_last_minute ?? 0,
|
||||
bandwidthReceivedLastMinute: event.bandwidth_received_last_minute ?? 0,
|
||||
filetransferBandwidthSent: event.filetransfer_bandwidth_sent ?? 0,
|
||||
filetransferBandwidthReceived: event.filetransfer_bandwidth_received ?? 0,
|
||||
filetransferBytesSent: event.filetransfer_bytes_sent ?? 0,
|
||||
filetransferBytesReceived: event.filetransfer_bytes_received ?? 0,
|
||||
});
|
||||
} else if (event.type === "banList") {
|
||||
this.emit({
|
||||
type: "banList",
|
||||
entries: event.entries.map((e) => ({
|
||||
banId: e.ban_id,
|
||||
ip: e.ip,
|
||||
name: e.name,
|
||||
uid: e.uid,
|
||||
lastNickname: e.last_nickname,
|
||||
created: e.created,
|
||||
durationSecs: e.duration_secs,
|
||||
invokerName: e.invoker_name,
|
||||
reason: e.reason,
|
||||
enforcements: e.enforcements,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "complainList") {
|
||||
this.emit({
|
||||
type: "complainList",
|
||||
entries: event.entries.map((e) => ({
|
||||
targetClientDbId: e.target_client_db_id,
|
||||
targetName: e.target_name,
|
||||
fromClientDbId: e.from_client_db_id,
|
||||
fromName: e.from_name,
|
||||
message: e.message,
|
||||
timestamp: e.timestamp,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "offlineMessageList") {
|
||||
this.emit({
|
||||
type: "offlineMessageList",
|
||||
entries: event.entries.map((e) => ({
|
||||
messageId: e.message_id,
|
||||
clientUid: e.client_uid,
|
||||
subject: e.subject,
|
||||
timestamp: e.timestamp,
|
||||
isRead: e.is_read,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "offlineMessage") {
|
||||
this.emit({
|
||||
type: "offlineMessage",
|
||||
messageId: event.message_id,
|
||||
clientUid: event.client_uid,
|
||||
subject: event.subject,
|
||||
message: event.message,
|
||||
timestamp: event.timestamp,
|
||||
});
|
||||
} else {
|
||||
this.emit(event);
|
||||
}
|
||||
@@ -224,7 +538,197 @@ export class Ts3Connection {
|
||||
}
|
||||
|
||||
async switchChannel(channelId: number): Promise<void> {
|
||||
this.child?.stdin.write(`switch ${channelId}\n`);
|
||||
const id = Number(channelId);
|
||||
if (!Number.isFinite(id)) return;
|
||||
this.child?.stdin.write(`switch ${id}\n`);
|
||||
}
|
||||
|
||||
async getClientConnectionInfo(clientId: number): Promise<void> {
|
||||
this.child?.stdin.write(`clientconninfo ${clientId}\n`);
|
||||
}
|
||||
|
||||
async getServerConnectionInfo(): Promise<void> {
|
||||
this.child?.stdin.write(`serverconninfo\n`);
|
||||
}
|
||||
|
||||
async kickFromChannel(clientId: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`kickchannel ${clientId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async kickFromServer(clientId: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`kickserver ${clientId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async banClient(clientId: number, seconds: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`banclient ${clientId} ${Math.max(0, Math.floor(seconds))} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** Every field is optional - only send what actually changed. JSON.stringify
|
||||
* already escapes embedded newlines, so this is safe as a single stdin line
|
||||
* without extra sanitization. */
|
||||
async editServer(payload: {
|
||||
name?: string;
|
||||
welcomeMessage?: string;
|
||||
password?: string;
|
||||
maxClients?: number;
|
||||
hostmessage?: string;
|
||||
hostmessageMode?: string;
|
||||
hostbannerUrl?: string;
|
||||
hostbannerGfxUrl?: string;
|
||||
hostbannerGfxIntervalSecs?: number;
|
||||
hostbannerMode?: string;
|
||||
hostbuttonTooltip?: string;
|
||||
hostbuttonUrl?: string;
|
||||
hostbuttonGfxUrl?: string;
|
||||
nickname?: string;
|
||||
phoneticName?: string;
|
||||
codecEncryptionMode?: string;
|
||||
}): Promise<void> {
|
||||
this.child?.stdin.write(`serveredit ${JSON.stringify(payload)}\n`);
|
||||
}
|
||||
|
||||
async getServerLog(): Promise<void> {
|
||||
this.child?.stdin.write(`serverlog\n`);
|
||||
}
|
||||
|
||||
async getBanList(): Promise<void> {
|
||||
this.child?.stdin.write(`banlist\n`);
|
||||
}
|
||||
|
||||
async deleteBan(banId: number): Promise<void> {
|
||||
this.child?.stdin.write(`bandel ${banId}\n`);
|
||||
}
|
||||
|
||||
async deleteAllBans(): Promise<void> {
|
||||
this.child?.stdin.write(`bandelall\n`);
|
||||
}
|
||||
|
||||
async getComplainList(): Promise<void> {
|
||||
this.child?.stdin.write(`complainlist\n`);
|
||||
}
|
||||
|
||||
async deleteComplaint(targetClientDbId: number, fromClientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`complaindel ${targetClientDbId} ${fromClientDbId}\n`);
|
||||
}
|
||||
|
||||
async deleteAllComplaintsFor(targetClientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`complaindelall ${targetClientDbId}\n`);
|
||||
}
|
||||
|
||||
async getOfflineMessageList(): Promise<void> {
|
||||
this.child?.stdin.write(`messagelist\n`);
|
||||
}
|
||||
|
||||
async getOfflineMessage(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messageget ${messageId}\n`);
|
||||
}
|
||||
|
||||
async sendOfflineMessage(clientUid: string, subject: string, message: string): Promise<void> {
|
||||
const sanitize = (s: string) => s.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`messageadd ${sanitize(clientUid)}\t${sanitize(subject)}\t${sanitize(message)}\n`);
|
||||
}
|
||||
|
||||
async deleteOfflineMessage(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messagedel ${messageId}\n`);
|
||||
}
|
||||
|
||||
async markOfflineMessageRead(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messageupdateflag ${messageId} 1\n`);
|
||||
}
|
||||
|
||||
async getChannelGroupList(): Promise<void> {
|
||||
this.child?.stdin.write(`channelgrouplist\n`);
|
||||
}
|
||||
|
||||
async getServerGroupList(): Promise<void> {
|
||||
this.child?.stdin.write(`servergrouplist\n`);
|
||||
}
|
||||
|
||||
async setChannelGroup(channelGroupId: number, channelId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`setchannelgroup ${channelGroupId} ${channelId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async addServerGroup(serverGroupId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`addservergroup ${serverGroupId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async removeServerGroup(serverGroupId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`delservergroup ${serverGroupId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async serverQueryLogin(username: string, password: string): Promise<void> {
|
||||
const u = Buffer.from(username, "utf8").toString("base64");
|
||||
const p = Buffer.from(password, "utf8").toString("base64");
|
||||
this.child?.stdin.write(`serverquerylogin ${u} ${p}\n`);
|
||||
}
|
||||
|
||||
async getPermissionOverview(): Promise<void> {
|
||||
this.child?.stdin.write(`permoverview\n`);
|
||||
}
|
||||
|
||||
async getPermissionCatalog(): Promise<void> {
|
||||
this.child?.stdin.write(`permissionlist\n`);
|
||||
}
|
||||
|
||||
async getPermList(scope: PermScope, id1: number, id2?: number): Promise<void> {
|
||||
const args = id2 !== undefined ? `${scope} ${id1} ${id2}` : `${scope} ${id1}`;
|
||||
this.child?.stdin.write(`permlist ${args}\n`);
|
||||
}
|
||||
|
||||
/** `negated`/`skip` only apply to the "server" and "client" scopes - the
|
||||
* connector ignores extra trailing args for scopes that don't use them, so
|
||||
* it's safe to always pass through what the caller gave. */
|
||||
async addPermission(
|
||||
scope: PermScope,
|
||||
ids: number[],
|
||||
permId: number,
|
||||
value: number,
|
||||
negated = false,
|
||||
skip = false
|
||||
): Promise<void> {
|
||||
let args = `${scope} ${ids.join(" ")} ${permId} ${value}`;
|
||||
if (scope === "server") args += ` ${negated ? 1 : 0} ${skip ? 1 : 0}`;
|
||||
else if (scope === "client") args += ` ${skip ? 1 : 0}`;
|
||||
this.child?.stdin.write(`permadd ${args}\n`);
|
||||
}
|
||||
|
||||
async removePermission(scope: PermScope, ids: number[], permId: number): Promise<void> {
|
||||
this.child?.stdin.write(`permdel ${scope} ${ids.join(" ")} ${permId}\n`);
|
||||
}
|
||||
|
||||
async getFileList(channelId: number, path: string): Promise<void> {
|
||||
const sanitized = (path || "/").replace(/[\r\n]+/g, " ").trim() || "/";
|
||||
this.child?.stdin.write(`ftlist ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async createDirectory(channelId: number, dirname: string): Promise<void> {
|
||||
const sanitized = dirname.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftmkdir ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async deleteFile(channelId: number, name: string): Promise<void> {
|
||||
const sanitized = name.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftdelete ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async renameFile(channelId: number, oldName: string, newName: string): Promise<void> {
|
||||
const sanitize = (s: string) => s.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`ftrename ${channelId}\t${sanitize(oldName)}\t${sanitize(newName)}\n`);
|
||||
}
|
||||
|
||||
async downloadFile(channelId: number, path: string): Promise<void> {
|
||||
const sanitized = path.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftdownload ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** `dataBase64` is the raw file content, base64-encoded - the browser reads
|
||||
* the picked File as a data URL/ArrayBuffer and sends it up already encoded. */
|
||||
async uploadFile(channelId: number, path: string, dataBase64: string): Promise<void> {
|
||||
const sanitizedPath = path.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`ftupload ${channelId}\t${sanitizedPath}\t${dataBase64}\n`);
|
||||
}
|
||||
|
||||
async sendChatMessage(message: string): Promise<void> {
|
||||
@@ -268,6 +772,11 @@ export class Ts3Connection {
|
||||
this.child?.stdin.write(`muteoutput ${muted ? "1" : "0"}\n`);
|
||||
}
|
||||
|
||||
async setNickname(nickname: string): Promise<void> {
|
||||
const sanitized = nickname.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`nickname ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** Empty channelIds/clientIds clears whisper mode, returning outgoing
|
||||
* voice to the normal current-channel broadcast. */
|
||||
async setWhisperTargets(channelIds: number[], clientIds: number[]): Promise<void> {
|
||||
@@ -280,9 +789,25 @@ export class Ts3Connection {
|
||||
|
||||
async disconnect(message = ""): Promise<void> {
|
||||
if (this.child && !this.child.killed) {
|
||||
const child = this.child;
|
||||
const sanitized = message.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child.stdin.write(`disconnect ${sanitized}\n`);
|
||||
this.child.stdin.end();
|
||||
child.stdin.write(`disconnect ${sanitized}\n`);
|
||||
child.stdin.end();
|
||||
// Wait for the connector process to actually exit before returning, so a
|
||||
// caller that immediately reconnects (index.ts's "connect" handler) never
|
||||
// spawns a replacement while this one is still shutting down - two
|
||||
// connector processes would otherwise briefly hold the same audio/socket
|
||||
// resources. Fall back to a hard kill if it doesn't exit on its own.
|
||||
await new Promise<void>((resolve) => {
|
||||
const timeout = setTimeout(() => {
|
||||
child.kill();
|
||||
resolve();
|
||||
}, 3000);
|
||||
child.once("exit", () => {
|
||||
clearTimeout(timeout);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
this.listeners.clear();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
|
||||
|
||||
BASE_URL = os.environ.get("BASE_URL", "https://client.webspeak3.de/")
|
||||
RESULTS = Path("test-results")
|
||||
RESULTS.mkdir(exist_ok=True)
|
||||
|
||||
|
||||
def wait_for_text(driver: webdriver.Safari, selector: str, text: str) -> None:
|
||||
WebDriverWait(driver, 15).until(
|
||||
lambda current: text in current.find_element(By.CSS_SELECTOR, selector).text
|
||||
)
|
||||
|
||||
|
||||
def check_page(driver: webdriver.Safari, width: int, height: int, label: str) -> None:
|
||||
driver.set_window_size(width, height)
|
||||
driver.get(BASE_URL)
|
||||
|
||||
wait_for_text(driver, ".ts-app-title", "WebSpeak3")
|
||||
assert "WebSpeak3" in driver.title
|
||||
|
||||
capabilities = driver.execute_script(
|
||||
"""
|
||||
return {
|
||||
secureContext: window.isSecureContext,
|
||||
mediaDevices: Boolean(navigator.mediaDevices),
|
||||
getUserMedia: typeof navigator.mediaDevices?.getUserMedia === 'function',
|
||||
audioContext: typeof (window.AudioContext || window.webkitAudioContext) === 'function',
|
||||
webSocket: typeof window.WebSocket === 'function'
|
||||
};
|
||||
"""
|
||||
)
|
||||
assert capabilities["secureContext"]
|
||||
assert capabilities["mediaDevices"]
|
||||
assert capabilities["getUserMedia"]
|
||||
assert capabilities["audioContext"]
|
||||
assert capabilities["webSocket"]
|
||||
|
||||
connections_menu = driver.find_element(By.CSS_SELECTOR, ".ts-menubar-dropdown .ts-menubar-item")
|
||||
driver.execute_script("arguments[0].click()", connections_menu)
|
||||
connect_item = WebDriverWait(driver, 10).until(
|
||||
lambda current: current.find_element(By.CSS_SELECTOR, ".ts-menu .ts-menu-item")
|
||||
)
|
||||
driver.execute_script("arguments[0].click()", connect_item)
|
||||
dialog = WebDriverWait(driver, 10).until(
|
||||
lambda current: current.find_element(By.CSS_SELECTOR, ".ts-connect-dialog")
|
||||
)
|
||||
assert dialog.is_displayed()
|
||||
assert len(dialog.find_elements(By.CSS_SELECTOR, "input")) >= 3
|
||||
|
||||
driver.save_screenshot(str(RESULTS / f"safari-client-{label}.png"))
|
||||
|
||||
|
||||
def main() -> None:
|
||||
options = webdriver.SafariOptions()
|
||||
driver = webdriver.Safari(options=options)
|
||||
try:
|
||||
check_page(driver, 1440, 1000, "desktop")
|
||||
check_page(driver, 390, 844, "mobile")
|
||||
finally:
|
||||
driver.quit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+1
-1
Submodule tsclientlib updated: 0c855bd00d...0b74239a34.
+3
-3
@@ -13,13 +13,13 @@
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="WebSpeak3" />
|
||||
<meta property="og:description" content="An independent, self-hosted web client for TeamSpeak 3 servers." />
|
||||
<meta property="og:url" content="https://ts.moepchi.de/" />
|
||||
<meta property="og:image" content="https://ts.moepchi.de/og-image.png" />
|
||||
<meta property="og:url" content="https://client.webspeak3.de/" />
|
||||
<meta property="og:image" content="https://client.webspeak3.de/og-image.png" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="WebSpeak3" />
|
||||
<meta name="twitter:description" content="An independent, self-hosted web client for TeamSpeak 3 servers." />
|
||||
<meta name="twitter:image" content="https://ts.moepchi.de/og-image.png" />
|
||||
<meta name="twitter:image" content="https://client.webspeak3.de/og-image.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 379 KiB |
+1790
-6
File diff suppressed because it is too large.
Load diff
+5969
-244
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,331 @@
|
||||
/**
|
||||
* Multi-join session bookkeeping. The active tab keeps its UI in React state
|
||||
* (App.tsx); inactive tabs park a snapshot here and keep their WebSocket alive.
|
||||
* Audio is intentionally active-tab-only (see README / known limits).
|
||||
*/
|
||||
|
||||
export type ConnectionSessionId = string;
|
||||
|
||||
export type SelectedItem =
|
||||
| { type: "server" }
|
||||
| { type: "channel"; id: number }
|
||||
| { type: "client"; id: number };
|
||||
|
||||
export type ChatEntry = { from: string; message: string; isLog?: boolean };
|
||||
export type PmMessage = { fromSelf: boolean; message: string };
|
||||
export type PmThread = {
|
||||
partnerId: number;
|
||||
partnerName: string;
|
||||
messages: PmMessage[];
|
||||
unread: boolean;
|
||||
};
|
||||
export type ActiveChatTab = "channel" | "server" | number;
|
||||
export type PokeNotice = { id: number; from: string; message: string };
|
||||
export type LogEntry = { text: string; kind: "info" | "error" };
|
||||
|
||||
export type ChannelInfo = {
|
||||
id: number;
|
||||
parent: number;
|
||||
order: number;
|
||||
name: string;
|
||||
topic: string;
|
||||
codec: string;
|
||||
maxClients: number | null;
|
||||
hasPassword: boolean;
|
||||
};
|
||||
|
||||
export type ClientInfo = {
|
||||
id: number;
|
||||
channel: number;
|
||||
name: string;
|
||||
inputMuted: boolean;
|
||||
outputMuted: boolean;
|
||||
inputHardwareEnabled: boolean;
|
||||
away: boolean;
|
||||
awayMessage: string;
|
||||
isChannelCommander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
hasTalkPower: boolean;
|
||||
};
|
||||
|
||||
export type WhisperLogEntry = {
|
||||
id: number;
|
||||
timestamp: number;
|
||||
description: string;
|
||||
};
|
||||
|
||||
/** Snapshot of per-connection UI state for a parked (inactive) tab. */
|
||||
export type ParkedSessionState = {
|
||||
host: string;
|
||||
nickname: string;
|
||||
connected: boolean;
|
||||
connecting: boolean;
|
||||
connectError: string | null;
|
||||
channels: ChannelInfo[];
|
||||
clients: ClientInfo[];
|
||||
ownClientId: number | null;
|
||||
serverName: string;
|
||||
serverMaxClients: number;
|
||||
serverClientsOnline: number;
|
||||
serverChannelsOnline: number;
|
||||
serverVersion: string;
|
||||
serverLicense: string;
|
||||
serverLicenseId: number;
|
||||
serverBannerUrl: string;
|
||||
serverWelcomeMessage: string;
|
||||
selected: SelectedItem | null;
|
||||
chat: ChatEntry[];
|
||||
serverChat: ChatEntry[];
|
||||
pmThreads: Record<number, PmThread>;
|
||||
pokes: PokeNotice[];
|
||||
chatTab: ActiveChatTab;
|
||||
talkers: number[];
|
||||
whisperChannelIds: number[];
|
||||
whisperClientIds: number[];
|
||||
whisperLog: WhisperLogEntry[];
|
||||
log: LogEntry[];
|
||||
hasConnected: boolean;
|
||||
previousClients: ClientInfo[] | null;
|
||||
/** Whether the mic was on for this tab when it was parked, so switching back restores it. */
|
||||
micWasOn: boolean;
|
||||
};
|
||||
|
||||
export type SessionTabInfo = {
|
||||
id: ConnectionSessionId;
|
||||
label: string;
|
||||
connected: boolean;
|
||||
connecting: boolean;
|
||||
};
|
||||
|
||||
export type SessionSocket = WebSocket | { close: () => void; readyState: number; send: (data: string) => void };
|
||||
|
||||
export type SessionRecord = {
|
||||
id: ConnectionSessionId;
|
||||
socket: SessionSocket | null;
|
||||
/** null while this session is the active React UI. */
|
||||
parked: ParkedSessionState | null;
|
||||
};
|
||||
|
||||
export function emptyParkedState(partial?: Partial<ParkedSessionState>): ParkedSessionState {
|
||||
return {
|
||||
host: "",
|
||||
nickname: "",
|
||||
connected: false,
|
||||
connecting: false,
|
||||
connectError: null,
|
||||
channels: [],
|
||||
clients: [],
|
||||
ownClientId: null,
|
||||
serverName: "",
|
||||
serverMaxClients: 0,
|
||||
serverClientsOnline: 0,
|
||||
serverChannelsOnline: 0,
|
||||
serverVersion: "",
|
||||
serverLicense: "",
|
||||
serverLicenseId: 0,
|
||||
serverBannerUrl: "",
|
||||
serverWelcomeMessage: "",
|
||||
selected: null,
|
||||
chat: [],
|
||||
serverChat: [],
|
||||
pmThreads: {},
|
||||
pokes: [],
|
||||
chatTab: "channel",
|
||||
talkers: [],
|
||||
whisperChannelIds: [],
|
||||
whisperClientIds: [],
|
||||
whisperLog: [],
|
||||
log: [],
|
||||
hasConnected: false,
|
||||
previousClients: null,
|
||||
micWasOn: false,
|
||||
...partial,
|
||||
};
|
||||
}
|
||||
|
||||
export function sessionLabel(state: Pick<ParkedSessionState, "serverName" | "host">): string {
|
||||
const name = state.serverName.trim() || state.host.trim();
|
||||
return name || "…";
|
||||
}
|
||||
|
||||
/** Apply a gateway event to a parked session. Returns whether the tab label may have changed. */
|
||||
export function applyParkedGatewayEvent(
|
||||
state: ParkedSessionState,
|
||||
data: { type: string; [key: string]: unknown },
|
||||
opts: { connectNickname: string; chatTab: ActiveChatTab }
|
||||
): { state: ParkedSessionState; labelChanged: boolean } {
|
||||
let labelChanged = false;
|
||||
switch (data.type) {
|
||||
case "connected": {
|
||||
const serverName = String(data.serverName ?? "");
|
||||
labelChanged = serverName !== state.serverName;
|
||||
return {
|
||||
labelChanged,
|
||||
state: {
|
||||
...state,
|
||||
connecting: false,
|
||||
connectError: null,
|
||||
connected: true,
|
||||
hasConnected: true,
|
||||
serverName,
|
||||
serverMaxClients: Number(data.serverMaxClients) || 0,
|
||||
serverClientsOnline: 0,
|
||||
serverChannelsOnline: 0,
|
||||
serverVersion: String(data.serverVersion ?? ""),
|
||||
serverLicense: String(data.serverLicense ?? ""),
|
||||
serverLicenseId: typeof data.serverLicenseId === "number" ? data.serverLicenseId : 0,
|
||||
serverBannerUrl: String(data.serverBannerUrl ?? ""),
|
||||
serverWelcomeMessage: String(data.welcomeMessage ?? ""),
|
||||
selected: { type: "server" },
|
||||
serverChat: [
|
||||
...state.serverChat,
|
||||
{ from: "Server", message: String(data.welcomeMessage ?? "") },
|
||||
],
|
||||
previousClients: null,
|
||||
},
|
||||
};
|
||||
}
|
||||
case "channels": {
|
||||
const newClients = (data.clients as ClientInfo[]) ?? [];
|
||||
const ownClientId =
|
||||
typeof data.ownClientId === "number" && data.ownClientId > 0
|
||||
? data.ownClientId
|
||||
: state.ownClientId;
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
channels: (data.channels as ChannelInfo[]) ?? state.channels,
|
||||
clients: newClients,
|
||||
ownClientId,
|
||||
serverMaxClients:
|
||||
typeof data.serverMaxClients === "number" && data.serverMaxClients > 0
|
||||
? data.serverMaxClients
|
||||
: state.serverMaxClients,
|
||||
serverClientsOnline:
|
||||
typeof data.serverClientsOnline === "number" && data.serverClientsOnline >= 0
|
||||
? data.serverClientsOnline
|
||||
: state.serverClientsOnline,
|
||||
serverChannelsOnline:
|
||||
typeof data.serverChannelsOnline === "number" && data.serverChannelsOnline >= 0
|
||||
? data.serverChannelsOnline
|
||||
: state.serverChannelsOnline,
|
||||
previousClients: newClients,
|
||||
},
|
||||
};
|
||||
}
|
||||
case "chatMessage":
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
chat: [...state.chat, { from: String(data.from), message: String(data.message) }],
|
||||
},
|
||||
};
|
||||
case "serverMessage":
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
serverChat: [
|
||||
...state.serverChat,
|
||||
{ from: String(data.from), message: String(data.message) },
|
||||
],
|
||||
},
|
||||
};
|
||||
case "privateMessage": {
|
||||
const partnerId = Number(data.partnerId);
|
||||
const existing = state.pmThreads[partnerId];
|
||||
const thread: PmThread = existing ?? {
|
||||
partnerId,
|
||||
partnerName: String(data.partnerName),
|
||||
messages: [],
|
||||
unread: false,
|
||||
};
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
pmThreads: {
|
||||
...state.pmThreads,
|
||||
[partnerId]: {
|
||||
...thread,
|
||||
partnerName: String(data.partnerName),
|
||||
messages: [
|
||||
...thread.messages,
|
||||
{ fromSelf: Boolean(data.fromSelf), message: String(data.message) },
|
||||
],
|
||||
unread:
|
||||
thread.unread || (!data.fromSelf && opts.chatTab !== partnerId),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
case "talkers":
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
talkers: Array.isArray(data.clients) ? (data.clients as number[]) : [],
|
||||
},
|
||||
};
|
||||
case "poke": {
|
||||
const id = Date.now() + Math.floor(Math.random() * 1000);
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
pokes: [
|
||||
...state.pokes,
|
||||
{ id, from: String(data.from), message: String(data.message ?? "") },
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
case "disconnected":
|
||||
return {
|
||||
labelChanged: true,
|
||||
state: {
|
||||
...emptyParkedState({
|
||||
host: state.host,
|
||||
nickname: state.nickname,
|
||||
}),
|
||||
connecting: false,
|
||||
connected: false,
|
||||
hasConnected: false,
|
||||
log: [
|
||||
...state.log,
|
||||
{ text: `Disconnected: ${String(data.reason ?? "")}`, kind: "info" },
|
||||
],
|
||||
},
|
||||
};
|
||||
case "error":
|
||||
if (state.hasConnected) {
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
log: [...state.log, { text: String(data.message), kind: "error" }],
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
labelChanged: false,
|
||||
state: {
|
||||
...state,
|
||||
connecting: false,
|
||||
connectError: String(data.message),
|
||||
},
|
||||
};
|
||||
case "audioOut":
|
||||
// Background tabs never play audio (active-tab-only shortcut).
|
||||
return { state, labelChanged: false };
|
||||
default:
|
||||
return { state, labelChanged: false };
|
||||
}
|
||||
}
|
||||
+414
-6
@@ -29,6 +29,11 @@ interface DemoClient {
|
||||
awayMessage: string;
|
||||
isChannelCommander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
hasTalkPower: boolean;
|
||||
}
|
||||
|
||||
const DEMO_CHANNELS: DemoChannel[] = [
|
||||
@@ -37,13 +42,116 @@ const DEMO_CHANNELS: DemoChannel[] = [
|
||||
{ id: 3, parent: 0, order: 2, name: "AFK", topic: "", codec: "Opus Voice", maxClients: null, hasPassword: false },
|
||||
];
|
||||
|
||||
const DEMO_NPCS: DemoClient[] = [
|
||||
{ id: 102, channel: 1, name: "Alex", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: true, country: "US" },
|
||||
{ id: 103, channel: 2, name: "Sam", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "GB" },
|
||||
{ id: 104, channel: 2, name: "Jordan", inputMuted: true, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "CA" },
|
||||
{ id: 105, channel: 3, name: "Riley", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: true, awayMessage: "brb, grabbing coffee", isChannelCommander: false, country: "DE" },
|
||||
const DEMO_CHANNEL_GROUPS = [
|
||||
{ id: 1, name: "Channel Admin", iconId: 0 },
|
||||
{ id: 2, name: "Operator", iconId: 0 },
|
||||
{ id: 3, name: "Voice", iconId: 0 },
|
||||
{ id: 4, name: "Guest", iconId: 0 },
|
||||
];
|
||||
|
||||
const DEMO_SERVER_GROUPS = [
|
||||
{ id: 1, name: "Server Admin", iconId: 0 },
|
||||
{ id: 2, name: "Moderator", iconId: 0 },
|
||||
{ id: 3, name: "Trusted", iconId: 0 },
|
||||
{ id: 4, name: "Guest", iconId: 0 },
|
||||
];
|
||||
|
||||
const DEMO_NPCS: DemoClient[] = [
|
||||
{ id: 102, channel: 1, name: "Alex", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: true, country: "US", uid: "demo-uid-alex", databaseId: 2, channelGroup: 2, serverGroups: [2], hasTalkPower: true },
|
||||
{ id: 103, channel: 2, name: "Sam", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "GB", uid: "demo-uid-sam", databaseId: 3, channelGroup: 4, serverGroups: [4], hasTalkPower: true },
|
||||
{ id: 104, channel: 2, name: "Jordan", inputMuted: true, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "CA", uid: "demo-uid-jordan", databaseId: 4, channelGroup: 4, serverGroups: [4], hasTalkPower: true },
|
||||
{ id: 105, channel: 3, name: "Riley", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: true, awayMessage: "brb, grabbing coffee", isChannelCommander: false, country: "DE", uid: "demo-uid-riley", databaseId: 5, channelGroup: 4, serverGroups: [3, 4], hasTalkPower: true },
|
||||
];
|
||||
|
||||
interface DemoFileEntry {
|
||||
path: string;
|
||||
name: string;
|
||||
size: number;
|
||||
isFile: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
/** Keyed by "<channelId>:<path>" - a tiny in-memory filesystem so the
|
||||
* channel file browser has something real to navigate/mutate in the demo. */
|
||||
const DEMO_FILES: Record<string, DemoFileEntry[]> = {
|
||||
"1:/": [
|
||||
{ path: "/", name: "readme.txt", size: 182, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
{ path: "/", name: "Musik", size: 0, isFile: false, timestamp: "2024-01-01 12:00:00" },
|
||||
],
|
||||
"1:/Musik": [
|
||||
{ path: "/Musik", name: "lobby-theme.mp3", size: 4 * 1024 * 1024, isFile: true, timestamp: "2024-01-02 09:30:00" },
|
||||
],
|
||||
"2:/": [],
|
||||
"3:/": [],
|
||||
// Channel 0 is TS3's special server-wide icon repository, not a real channel.
|
||||
"0:/": [
|
||||
{ path: "/", name: "icon_100", size: 68, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
{ path: "/", name: "icon_200", size: 68, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
],
|
||||
};
|
||||
|
||||
// A tiny 1x1 transparent PNG, reused as the fake image data for every demo icon.
|
||||
const DEMO_ICON_PNG_BASE64 =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=";
|
||||
|
||||
function demoFileKey(channelId: number, path: string): string {
|
||||
return `${channelId}:${path}`;
|
||||
}
|
||||
|
||||
function demoNowTimestamp(): string {
|
||||
return new Date().toISOString().slice(0, 19).replace("T", " ");
|
||||
}
|
||||
|
||||
interface DemoPermEntry {
|
||||
name: string;
|
||||
description: string;
|
||||
value: number;
|
||||
negated: boolean;
|
||||
skip: boolean;
|
||||
}
|
||||
|
||||
// A small fake permission catalog (real TS3 servers expose ~500 of these) -
|
||||
// enough for the permissions editor's "add permission" picker to be usable.
|
||||
const DEMO_PERMISSION_CATALOG: { id: number; name: string; description: string }[] = [
|
||||
{ id: 1, name: "b_client_info_view", description: "View own client info" },
|
||||
{ id: 2, name: "b_client_permissionoverview_view", description: "View permission overview" },
|
||||
{ id: 3, name: "i_channel_join_power", description: "Power to join channels" },
|
||||
{ id: 4, name: "i_client_talk_power", description: "Talk power" },
|
||||
{ id: 5, name: "b_client_use_priority_speaker", description: "Use priority speaker" },
|
||||
{ id: 6, name: "i_client_max_channel_subscriptions", description: "Max channel subscriptions" },
|
||||
{ id: 7, name: "b_channel_join_permanent", description: "Join permanent channels" },
|
||||
{ id: 8, name: "b_client_kick_from_channel", description: "Kick client from channel" },
|
||||
{ id: 9, name: "b_client_kick_from_server", description: "Kick client from server" },
|
||||
{ id: 10, name: "b_client_ban_client", description: "Ban client" },
|
||||
{ id: 11, name: "i_channel_create_modify_power", description: "Power to create/modify channels" },
|
||||
{ id: 12, name: "b_virtualserver_modify_name", description: "Modify server name" },
|
||||
{ id: 13, name: "b_ft_file_upload", description: "Upload files" },
|
||||
{ id: 14, name: "b_ft_file_download", description: "Download files" },
|
||||
];
|
||||
|
||||
// Keyed by "<scope>:<id1>:<id2 ?? ->" - the fake permission set currently
|
||||
// assigned to one server group / channel group / channel / client /
|
||||
// channel+client combination.
|
||||
const DEMO_PERM_LISTS: Record<string, DemoPermEntry[]> = {
|
||||
"server:1:-": [
|
||||
{ name: "b_client_kick_from_server", description: "Kick client from server", value: 1, negated: false, skip: false },
|
||||
{ name: "b_client_ban_client", description: "Ban client", value: 1, negated: false, skip: false },
|
||||
],
|
||||
"server:4:-": [
|
||||
{ name: "i_channel_join_power", description: "Power to join channels", value: 25, negated: false, skip: false },
|
||||
],
|
||||
"channelgroup:1:-": [
|
||||
{ name: "i_channel_create_modify_power", description: "Power to create/modify channels", value: 75, negated: false, skip: false },
|
||||
],
|
||||
"client:1:-": [
|
||||
{ name: "b_client_info_view", description: "View own client info", value: 1, negated: false, skip: false },
|
||||
],
|
||||
};
|
||||
|
||||
function demoPermKey(scope: string, id1: number, id2?: number): string {
|
||||
return `${scope}:${id1}:${id2 ?? "-"}`;
|
||||
}
|
||||
|
||||
const SELF_ID = 101;
|
||||
|
||||
/**
|
||||
@@ -62,6 +170,8 @@ export class DemoSocket {
|
||||
private closed = false;
|
||||
private timers: number[] = [];
|
||||
private selfChannel = 1;
|
||||
private selfChannelGroup = 4;
|
||||
private selfServerGroups = new Set<number>([4]);
|
||||
|
||||
constructor() {
|
||||
this.after(400, () => {
|
||||
@@ -118,6 +228,7 @@ export class DemoSocket {
|
||||
serverMaxClients: 32,
|
||||
serverVersion: "3.13.7 [Build: demo]",
|
||||
serverLicense: "Demo License",
|
||||
serverLicenseId: 2,
|
||||
serverBannerUrl: null,
|
||||
welcomeMessage: "This is a simulated demo - no real TeamSpeak server is involved. Connect with any name/address you like.",
|
||||
});
|
||||
@@ -166,6 +277,290 @@ export class DemoSocket {
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getClientConnectionInfo": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "clientConnectionInfo",
|
||||
clientId: msg.clientId,
|
||||
pingMs: 12.4,
|
||||
connectedSecs: 217,
|
||||
ip: msg.clientId === SELF_ID ? "127.0.0.1" : null,
|
||||
packetsSent: 4213,
|
||||
bytesSent: 512_340,
|
||||
packetsReceived: 3987,
|
||||
bytesReceived: 498_120,
|
||||
packetLossPercent: 0,
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getServerConnectionInfo": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "serverConnectionInfo",
|
||||
pingMs: 8.1,
|
||||
connectedSecs: 217,
|
||||
packetLossPercent: 0,
|
||||
packetsSentTotal: 21_004,
|
||||
bytesSentTotal: 2_411_000,
|
||||
packetsReceivedTotal: 19_872,
|
||||
bytesReceivedTotal: 2_198_500,
|
||||
bandwidthSentLastSecond: 4200,
|
||||
bandwidthReceivedLastSecond: 3900,
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getServerLog": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "serverProtocolLog",
|
||||
lines: [
|
||||
"2026-08-05 10:12:03.421128|INFO |VirtualServerBase|1 |connect to server successful, connection accepted",
|
||||
"2026-08-05 10:12:04.001912|INFO |VirtualServerBase|1 |client 'Guest'(id:101) connected",
|
||||
"2026-08-05 10:14:19.552031|INFO |VirtualServerBase|1 |client 'Sam'(id:103) connected",
|
||||
"2026-08-05 10:15:02.884120|INFO |VirtualServerBase|1 |client 'Jordan'(id:104) switched channel",
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getBanList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "banList",
|
||||
entries: [
|
||||
{
|
||||
banId: 1,
|
||||
ip: "203.0.113.42",
|
||||
name: "TrollUser",
|
||||
uid: "demo-uid-troll",
|
||||
lastNickname: "TrollUser",
|
||||
created: "2026-07-28 14:02:11",
|
||||
durationSecs: 0,
|
||||
invokerName: "Alex",
|
||||
reason: "Spamming the server chat",
|
||||
enforcements: 0,
|
||||
},
|
||||
{
|
||||
banId: 2,
|
||||
ip: "198.51.100.7",
|
||||
name: "",
|
||||
uid: "demo-uid-annoying",
|
||||
lastNickname: "AnnoyingGuest",
|
||||
created: "2026-08-01 09:44:53",
|
||||
durationSecs: 3600,
|
||||
invokerName: "Sam",
|
||||
reason: "Repeated channel spam",
|
||||
enforcements: 1,
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "deleteBan":
|
||||
case "deleteAllBans":
|
||||
// No observable effect - the frontend already optimistically removes
|
||||
// the deleted row(s) from its own state.
|
||||
break;
|
||||
case "getComplainList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "complainList",
|
||||
entries: [
|
||||
{
|
||||
targetClientDbId: 104,
|
||||
targetName: "Jordan",
|
||||
fromClientDbId: 103,
|
||||
fromName: "Sam",
|
||||
message: "Kept talking over everyone in voice chat.",
|
||||
timestamp: "2026-08-02 18:21:07",
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "deleteComplaint":
|
||||
case "deleteAllComplaintsFor":
|
||||
break;
|
||||
case "getOfflineMessageList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "offlineMessageList",
|
||||
entries: [
|
||||
{
|
||||
messageId: 1,
|
||||
clientUid: "demo-uid-sam",
|
||||
subject: "Missed you online",
|
||||
timestamp: "2026-08-03 20:11:44",
|
||||
isRead: false,
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessage": {
|
||||
this.after(300, () =>
|
||||
this.emit({
|
||||
type: "offlineMessage",
|
||||
messageId: msg.messageId,
|
||||
clientUid: "demo-uid-sam",
|
||||
subject: "Missed you online",
|
||||
message: "Hey, we were on last night in the Gaming channel - join us next time!",
|
||||
timestamp: "2026-08-03 20:11:44",
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "sendOfflineMessage":
|
||||
case "deleteOfflineMessage":
|
||||
case "markOfflineMessageRead":
|
||||
// No observable effect - the frontend already optimistically updates
|
||||
// its own state for delete/read, and there's no NPC to reply to a send.
|
||||
break;
|
||||
case "getChannelGroupList":
|
||||
this.after(300, () => this.emit({ type: "channelGroupList", entries: DEMO_CHANNEL_GROUPS }));
|
||||
break;
|
||||
case "getServerGroupList":
|
||||
this.after(300, () => this.emit({ type: "serverGroupList", entries: DEMO_SERVER_GROUPS }));
|
||||
break;
|
||||
case "setChannelGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) npc.channelGroup = msg.channelGroupId;
|
||||
else if (msg.clientDbId === 1) this.selfChannelGroup = msg.channelGroupId;
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "addServerGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) {
|
||||
if (!npc.serverGroups.includes(msg.serverGroupId)) npc.serverGroups.push(msg.serverGroupId);
|
||||
} else if (msg.clientDbId === 1) {
|
||||
this.selfServerGroups.add(msg.serverGroupId);
|
||||
}
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "removeServerGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) {
|
||||
npc.serverGroups = npc.serverGroups.filter((g) => g !== msg.serverGroupId);
|
||||
} else if (msg.clientDbId === 1) {
|
||||
this.selfServerGroups.delete(msg.serverGroupId);
|
||||
}
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "serverQueryLogin":
|
||||
// No observable effect - the demo has no real ServerQuery backend to
|
||||
// authenticate against.
|
||||
break;
|
||||
case "getPermissionOverview": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "permissionOverview",
|
||||
entries: [
|
||||
{ name: "b_client_info_view", description: "View own client info", value: 1, negated: false, skip: false },
|
||||
{ name: "b_client_permissionoverview_view", description: "View permission overview", value: 1, negated: false, skip: false },
|
||||
{ name: "i_channel_join_power", description: "Power to join channels", value: 25, negated: false, skip: false },
|
||||
{ name: "i_client_talk_power", description: "Talk power", value: 25, negated: false, skip: false },
|
||||
{ name: "b_client_use_priority_speaker", description: "Use priority speaker", value: 0, negated: true, skip: false },
|
||||
{ name: "i_client_max_channel_subscriptions", description: "Max channel subscriptions", value: -1, negated: false, skip: false },
|
||||
{ name: "b_channel_join_permanent", description: "Join permanent channels", value: 1, negated: false, skip: false },
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getPermissionCatalog": {
|
||||
this.after(300, () => this.emit({ type: "permissionCatalog", entries: DEMO_PERMISSION_CATALOG }));
|
||||
break;
|
||||
}
|
||||
case "getPermList": {
|
||||
const key = demoPermKey(msg.scope, msg.id1, msg.id2);
|
||||
this.after(300, () =>
|
||||
this.emit({ type: "permList", scope: msg.scope, id1: msg.id1, id2: msg.id2 ?? null, entries: DEMO_PERM_LISTS[key] ?? [] })
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "addPermission": {
|
||||
const [id1, id2] = msg.ids as number[];
|
||||
const key = demoPermKey(msg.scope, id1, id2);
|
||||
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
|
||||
const name = catalogEntry?.name ?? `#${msg.permId}`;
|
||||
const description = catalogEntry?.description ?? "";
|
||||
const list = (DEMO_PERM_LISTS[key] ?? []).filter((e) => e.name !== name);
|
||||
list.push({ name, description, value: msg.value, negated: !!msg.negated, skip: !!msg.skip });
|
||||
DEMO_PERM_LISTS[key] = list;
|
||||
break;
|
||||
}
|
||||
case "removePermission": {
|
||||
const [id1, id2] = msg.ids as number[];
|
||||
const key = demoPermKey(msg.scope, id1, id2);
|
||||
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
|
||||
const name = catalogEntry?.name ?? `#${msg.permId}`;
|
||||
if (DEMO_PERM_LISTS[key]) DEMO_PERM_LISTS[key] = DEMO_PERM_LISTS[key].filter((e) => e.name !== name);
|
||||
break;
|
||||
}
|
||||
case "getFileList": {
|
||||
const key = demoFileKey(msg.channelId, msg.path);
|
||||
this.after(300, () =>
|
||||
this.emit({ type: "fileList", cid: msg.channelId, path: msg.path, entries: DEMO_FILES[key] ?? [] })
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "createDirectory": {
|
||||
const dir = msg.dirname as string;
|
||||
const parent = dir.slice(0, dir.lastIndexOf("/")) || "/";
|
||||
const name = dir.slice(dir.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
DEMO_FILES[parentKey] = (DEMO_FILES[parentKey] ?? []).filter((e) => e.name !== name);
|
||||
DEMO_FILES[parentKey].push({ path: parent, name, size: 0, isFile: false, timestamp: demoNowTimestamp() });
|
||||
DEMO_FILES[demoFileKey(msg.channelId, dir)] = [];
|
||||
break;
|
||||
}
|
||||
case "deleteFile": {
|
||||
const full = msg.name as string;
|
||||
const parent = full.slice(0, full.lastIndexOf("/")) || "/";
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
if (DEMO_FILES[parentKey]) DEMO_FILES[parentKey] = DEMO_FILES[parentKey].filter((e) => e.name !== name);
|
||||
break;
|
||||
}
|
||||
case "renameFile": {
|
||||
const oldFull = msg.oldName as string;
|
||||
const newFull = msg.newName as string;
|
||||
const parent = oldFull.slice(0, oldFull.lastIndexOf("/")) || "/";
|
||||
const oldName = oldFull.slice(oldFull.lastIndexOf("/") + 1);
|
||||
const newName = newFull.slice(newFull.lastIndexOf("/") + 1);
|
||||
const entry = DEMO_FILES[demoFileKey(msg.channelId, parent)]?.find((e) => e.name === oldName);
|
||||
if (entry) entry.name = newName;
|
||||
break;
|
||||
}
|
||||
case "downloadFile": {
|
||||
const full = msg.path as string;
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const data =
|
||||
msg.channelId === 0
|
||||
? DEMO_ICON_PNG_BASE64
|
||||
: btoa(`This is a demo file. There is no real content behind "${name}" in WebSpeak3's demo mode.`);
|
||||
this.after(400, () => this.emit({ type: "fileDownloadData", cid: msg.channelId, path: full, data }));
|
||||
break;
|
||||
}
|
||||
case "uploadFile": {
|
||||
const full = msg.path as string;
|
||||
const parent = full.slice(0, full.lastIndexOf("/")) || "/";
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
const sizeBytes = Math.floor(((msg.dataBase64 as string).length * 3) / 4);
|
||||
DEMO_FILES[parentKey] = (DEMO_FILES[parentKey] ?? []).filter((e) => e.name !== name);
|
||||
DEMO_FILES[parentKey].push({ path: parent, name, size: sizeBytes, isFile: true, timestamp: demoNowTimestamp() });
|
||||
this.after(400, () => this.emit({ type: "fileUploadDone", cid: msg.channelId, path: full }));
|
||||
break;
|
||||
}
|
||||
// "disconnect" is intentionally unhandled here: handleDisconnect() in
|
||||
// App.tsx always calls socket.close() right after sending it, and
|
||||
// close() already emits the "disconnected" event below.
|
||||
@@ -220,7 +615,20 @@ export class DemoSocket {
|
||||
awayMessage: "",
|
||||
isChannelCommander: false,
|
||||
country: "",
|
||||
uid: "demo-uid-self",
|
||||
databaseId: 1,
|
||||
channelGroup: this.selfChannelGroup,
|
||||
serverGroups: [...this.selfServerGroups],
|
||||
hasTalkPower: true,
|
||||
};
|
||||
this.emit({ type: "channels", channels: DEMO_CHANNELS, clients: [self, ...DEMO_NPCS] });
|
||||
this.emit({
|
||||
type: "channels",
|
||||
channels: DEMO_CHANNELS,
|
||||
clients: [self, ...DEMO_NPCS],
|
||||
ownClientId: SELF_ID,
|
||||
serverMaxClients: 32,
|
||||
serverClientsOnline: 1 + DEMO_NPCS.length,
|
||||
serverChannelsOnline: DEMO_CHANNELS.length,
|
||||
});
|
||||
}
|
||||
}
|
||||
+635
-11
@@ -1,6 +1,7 @@
|
||||
import { createContext, useContext, useEffect, useState, type ReactNode } from "react";
|
||||
import { zhCN } from "./locales/zh-CN";
|
||||
|
||||
export type Lang = "de" | "en";
|
||||
export type Lang = "de" | "en" | "zh-CN";
|
||||
export type LangPref = "auto" | Lang;
|
||||
|
||||
const LANGUAGE_KEY = "webspeak3:language";
|
||||
@@ -20,19 +21,24 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"menu.favorites.manage": "Favoriten verwalten",
|
||||
"menu.self": "Selbst",
|
||||
"menu.rights": "Rechte",
|
||||
"menu.rights.serverGroups": "Server-Gruppen bearbeiten...",
|
||||
"menu.rights.channelGroups": "Channel-Gruppen bearbeiten...",
|
||||
"menu.rights.serverPermissions": "Server-Rechte bearbeiten...",
|
||||
"menu.rights.channelPermissions": "Channel-Rechte bearbeiten...",
|
||||
"menu.rights.overview": "Rechteübersicht...",
|
||||
"menu.rights.myRights": "Eigene Rechte anzeigen",
|
||||
"menu.extras": "Extras",
|
||||
"menu.help": "Hilfe",
|
||||
"menu.extras.identities": "Identitäten",
|
||||
"menu.extras.contacts": "Kontakte",
|
||||
"menu.extras.collectedUrls": "Gesammelte URLs",
|
||||
"menu.extras.fileTransfers": "Dateitransfers",
|
||||
"menu.extras.inviteFriend": "Freund einladen",
|
||||
"menu.extras.offlineMessages": "Offline Nachrichten",
|
||||
"menu.extras.whisperLists": "Whisperlisten",
|
||||
"menu.extras.whisperHistory": "Whisper Verlauf",
|
||||
"menu.extras.clientLog": "Client Protokoll",
|
||||
"menu.extras.banList": "Bannliste",
|
||||
"menu.extras.complaintList": "Beschwerdeliste",
|
||||
"menu.extras.offlineMessages": "Offline Nachrichten",
|
||||
"menu.extras.serverQueryLogin": "ServerQuery Login",
|
||||
"menu.extras.serverLog": "Server Protokoll",
|
||||
"menu.extras.startRecording": "Aufnahme starten",
|
||||
@@ -60,6 +66,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"away.setGlobalStatus": "Abwesenheit-Status global setzen",
|
||||
|
||||
"connect.title": "Verbinden",
|
||||
"connect.novaSubtitle": "WebSpeak3 läuft komplett im Browser — kein Download nötig",
|
||||
"connect.serverAddress": "Server Nickname oder Adresse:",
|
||||
"connect.serverPassword": "Server Passwort:",
|
||||
"connect.nickname": "Nickname:",
|
||||
@@ -70,8 +77,11 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.channelPassword": "Channel Passwort:",
|
||||
"connect.playbackProfile": "Wiedergabeprofil:",
|
||||
"connect.onetimeGrant": "Einmalige Berechtigung:",
|
||||
"connect.serverType": "Server-Typ:",
|
||||
"connect.serverType.auto": "Auto",
|
||||
"connect.serverType.teamspeak": "TeamSpeak",
|
||||
"connect.serverType.teaspeak": "TeaSpeak",
|
||||
"connect.hotkeyProfile": "Hotkeyprofil:",
|
||||
"connect.sendMyTeamSpeakId": "myTeamSpeak ID senden",
|
||||
"connect.soundPack": "Sound Pack:",
|
||||
"connect.more": "Mehr",
|
||||
"connect.less": "Weniger",
|
||||
@@ -80,6 +90,123 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.newTab": "In neuem Tab",
|
||||
"connect.cancel": "Abbrechen",
|
||||
|
||||
"collectedUrls.title": "Gesammelte URLs",
|
||||
"collectedUrls.search": "Suchen:",
|
||||
"collectedUrls.url": "URL",
|
||||
"collectedUrls.count": "Anzahl",
|
||||
"collectedUrls.lastSeen": "Zuletzt erwähnt",
|
||||
"collectedUrls.mentionedBy": "Erwähnt von",
|
||||
"collectedUrls.clearList": "Liste löschen",
|
||||
|
||||
"inviteFriend.title": "Freund einladen",
|
||||
"inviteFriend.type": "Art der Einladung",
|
||||
"inviteFriend.includeChannel": "Aktuellen Channel einfügen",
|
||||
"inviteFriend.link": "Link",
|
||||
"inviteFriend.addPermissionKey": "Berechtigungsschlüssel hinzufügen",
|
||||
"inviteFriend.copyToClipboard": "In Zwischenablage kopieren",
|
||||
"inviteFriend.copied": "Kopiert!",
|
||||
|
||||
"clientLog.title": "Client Protokoll",
|
||||
"clientLog.level.critical": "Kritisch",
|
||||
"clientLog.level.error": "Fehler",
|
||||
"clientLog.level.warning": "Warnungen",
|
||||
"clientLog.level.info": "Info",
|
||||
"clientLog.level.debug": "Debug",
|
||||
"clientLog.search": "Suchen:",
|
||||
"clientLog.filter": "Filter:",
|
||||
"clientLog.caseSensitive": "Groß-/Kleinschreibung",
|
||||
"clientLog.mark": "Markieren",
|
||||
|
||||
"whisperHistory.title": "Whisper Verlauf - {server}",
|
||||
"whisperHistory.empty": "Kein Whisper-Verlauf vorhanden.",
|
||||
"whisperHistory.started": "Whispern an: {targets}",
|
||||
"whisperHistory.stopped": "Whispern beendet",
|
||||
"whisperHistory.clear": "Löschen",
|
||||
"whisperHistory.options": "Optionen",
|
||||
|
||||
"whisperLists.title": "Whisperlisten",
|
||||
"whisperLists.namePlaceholder": "Name der Liste",
|
||||
"whisperLists.saveCurrent": "Aktuelle Auswahl speichern",
|
||||
"whisperLists.itemDetail": "{channels} Channel, {clients} Clients",
|
||||
"whisperLists.activate": "Aktivieren",
|
||||
"whisperLists.delete": "Löschen",
|
||||
"whisperLists.empty": "Keine Whisperlisten gespeichert. Wähle Whisper-Ziele aus und speichere sie hier als Liste.",
|
||||
|
||||
"identities.title": "Identitäten",
|
||||
"identities.activate": "Aktivieren",
|
||||
"identities.add": "Neue Identität",
|
||||
"identities.delete": "Löschen",
|
||||
"identities.newName": "Neue Identität",
|
||||
"identities.generated": "Erstellt",
|
||||
"identities.pending": "Wird bei der nächsten Verbindung erstellt",
|
||||
"identities.listLabel": "Lokale Identitäten",
|
||||
"identities.name": "Identität Name:",
|
||||
"identities.phoneticNickname": "Phonetischer Nickname:",
|
||||
"identities.uniqueId": "Eindeutige ID:",
|
||||
"identities.unknown": "Unbekannt",
|
||||
"identities.setDefault": "Standard",
|
||||
"identities.isDefault": "Aktuell als Standard verwendet",
|
||||
"identities.export": "Exportieren",
|
||||
"identities.import": "Importieren",
|
||||
|
||||
"connectionInfo.clientTitle": "Verbindungsinformationen - {name}",
|
||||
"connectionInfo.serverTitle": "Serververbindungsinformationen",
|
||||
"connectionInfo.loading": "Wird geladen…",
|
||||
"connectionInfo.unavailable": "Keine Antwort vom Server (fehlende Berechtigung?).",
|
||||
"connectionInfo.ping": "Ping:",
|
||||
"connectionInfo.connectedSince": "Verbunden seit:",
|
||||
"connectionInfo.uptime": "Uptime:",
|
||||
"connectionInfo.name": "Name:",
|
||||
"connectionInfo.avgPing": "Mittlerer Ping:",
|
||||
"connectionInfo.avgPacketLoss": "Mittlerer Paketverlust:",
|
||||
"connectionInfo.incoming": "Eingehend",
|
||||
"connectionInfo.outgoing": "Ausgehend",
|
||||
"connectionInfo.packetsTransferred": "Übertragene Pakete",
|
||||
"connectionInfo.bytesTransferred": "Übertragene Bytes",
|
||||
"connectionInfo.bandwidthLastSecond": "Bandbreite letzte Sekunde",
|
||||
"connectionInfo.bandwidthLastMinute": "Bandbreite letzte Minute",
|
||||
"connectionInfo.ftBandwidth": "Dateitransfer Bandbreite",
|
||||
"connectionInfo.ftBytes": "Dateitransfer übertragene Bytes",
|
||||
"connectionInfo.ip": "IP-Adresse:",
|
||||
"connectionInfo.packetLoss": "Paketverlust:",
|
||||
"connectionInfo.packetsSent": "Pakete gesendet:",
|
||||
"connectionInfo.packetsReceived": "Pakete empfangen:",
|
||||
"connectionInfo.bytesSent": "Daten gesendet:",
|
||||
"connectionInfo.bytesReceived": "Daten empfangen:",
|
||||
"connectionInfo.bandwidthSent": "Bandbreite gesendet:",
|
||||
"connectionInfo.bandwidthReceived": "Bandbreite empfangen:",
|
||||
|
||||
"menu.self.recordingProfile": "Aufnahmeprofil",
|
||||
"menu.self.playbackProfile": "Wiedergabeprofil",
|
||||
"menu.self.hotkeyProfile": "Hotkeyprofil",
|
||||
"menu.self.soundPack": "Sound Pack",
|
||||
"menu.self.setAway": "Abwesend setzen",
|
||||
"menu.self.enableMic": "Mikrofon aktivieren",
|
||||
"menu.self.disableMic": "Mikrofon ausschalten",
|
||||
"menu.self.muteOutput": "Lautsprecher/Kopfhörer ausschalten",
|
||||
"menu.self.unmuteOutput": "Lautsprecher/Kopfhörer einschalten",
|
||||
"menu.self.changeNickname": "Nickname ändern",
|
||||
"menu.self.requestTalkPower": "Talk Power anfordern",
|
||||
"menu.self.setAvatar": "Avatar setzen",
|
||||
"menu.self.setPhoneticNickname": "Phonetischen Nicknamen setzen",
|
||||
"menu.self.connectionInfo": "Verbindungsinformationen",
|
||||
|
||||
"contacts.title": "Kontakte",
|
||||
"contacts.addOnlineClient": "Online-Client auswählen...",
|
||||
"contacts.add": "Hinzufügen",
|
||||
"contacts.remove": "Entfernen",
|
||||
"contacts.empty": "Noch keine Kontakte.",
|
||||
"contacts.customName": "Benutzerdefinierter Name:",
|
||||
"contacts.category.acquaintance": "Bekannter",
|
||||
"contacts.category.blocked": "Blockiert",
|
||||
"contacts.category.friend": "Freund",
|
||||
"contacts.phoneticName": "Phonetischer Name:",
|
||||
"contacts.show": "Anzeige",
|
||||
"contacts.ignore": "Ignorieren",
|
||||
"contacts.unignore": "Nicht mehr ignorieren",
|
||||
"contacts.whisper": "Whispern",
|
||||
"contacts.preferences": "Voreinstellungen",
|
||||
|
||||
"favorites.title": "🔖 myTeamSpeak Favoriten",
|
||||
"favorites.synced": "Synchronisierte Favoriten",
|
||||
"favorites.notLoggedIn": "Nicht angemeldet",
|
||||
@@ -89,7 +216,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"favorites.newFavoriteName": "Neuer Favorit",
|
||||
"favorites.showServerQueryClients": "ServerQuery Clients anzeigen",
|
||||
"favorites.connectOnStartup": "Beim Start verbinden",
|
||||
"favorites.enableMyTeamSpeak": "Aktiviere myTeamSpeak Funktionen",
|
||||
"favorites.new": "Neuer Favorit",
|
||||
"favorites.newFolder": "Neuer Ordner",
|
||||
"favorites.remove": "Entfernen",
|
||||
@@ -113,6 +239,30 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"options.section.wiedergabe": "Wiedergabe",
|
||||
"options.section.aufnahme": "Aufnahme",
|
||||
"options.section.design": "Design",
|
||||
"design.subtitle": "Wähle das Erscheinungsbild der Anwendung.",
|
||||
"design.theme.standard": "Standard",
|
||||
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
|
||||
"design.theme.nova": "Nova",
|
||||
"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.status.connected": "Verbunden",
|
||||
"design.custom.new": "+ Neues Design",
|
||||
"design.custom.import": "Design importieren",
|
||||
"design.custom.edit": "Bearbeiten",
|
||||
"design.custom.duplicate": "Duplizieren",
|
||||
"design.custom.export": "Exportieren",
|
||||
"design.custom.delete": "Löschen",
|
||||
"design.custom.deleteConfirm": "Dieses Design wirklich löschen?",
|
||||
"design.custom.newTitle": "Neues Design erstellen",
|
||||
"design.custom.editTitle": "Design bearbeiten",
|
||||
"design.custom.name": "Name",
|
||||
"design.custom.base": "Basis-Layout",
|
||||
"design.custom.css": "CSS",
|
||||
"design.custom.hint": "Dieses CSS wird geladen, solange das Design aktiv ist. Nutze .ts-app { ... } und die vorhandenen CSS-Variablen (--accent, --bg, --text, --border, ...), um Farben, Radien und Abstände anzupassen - mit .ts-app .irgendeine-klasse { display: none } oder order lässt sich auch das Layout verändern.",
|
||||
"design.custom.save": "Speichern",
|
||||
"design.custom.copyOf": "Kopie von {name}",
|
||||
"design.custom.importError": "Diese Datei konnte nicht als WebSpeak3-Design gelesen werden.",
|
||||
"options.section.erweiterungen": "Erweiterungen",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
"options.section.whispern": "Whispern",
|
||||
@@ -129,6 +279,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"app.language.auto": "Systemvorgabe",
|
||||
"app.language.de": "Deutsch",
|
||||
"app.language.en": "English",
|
||||
"app.language.zh-CN": "简体中文",
|
||||
|
||||
"playback.title": "Wiedergabe",
|
||||
"playback.subtitle": "Ändern der Wiedergabeeinstellungen",
|
||||
@@ -160,6 +311,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"recording.typingAttenuation": "Typing attenuation",
|
||||
"recording.echoCancellation": "Echo Dämpfung",
|
||||
"recording.noiseSuppression": "Hintergrundgeräusche entfernen",
|
||||
"recording.autoGainControl": "Automatische Verstärkung",
|
||||
|
||||
"info.address": "Adresse:",
|
||||
"info.version": "Version:",
|
||||
@@ -168,19 +320,29 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"info.currentChannels": "Aktuelle Channel:",
|
||||
"info.topic": "Topic:",
|
||||
"info.audioCodec": "Audio Codec:",
|
||||
"info.spacer": "Spacer:",
|
||||
"info.rawName": "Rohname:",
|
||||
"info.passwordProtected": "Passwort geschützt:",
|
||||
"info.clients": "Clients:",
|
||||
"info.country": "Land:",
|
||||
"info.muted": "Mikrofon stumm:",
|
||||
"info.outputMuted": "Lautsprecher stumm:",
|
||||
"info.serverGroups": "Servergruppen:",
|
||||
"info.yes": "Ja",
|
||||
"info.no": "Nein",
|
||||
|
||||
"tree.notConnected": "Nicht verbunden",
|
||||
"tree.clickToSelect": "Klicken zum Auswählen, Doppelklick zum Beitreten",
|
||||
"tree.clickToJoin": "Doppelklick zum Beitreten",
|
||||
"tree.joinNotConnected": "Nicht verbunden — Channel-Wechsel nicht möglich",
|
||||
"tree.passwordProtected": "Passwortgeschützt",
|
||||
"tree.privateChatWith": "Privater Chat mit",
|
||||
"tree.poke": "Anstupsen",
|
||||
"tree.channelCommander": "Channel Commander",
|
||||
"tree.away": "Abwesend",
|
||||
"tree.micMuted": "Mikrofon stummgeschaltet",
|
||||
"tree.talking": "Spricht",
|
||||
"tree.noTalkPower": "Keine Redeerlaubnis in diesem Channel",
|
||||
"tree.soundMuted": "Ton stummgeschaltet (deafened)",
|
||||
|
||||
"chat.server": "Server",
|
||||
@@ -209,17 +371,164 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"poke.pokedYou": "hat dich angestupst",
|
||||
"poke.dismiss": "Schließen",
|
||||
|
||||
"kick.title": "Kicken:",
|
||||
"kick.reasonPlaceholder": "Grund (optional)...",
|
||||
"kick.confirm": "Kicken",
|
||||
"kick.cancel": "Abbrechen",
|
||||
|
||||
"ban.title": "Bannen:",
|
||||
"ban.reasonPlaceholder": "Grund (optional)...",
|
||||
"ban.duration": "Dauer:",
|
||||
"ban.durationPermanent": "Permanent",
|
||||
"ban.duration1h": "1 Stunde",
|
||||
"ban.duration1d": "1 Tag",
|
||||
"ban.duration1w": "1 Woche",
|
||||
"ban.confirm": "Bannen",
|
||||
"ban.cancel": "Abbrechen",
|
||||
|
||||
"serverEdit.title": "Virtuellen Server editieren",
|
||||
"serverEdit.tab.host": "Host",
|
||||
"serverEdit.tab.misc": "Verschiedenes",
|
||||
"serverEdit.tab.transmission": "Übertragung",
|
||||
"serverEdit.tab.antiflood": "Anti-Flood",
|
||||
"serverEdit.tab.security": "Sicherheit",
|
||||
"serverEdit.tab.log": "Protokoll",
|
||||
"serverEdit.name": "Servername:",
|
||||
"serverEdit.welcomeMessage": "Willkommensnachricht:",
|
||||
"serverEdit.clearPassword": "Serverpasswort entfernen",
|
||||
"serverEdit.newPassword": "Neues Serverpasswort:",
|
||||
"serverEdit.hostmessage": "Hostnachricht:",
|
||||
"serverEdit.hostmessageMode": "Anzeigemodus:",
|
||||
"serverEdit.hostmessageMode.none": "Nicht anzeigen",
|
||||
"serverEdit.hostmessageMode.log": "Im Protokoll anzeigen",
|
||||
"serverEdit.hostmessageMode.modal": "Als Dialog anzeigen",
|
||||
"serverEdit.hostmessageMode.modalquit": "Als Dialog anzeigen und trennen",
|
||||
"serverEdit.hostbannerUrl": "Host-Banner URL:",
|
||||
"serverEdit.hostbannerGfxUrl": "Host-Banner Bild-URL:",
|
||||
"serverEdit.hostbannerGfxInterval": "Banner-Aktualisierung (Sekunden):",
|
||||
"serverEdit.hostbannerMode": "Banner-Anpassung:",
|
||||
"serverEdit.hostbannerMode.noadjust": "Nicht anpassen",
|
||||
"serverEdit.hostbannerMode.adjustignoreaspect": "Anpassen (Seitenverhältnis ignorieren)",
|
||||
"serverEdit.hostbannerMode.adjustkeepaspect": "Anpassen (Seitenverhältnis beibehalten)",
|
||||
"serverEdit.hostbuttonTooltip": "Host-Button Tooltip:",
|
||||
"serverEdit.hostbuttonUrl": "Host-Button URL:",
|
||||
"serverEdit.hostbuttonGfxUrl": "Host-Button Bild-URL:",
|
||||
"serverEdit.maxClients": "Maximale Clientanzahl:",
|
||||
"serverEdit.nickname": "Server-Nickname:",
|
||||
"serverEdit.phoneticName": "Phonetischer Name:",
|
||||
"serverEdit.codecEncryptionMode": "Sprachverschlüsselung:",
|
||||
"serverEdit.codecEncryptionMode.perchannel": "Pro Channel konfigurierbar",
|
||||
"serverEdit.codecEncryptionMode.forcedoff": "Global deaktiviert",
|
||||
"serverEdit.codecEncryptionMode.forcedon": "Global aktiviert",
|
||||
"serverEdit.unchanged": "Unverändert lassen",
|
||||
"serverEdit.save": "Speichern",
|
||||
"serverEdit.cancel": "Abbrechen",
|
||||
|
||||
"serverProtocolLog.title": "Server Protokoll",
|
||||
"serverProtocolLog.empty": "Keine Protokolleinträge vorhanden.",
|
||||
"banList.title": "Bannliste",
|
||||
"banList.empty": "Keine Bans vorhanden.",
|
||||
"banList.name": "Name",
|
||||
"banList.ip": "IP",
|
||||
"banList.created": "Erstellt",
|
||||
"banList.duration": "Dauer",
|
||||
"banList.invoker": "Von",
|
||||
"banList.reason": "Grund",
|
||||
"banList.permanent": "Permanent",
|
||||
"banList.delete": "Löschen",
|
||||
"banList.deleteAll": "Alle löschen",
|
||||
"complainList.title": "Beschwerdeliste",
|
||||
"complainList.empty": "Keine Beschwerden vorhanden.",
|
||||
"complainList.target": "Ziel",
|
||||
"complainList.from": "Von",
|
||||
"complainList.message": "Nachricht",
|
||||
"complainList.timestamp": "Zeitpunkt",
|
||||
"offlineMessages.title": "Offline Nachrichten",
|
||||
"offlineMessages.empty": "Keine Nachrichten vorhanden.",
|
||||
"offlineMessages.subject": "Betreff",
|
||||
"offlineMessages.from": "Von",
|
||||
"offlineMessages.timestamp": "Zeitpunkt",
|
||||
"offlineMessages.targetUid": "Ziel-UID",
|
||||
"offlineMessages.message": "Nachricht",
|
||||
"offlineMessages.send": "Senden",
|
||||
"offlineMessages.new": "Neue Nachricht",
|
||||
"offlineMessages.markRead": "Als gelesen markieren",
|
||||
"offlineMessages.backToList": "Zurück zur Liste",
|
||||
"dialog.cancel": "Abbrechen",
|
||||
|
||||
"groupAssign.channelTitle": "Channel-Gruppe zuweisen",
|
||||
"groupAssign.serverTitle": "Server-Gruppe zuweisen",
|
||||
"groupAssign.empty": "Keine Gruppen vorhanden.",
|
||||
"groupAssign.clickToRemove": "Klicken zum Entfernen",
|
||||
|
||||
"serverQueryLogin.username": "Benutzername",
|
||||
"serverQueryLogin.password": "Passwort",
|
||||
"serverQueryLogin.login": "Anmelden",
|
||||
|
||||
"permissionOverview.title": "Eigene Rechte",
|
||||
"permissionOverview.empty": "Keine Rechte gefunden.",
|
||||
"permissionOverview.name": "Recht",
|
||||
"permissionOverview.value": "Wert",
|
||||
"permissionOverview.negated": "Negiert",
|
||||
"permissionOverview.skip": "Skip",
|
||||
|
||||
"permsEditor.title": "Rechte",
|
||||
"permsEditor.tab.server": "Server Gruppen",
|
||||
"permsEditor.tab.client": "Client Rechte",
|
||||
"permsEditor.tab.channel": "Channel Rechte",
|
||||
"permsEditor.tab.channelgroup": "Channel Gruppen",
|
||||
"permsEditor.tab.channelclient": "Channel Client Rechte",
|
||||
"permsEditor.clientDbId": "Eindeutige Client-DB-ID:",
|
||||
"permsEditor.load": "Laden",
|
||||
"permsEditor.pickOnlineClient": "Oder Online-Client wählen...",
|
||||
"permsEditor.pickTarget": "Bitte links eine Gruppe/einen Channel wählen bzw. eine Client-ID eingeben.",
|
||||
"permsEditor.addPermission": "Hinzufügen",
|
||||
"permsEditor.searchPermission": "Recht suchen...",
|
||||
|
||||
"dialog.ok": "OK",
|
||||
"channelContext.join": "Channel wechseln",
|
||||
"channelContext.files": "Dateien...",
|
||||
"fileBrowser.title": "Dateitransfers",
|
||||
"fileBrowser.up": "Nach oben",
|
||||
"fileBrowser.refresh": "Aktualisieren",
|
||||
"fileBrowser.newFolder": "Neuer Ordner",
|
||||
"fileBrowser.upload": "Hochladen",
|
||||
"fileBrowser.folderName": "Ordnername",
|
||||
"fileBrowser.empty": "Dieser Ordner ist leer.",
|
||||
"fileBrowser.name": "Name",
|
||||
"fileBrowser.size": "Größe",
|
||||
"fileBrowser.modified": "Geändert",
|
||||
"fileBrowser.download": "Herunterladen",
|
||||
"fileBrowser.rename": "Umbenennen",
|
||||
"fileBrowser.delete": "Löschen",
|
||||
"fileBrowser.deleteConfirm": "Wirklich löschen?",
|
||||
"fileBrowser.uploading": "Wird hochgeladen...",
|
||||
"fileBrowser.downloading": "Wird heruntergeladen...",
|
||||
|
||||
"serverContext.icons": "Server-Icons...",
|
||||
"serverIcons.title": "Server-Icons verwalten",
|
||||
"serverIcons.upload": "Icon hochladen",
|
||||
"serverIcons.iconId": "Icon-ID",
|
||||
"serverIcons.empty": "Keine Icons vorhanden.",
|
||||
|
||||
"clientContext.privateChat": "Privater Chat",
|
||||
"clientContext.poke": "Anstupsen",
|
||||
"clientContext.copyName": "Namen kopieren",
|
||||
"clientContext.connectionInfo": "Verbindungsinformationen anzeigen",
|
||||
"clientContext.addWhisperTarget": "Als Whisper-Ziel hinzufügen",
|
||||
"clientContext.removeWhisperTarget": "Als Whisper-Ziel entfernen",
|
||||
"clientContext.assignChannelGroup": "Channel-Gruppe zuweisen",
|
||||
"clientContext.assignServerGroup": "Server-Gruppe zuweisen",
|
||||
"clientContext.kickChannel": "Aus dem Channel kicken",
|
||||
"clientContext.kick": "Vom Server kicken",
|
||||
"clientContext.ban": "Bannen",
|
||||
"clientContext.notSupported": "Im Web-Client noch nicht unterstützt",
|
||||
|
||||
"serverContext.connectionInfo": "Serververbindungsinformationen",
|
||||
"serverContext.copyAddress": "Serveradresse kopieren",
|
||||
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
|
||||
"serverContext.disconnect": "Verbindung trennen",
|
||||
|
||||
"connectError.dismiss": "Schließen",
|
||||
"dialog.close": "Schließen",
|
||||
|
||||
@@ -264,19 +573,24 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"menu.favorites.manage": "Manage bookmarks",
|
||||
"menu.self": "Self",
|
||||
"menu.rights": "Permissions",
|
||||
"menu.rights.serverGroups": "Edit server groups...",
|
||||
"menu.rights.channelGroups": "Edit channel groups...",
|
||||
"menu.rights.serverPermissions": "Edit server permissions...",
|
||||
"menu.rights.channelPermissions": "Edit channel permissions...",
|
||||
"menu.rights.overview": "Permission overview...",
|
||||
"menu.rights.myRights": "Show my permissions",
|
||||
"menu.extras": "Tools",
|
||||
"menu.help": "Help",
|
||||
"menu.extras.identities": "Identities",
|
||||
"menu.extras.contacts": "Contacts",
|
||||
"menu.extras.collectedUrls": "Collected URLs",
|
||||
"menu.extras.fileTransfers": "File Transfers",
|
||||
"menu.extras.inviteFriend": "Invite a friend",
|
||||
"menu.extras.offlineMessages": "Offline Messages",
|
||||
"menu.extras.whisperLists": "Whisper Lists",
|
||||
"menu.extras.whisperHistory": "Whisper History",
|
||||
"menu.extras.clientLog": "Client Log",
|
||||
"menu.extras.banList": "Ban List",
|
||||
"menu.extras.complaintList": "Complaint List",
|
||||
"menu.extras.offlineMessages": "Offline Messages",
|
||||
"menu.extras.serverQueryLogin": "ServerQuery Login",
|
||||
"menu.extras.serverLog": "Server Log",
|
||||
"menu.extras.startRecording": "Start Recording",
|
||||
@@ -304,6 +618,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"away.setGlobalStatus": "Set global away status",
|
||||
|
||||
"connect.title": "Connect",
|
||||
"connect.novaSubtitle": "WebSpeak3 runs entirely in the browser — no download needed",
|
||||
"connect.serverAddress": "Server nickname or address:",
|
||||
"connect.serverPassword": "Server password:",
|
||||
"connect.nickname": "Nickname:",
|
||||
@@ -314,8 +629,11 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.channelPassword": "Channel password:",
|
||||
"connect.playbackProfile": "Playback profile:",
|
||||
"connect.onetimeGrant": "One-time privilege key:",
|
||||
"connect.serverType": "Server type:",
|
||||
"connect.serverType.auto": "Auto",
|
||||
"connect.serverType.teamspeak": "TeamSpeak",
|
||||
"connect.serverType.teaspeak": "TeaSpeak",
|
||||
"connect.hotkeyProfile": "Hotkey profile:",
|
||||
"connect.sendMyTeamSpeakId": "Send myTeamSpeak ID",
|
||||
"connect.soundPack": "Sound pack:",
|
||||
"connect.more": "More",
|
||||
"connect.less": "Less",
|
||||
@@ -324,6 +642,123 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.newTab": "In new tab",
|
||||
"connect.cancel": "Cancel",
|
||||
|
||||
"collectedUrls.title": "Collected URLs",
|
||||
"collectedUrls.search": "Search:",
|
||||
"collectedUrls.url": "URL",
|
||||
"collectedUrls.count": "Count",
|
||||
"collectedUrls.lastSeen": "Last mentioned",
|
||||
"collectedUrls.mentionedBy": "Mentioned by",
|
||||
"collectedUrls.clearList": "Clear list",
|
||||
|
||||
"inviteFriend.title": "Invite a friend",
|
||||
"inviteFriend.type": "Invitation type",
|
||||
"inviteFriend.includeChannel": "Insert current channel",
|
||||
"inviteFriend.link": "Link",
|
||||
"inviteFriend.addPermissionKey": "Add permission key",
|
||||
"inviteFriend.copyToClipboard": "Copy to clipboard",
|
||||
"inviteFriend.copied": "Copied!",
|
||||
|
||||
"clientLog.title": "Client Log",
|
||||
"clientLog.level.critical": "Critical",
|
||||
"clientLog.level.error": "Errors",
|
||||
"clientLog.level.warning": "Warnings",
|
||||
"clientLog.level.info": "Info",
|
||||
"clientLog.level.debug": "Debug",
|
||||
"clientLog.search": "Search:",
|
||||
"clientLog.filter": "Filter:",
|
||||
"clientLog.caseSensitive": "Case sensitive",
|
||||
"clientLog.mark": "Mark",
|
||||
|
||||
"whisperHistory.title": "Whisper History - {server}",
|
||||
"whisperHistory.empty": "No whisper history yet.",
|
||||
"whisperHistory.started": "Whispering to: {targets}",
|
||||
"whisperHistory.stopped": "Stopped whispering",
|
||||
"whisperHistory.clear": "Clear",
|
||||
"whisperHistory.options": "Options",
|
||||
|
||||
"whisperLists.title": "Whisper Lists",
|
||||
"whisperLists.namePlaceholder": "List name",
|
||||
"whisperLists.saveCurrent": "Save current selection",
|
||||
"whisperLists.itemDetail": "{channels} channels, {clients} clients",
|
||||
"whisperLists.activate": "Activate",
|
||||
"whisperLists.delete": "Delete",
|
||||
"whisperLists.empty": "No whisper lists saved yet. Select whisper targets and save them here as a list.",
|
||||
|
||||
"identities.title": "Identities",
|
||||
"identities.activate": "Activate",
|
||||
"identities.add": "New Identity",
|
||||
"identities.delete": "Delete",
|
||||
"identities.newName": "New Identity",
|
||||
"identities.generated": "Generated",
|
||||
"identities.pending": "Will be generated on next connection",
|
||||
"identities.listLabel": "Local Identities",
|
||||
"identities.name": "Identity Name:",
|
||||
"identities.phoneticNickname": "Phonetic Nickname:",
|
||||
"identities.uniqueId": "Unique ID:",
|
||||
"identities.unknown": "Unknown",
|
||||
"identities.setDefault": "Set as Default",
|
||||
"identities.isDefault": "Currently used as default",
|
||||
"identities.export": "Export",
|
||||
"identities.import": "Import",
|
||||
|
||||
"connectionInfo.clientTitle": "Connection Info - {name}",
|
||||
"connectionInfo.serverTitle": "Server Connection Info",
|
||||
"connectionInfo.loading": "Loading…",
|
||||
"connectionInfo.unavailable": "No response from the server (missing permission?).",
|
||||
"connectionInfo.ping": "Ping:",
|
||||
"connectionInfo.connectedSince": "Connected since:",
|
||||
"connectionInfo.uptime": "Uptime:",
|
||||
"connectionInfo.name": "Name:",
|
||||
"connectionInfo.avgPing": "Average ping:",
|
||||
"connectionInfo.avgPacketLoss": "Average packet loss:",
|
||||
"connectionInfo.incoming": "Incoming",
|
||||
"connectionInfo.outgoing": "Outgoing",
|
||||
"connectionInfo.packetsTransferred": "Packets transferred",
|
||||
"connectionInfo.bytesTransferred": "Bytes transferred",
|
||||
"connectionInfo.bandwidthLastSecond": "Bandwidth last second",
|
||||
"connectionInfo.bandwidthLastMinute": "Bandwidth last minute",
|
||||
"connectionInfo.ftBandwidth": "File transfer bandwidth",
|
||||
"connectionInfo.ftBytes": "File transfer bytes",
|
||||
"connectionInfo.ip": "IP address:",
|
||||
"connectionInfo.packetLoss": "Packet loss:",
|
||||
"connectionInfo.packetsSent": "Packets sent:",
|
||||
"connectionInfo.packetsReceived": "Packets received:",
|
||||
"connectionInfo.bytesSent": "Data sent:",
|
||||
"connectionInfo.bytesReceived": "Data received:",
|
||||
"connectionInfo.bandwidthSent": "Bandwidth sent:",
|
||||
"connectionInfo.bandwidthReceived": "Bandwidth received:",
|
||||
|
||||
"menu.self.recordingProfile": "Recording Profile",
|
||||
"menu.self.playbackProfile": "Playback Profile",
|
||||
"menu.self.hotkeyProfile": "Hotkey Profile",
|
||||
"menu.self.soundPack": "Sound Pack",
|
||||
"menu.self.setAway": "Set Away",
|
||||
"menu.self.enableMic": "Enable Microphone",
|
||||
"menu.self.disableMic": "Disable Microphone",
|
||||
"menu.self.muteOutput": "Mute Speakers/Headphones",
|
||||
"menu.self.unmuteOutput": "Unmute Speakers/Headphones",
|
||||
"menu.self.changeNickname": "Change Nickname",
|
||||
"menu.self.requestTalkPower": "Request Talk Power",
|
||||
"menu.self.setAvatar": "Set Avatar",
|
||||
"menu.self.setPhoneticNickname": "Set Phonetic Nickname",
|
||||
"menu.self.connectionInfo": "Connection Info",
|
||||
|
||||
"contacts.title": "Contacts",
|
||||
"contacts.addOnlineClient": "Select an online client...",
|
||||
"contacts.add": "Add",
|
||||
"contacts.remove": "Remove",
|
||||
"contacts.empty": "No contacts yet.",
|
||||
"contacts.customName": "Custom Name:",
|
||||
"contacts.category.acquaintance": "Acquaintance",
|
||||
"contacts.category.blocked": "Blocked",
|
||||
"contacts.category.friend": "Friend",
|
||||
"contacts.phoneticName": "Phonetic Name:",
|
||||
"contacts.show": "Show",
|
||||
"contacts.ignore": "Ignore",
|
||||
"contacts.unignore": "Unignore",
|
||||
"contacts.whisper": "Whisper",
|
||||
"contacts.preferences": "Preferences",
|
||||
|
||||
"favorites.title": "🔖 myTeamSpeak Bookmarks",
|
||||
"favorites.synced": "Synced Bookmarks",
|
||||
"favorites.notLoggedIn": "Not logged in",
|
||||
@@ -333,7 +768,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"favorites.newFavoriteName": "New bookmark",
|
||||
"favorites.showServerQueryClients": "Show ServerQuery clients",
|
||||
"favorites.connectOnStartup": "Connect on startup",
|
||||
"favorites.enableMyTeamSpeak": "Enable myTeamSpeak features",
|
||||
"favorites.new": "New bookmark",
|
||||
"favorites.newFolder": "New folder",
|
||||
"favorites.remove": "Remove",
|
||||
@@ -357,6 +791,30 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"options.section.wiedergabe": "Playback",
|
||||
"options.section.aufnahme": "Capture",
|
||||
"options.section.design": "Appearance",
|
||||
"design.subtitle": "Choose the application's look.",
|
||||
"design.theme.standard": "Standard",
|
||||
"design.theme.standard.desc": "The original WebSpeak3 design.",
|
||||
"design.theme.nova": "Nova",
|
||||
"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.status.connected": "Connected",
|
||||
"design.custom.new": "+ New design",
|
||||
"design.custom.import": "Import design",
|
||||
"design.custom.edit": "Edit",
|
||||
"design.custom.duplicate": "Duplicate",
|
||||
"design.custom.export": "Export",
|
||||
"design.custom.delete": "Delete",
|
||||
"design.custom.deleteConfirm": "Really delete this design?",
|
||||
"design.custom.newTitle": "Create a new design",
|
||||
"design.custom.editTitle": "Edit design",
|
||||
"design.custom.name": "Name",
|
||||
"design.custom.base": "Base layout",
|
||||
"design.custom.css": "CSS",
|
||||
"design.custom.hint": "This CSS loads while the design is active. Use .ts-app { ... } and the existing CSS variables (--accent, --bg, --text, --border, ...) to adjust colors, radii and spacing - with .ts-app .some-class { display: none } or order you can even change the layout.",
|
||||
"design.custom.save": "Save",
|
||||
"design.custom.copyOf": "Copy of {name}",
|
||||
"design.custom.importError": "This file couldn't be read as a WebSpeak3 design.",
|
||||
"options.section.erweiterungen": "Addons",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
"options.section.whispern": "Whisper",
|
||||
@@ -373,6 +831,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"app.language.auto": "System default",
|
||||
"app.language.de": "Deutsch",
|
||||
"app.language.en": "English",
|
||||
"app.language.zh-CN": "简体中文",
|
||||
|
||||
"playback.title": "Playback",
|
||||
"playback.subtitle": "Change your playback settings",
|
||||
@@ -404,6 +863,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"recording.typingAttenuation": "Typing attenuation",
|
||||
"recording.echoCancellation": "Echo cancellation",
|
||||
"recording.noiseSuppression": "Remove background noise",
|
||||
"recording.autoGainControl": "Automatic gain control",
|
||||
|
||||
"info.address": "Address:",
|
||||
"info.version": "Version:",
|
||||
@@ -412,19 +872,29 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"info.currentChannels": "Current channels:",
|
||||
"info.topic": "Topic:",
|
||||
"info.audioCodec": "Audio codec:",
|
||||
"info.spacer": "Spacer:",
|
||||
"info.rawName": "Raw name:",
|
||||
"info.passwordProtected": "Password protected:",
|
||||
"info.clients": "Clients:",
|
||||
"info.country": "Country:",
|
||||
"info.muted": "Microphone muted:",
|
||||
"info.outputMuted": "Speakers muted:",
|
||||
"info.serverGroups": "Server groups:",
|
||||
"info.yes": "Yes",
|
||||
"info.no": "No",
|
||||
|
||||
"tree.notConnected": "Not connected",
|
||||
"tree.clickToSelect": "Click to select, double-click to join",
|
||||
"tree.clickToJoin": "Double-click to join",
|
||||
"tree.joinNotConnected": "Not connected — cannot switch channel",
|
||||
"tree.passwordProtected": "Password protected",
|
||||
"tree.privateChatWith": "Private chat with",
|
||||
"tree.poke": "Poke",
|
||||
"tree.channelCommander": "Channel commander",
|
||||
"tree.away": "Away",
|
||||
"tree.micMuted": "Microphone muted",
|
||||
"tree.talking": "Talking",
|
||||
"tree.noTalkPower": "No talk power in this channel",
|
||||
"tree.soundMuted": "Sound muted (deafened)",
|
||||
|
||||
"chat.server": "Server",
|
||||
@@ -453,17 +923,164 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"poke.pokedYou": "poked you",
|
||||
"poke.dismiss": "Dismiss",
|
||||
|
||||
"kick.title": "Kick:",
|
||||
"kick.reasonPlaceholder": "Reason (optional)...",
|
||||
"kick.confirm": "Kick",
|
||||
"kick.cancel": "Cancel",
|
||||
|
||||
"ban.title": "Ban:",
|
||||
"ban.reasonPlaceholder": "Reason (optional)...",
|
||||
"ban.duration": "Duration:",
|
||||
"ban.durationPermanent": "Permanent",
|
||||
"ban.duration1h": "1 hour",
|
||||
"ban.duration1d": "1 day",
|
||||
"ban.duration1w": "1 week",
|
||||
"ban.confirm": "Ban",
|
||||
"ban.cancel": "Cancel",
|
||||
|
||||
"serverEdit.title": "Edit Virtual Server",
|
||||
"serverEdit.tab.host": "Host",
|
||||
"serverEdit.tab.misc": "Misc",
|
||||
"serverEdit.tab.transmission": "Transmission",
|
||||
"serverEdit.tab.antiflood": "Anti-Flood",
|
||||
"serverEdit.tab.security": "Security",
|
||||
"serverEdit.tab.log": "Log",
|
||||
"serverEdit.name": "Server name:",
|
||||
"serverEdit.welcomeMessage": "Welcome message:",
|
||||
"serverEdit.clearPassword": "Remove server password",
|
||||
"serverEdit.newPassword": "New server password:",
|
||||
"serverEdit.hostmessage": "Host message:",
|
||||
"serverEdit.hostmessageMode": "Display mode:",
|
||||
"serverEdit.hostmessageMode.none": "Don't display",
|
||||
"serverEdit.hostmessageMode.log": "Display in log",
|
||||
"serverEdit.hostmessageMode.modal": "Display as dialog",
|
||||
"serverEdit.hostmessageMode.modalquit": "Display as dialog and disconnect",
|
||||
"serverEdit.hostbannerUrl": "Host banner URL:",
|
||||
"serverEdit.hostbannerGfxUrl": "Host banner image URL:",
|
||||
"serverEdit.hostbannerGfxInterval": "Banner refresh (seconds):",
|
||||
"serverEdit.hostbannerMode": "Banner scaling:",
|
||||
"serverEdit.hostbannerMode.noadjust": "Don't adjust",
|
||||
"serverEdit.hostbannerMode.adjustignoreaspect": "Adjust (ignore aspect ratio)",
|
||||
"serverEdit.hostbannerMode.adjustkeepaspect": "Adjust (keep aspect ratio)",
|
||||
"serverEdit.hostbuttonTooltip": "Host button tooltip:",
|
||||
"serverEdit.hostbuttonUrl": "Host button URL:",
|
||||
"serverEdit.hostbuttonGfxUrl": "Host button image URL:",
|
||||
"serverEdit.maxClients": "Max clients:",
|
||||
"serverEdit.nickname": "Server nickname:",
|
||||
"serverEdit.phoneticName": "Phonetic name:",
|
||||
"serverEdit.codecEncryptionMode": "Voice encryption:",
|
||||
"serverEdit.codecEncryptionMode.perchannel": "Configurable per channel",
|
||||
"serverEdit.codecEncryptionMode.forcedoff": "Globally disabled",
|
||||
"serverEdit.codecEncryptionMode.forcedon": "Globally enabled",
|
||||
"serverEdit.unchanged": "Leave unchanged",
|
||||
"serverEdit.save": "Save",
|
||||
"serverEdit.cancel": "Cancel",
|
||||
|
||||
"serverProtocolLog.title": "Server Log",
|
||||
"serverProtocolLog.empty": "No log entries.",
|
||||
"banList.title": "Ban List",
|
||||
"banList.empty": "No bans found.",
|
||||
"banList.name": "Name",
|
||||
"banList.ip": "IP",
|
||||
"banList.created": "Created",
|
||||
"banList.duration": "Duration",
|
||||
"banList.invoker": "By",
|
||||
"banList.reason": "Reason",
|
||||
"banList.permanent": "Permanent",
|
||||
"banList.delete": "Delete",
|
||||
"banList.deleteAll": "Delete all",
|
||||
"complainList.title": "Complaint List",
|
||||
"complainList.empty": "No complaints found.",
|
||||
"complainList.target": "Target",
|
||||
"complainList.from": "From",
|
||||
"complainList.message": "Message",
|
||||
"complainList.timestamp": "Timestamp",
|
||||
"offlineMessages.title": "Offline Messages",
|
||||
"offlineMessages.empty": "No messages found.",
|
||||
"offlineMessages.subject": "Subject",
|
||||
"offlineMessages.from": "From",
|
||||
"offlineMessages.timestamp": "Timestamp",
|
||||
"offlineMessages.targetUid": "Target UID",
|
||||
"offlineMessages.message": "Message",
|
||||
"offlineMessages.send": "Send",
|
||||
"offlineMessages.new": "New message",
|
||||
"offlineMessages.markRead": "Mark as read",
|
||||
"offlineMessages.backToList": "Back to list",
|
||||
"dialog.cancel": "Cancel",
|
||||
|
||||
"groupAssign.channelTitle": "Assign Channel Group",
|
||||
"groupAssign.serverTitle": "Assign Server Group",
|
||||
"groupAssign.empty": "No groups found.",
|
||||
"groupAssign.clickToRemove": "Click to remove",
|
||||
|
||||
"serverQueryLogin.username": "Username",
|
||||
"serverQueryLogin.password": "Password",
|
||||
"serverQueryLogin.login": "Login",
|
||||
|
||||
"permissionOverview.title": "My Permissions",
|
||||
"permissionOverview.empty": "No permissions found.",
|
||||
"permissionOverview.name": "Permission",
|
||||
"permissionOverview.value": "Value",
|
||||
"permissionOverview.negated": "Negated",
|
||||
"permissionOverview.skip": "Skip",
|
||||
|
||||
"permsEditor.title": "Permissions",
|
||||
"permsEditor.tab.server": "Server Groups",
|
||||
"permsEditor.tab.client": "Client Permissions",
|
||||
"permsEditor.tab.channel": "Channel Permissions",
|
||||
"permsEditor.tab.channelgroup": "Channel Groups",
|
||||
"permsEditor.tab.channelclient": "Channel Client Permissions",
|
||||
"permsEditor.clientDbId": "Unique client DB ID:",
|
||||
"permsEditor.load": "Load",
|
||||
"permsEditor.pickOnlineClient": "Or pick an online client...",
|
||||
"permsEditor.pickTarget": "Pick a group/channel on the left, or enter a client ID.",
|
||||
"permsEditor.addPermission": "Add",
|
||||
"permsEditor.searchPermission": "Search permission...",
|
||||
|
||||
"dialog.ok": "OK",
|
||||
"channelContext.join": "Switch to channel",
|
||||
"channelContext.files": "Files...",
|
||||
"fileBrowser.title": "File Transfers",
|
||||
"fileBrowser.up": "Up",
|
||||
"fileBrowser.refresh": "Refresh",
|
||||
"fileBrowser.newFolder": "New Folder",
|
||||
"fileBrowser.upload": "Upload",
|
||||
"fileBrowser.folderName": "Folder name",
|
||||
"fileBrowser.empty": "This folder is empty.",
|
||||
"fileBrowser.name": "Name",
|
||||
"fileBrowser.size": "Size",
|
||||
"fileBrowser.modified": "Modified",
|
||||
"fileBrowser.download": "Download",
|
||||
"fileBrowser.rename": "Rename",
|
||||
"fileBrowser.delete": "Delete",
|
||||
"fileBrowser.deleteConfirm": "Really delete?",
|
||||
"fileBrowser.uploading": "Uploading...",
|
||||
"fileBrowser.downloading": "Downloading...",
|
||||
|
||||
"serverContext.icons": "Server Icons...",
|
||||
"serverIcons.title": "Manage Server Icons",
|
||||
"serverIcons.upload": "Upload Icon",
|
||||
"serverIcons.iconId": "Icon ID",
|
||||
"serverIcons.empty": "No icons found.",
|
||||
|
||||
"clientContext.privateChat": "Private chat",
|
||||
"clientContext.poke": "Poke",
|
||||
"clientContext.copyName": "Copy name",
|
||||
"clientContext.connectionInfo": "Show connection info",
|
||||
"clientContext.addWhisperTarget": "Add as whisper target",
|
||||
"clientContext.removeWhisperTarget": "Remove as whisper target",
|
||||
"clientContext.assignChannelGroup": "Assign channel group",
|
||||
"clientContext.assignServerGroup": "Assign server group",
|
||||
"clientContext.kickChannel": "Kick from channel",
|
||||
"clientContext.kick": "Kick from server",
|
||||
"clientContext.ban": "Ban",
|
||||
"clientContext.notSupported": "Not yet supported in the web client",
|
||||
|
||||
"serverContext.connectionInfo": "Server Connection Info",
|
||||
"serverContext.copyAddress": "Copy server address",
|
||||
"serverContext.addFavorite": "Add to favorites",
|
||||
"serverContext.disconnect": "Disconnect",
|
||||
|
||||
"connectError.dismiss": "Dismiss",
|
||||
"dialog.close": "Close",
|
||||
|
||||
@@ -498,11 +1115,14 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"nachrichten.add": "Add",
|
||||
"nachrichten.delete": "Delete",
|
||||
},
|
||||
"zh-CN": zhCN,
|
||||
};
|
||||
|
||||
function detectSystemLang(): Lang {
|
||||
const nav = typeof navigator !== "undefined" ? navigator.language : "en";
|
||||
return nav?.toLowerCase().startsWith("de") ? "de" : "en";
|
||||
const normalized = nav?.toLowerCase() ?? "en";
|
||||
if (normalized.startsWith("zh")) return "zh-CN";
|
||||
return normalized.startsWith("de") ? "de" : "en";
|
||||
}
|
||||
|
||||
export function resolveLang(pref: LangPref): Lang {
|
||||
@@ -511,7 +1131,7 @@ export function resolveLang(pref: LangPref): Lang {
|
||||
|
||||
export function loadLangPref(): LangPref {
|
||||
const raw = localStorage.getItem(LANGUAGE_KEY);
|
||||
return raw === "de" || raw === "en" || raw === "auto" ? raw : "auto";
|
||||
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "auto" ? raw : "auto";
|
||||
}
|
||||
|
||||
export function saveLangPref(pref: LangPref) {
|
||||
@@ -540,6 +1160,10 @@ export function LanguageProvider({ children }: { children: ReactNode }) {
|
||||
saveLangPref(langPref);
|
||||
}, [langPref]);
|
||||
|
||||
useEffect(() => {
|
||||
document.documentElement.lang = lang;
|
||||
}, [lang]);
|
||||
|
||||
const t: TranslateFn = (key, vars) =>
|
||||
interpolate(translations[lang][key] ?? translations.en[key] ?? key, vars);
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/** TeamSpeak / TeaSpeak / GreenTeaSpeak channel spacer helpers.
|
||||
*
|
||||
* Mirrors GreenTeaSpeak `ChannelTreeBuilder.parseChannelName` / oldclient
|
||||
* `ChannelNameParser`: only root channels, tag must contain "spacer", alignment
|
||||
* prefix l/c/r/* (empty → left), unique id after "spacer" may be any string
|
||||
* (e.g. `[*spacer01]`, `[cspacerabc]`).
|
||||
*/
|
||||
|
||||
export type SpacerAlignment = "left" | "center" | "right" | "repetitive";
|
||||
|
||||
export type ParsedChannelName = {
|
||||
/** Label shown in the tree (tag stripped for spacers). */
|
||||
name: string;
|
||||
alignment: SpacerAlignment | null;
|
||||
};
|
||||
|
||||
/** Pure line fillers that look better as a CSS rule than raw `---` / `***`. */
|
||||
const LINE_FILLER_RE = /^[\-\u2013\u2014\u2500\u2501\u2550=\*\.·_\s]+$/;
|
||||
|
||||
/** Corners / verticals of box-frame spacers (not pure horizontal fills). */
|
||||
const BOX_FRAME_RE = /[╔╗╚╝╒╓╕╖╘╙╛╜┌┐└┘├┤┬┴┼║│╟╢╤╧╪╫╬╒╓╕╖╘╙╛╜]/;
|
||||
|
||||
export function parseChannelName(name: string, isRoot: boolean): ParsedChannelName {
|
||||
if (!isRoot || name.length < 3 || name.charAt(0) !== "[") {
|
||||
return { name, alignment: null };
|
||||
}
|
||||
|
||||
const end = name.indexOf("]");
|
||||
if (end === -1) return { name, alignment: null };
|
||||
|
||||
let options = name.substring(1, end);
|
||||
const spacerIndex = options.indexOf("spacer");
|
||||
if (spacerIndex === -1) return { name, alignment: null };
|
||||
|
||||
options = options.substring(0, spacerIndex);
|
||||
if (options.length === 0) {
|
||||
options = "l";
|
||||
} else if (options.length > 1) {
|
||||
options = options.charAt(0);
|
||||
}
|
||||
|
||||
const alignmentByPrefix: Record<string, SpacerAlignment> = {
|
||||
l: "left",
|
||||
c: "center",
|
||||
r: "right",
|
||||
"*": "repetitive",
|
||||
};
|
||||
const alignment = alignmentByPrefix[options];
|
||||
if (!alignment) return { name, alignment: null };
|
||||
|
||||
return {
|
||||
name: name.substring(end + 1),
|
||||
alignment,
|
||||
};
|
||||
}
|
||||
|
||||
/** Same as oldclient `ChannelName`: repeat filler until it fills the tree row. */
|
||||
export function expandRepetitiveSpacerName(name: string): string {
|
||||
if (!name.length) return name;
|
||||
let expanded = name;
|
||||
while (expanded.length < 8000) {
|
||||
expanded += expanded;
|
||||
}
|
||||
return expanded;
|
||||
}
|
||||
|
||||
export function isLineSpacerFiller(text: string): boolean {
|
||||
const trimmed = text.trim();
|
||||
return trimmed.length > 0 && LINE_FILLER_RE.test(trimmed);
|
||||
}
|
||||
|
||||
export function hasBoxArtChars(text: string): boolean {
|
||||
return BOX_FRAME_RE.test(text);
|
||||
}
|
||||
|
||||
export function spacerDisplayName(rawName: string, isRoot: boolean): {
|
||||
label: string;
|
||||
alignment: SpacerAlignment | null;
|
||||
isSpacer: boolean;
|
||||
/** Repetitive `---` / `***` / `═══` → render as CSS line, not character soup. */
|
||||
isLine: boolean;
|
||||
/** Box-frame spacers (╔╗ / ═) need monospace for GTS look. */
|
||||
isBoxArt: boolean;
|
||||
} {
|
||||
const parsed = parseChannelName(rawName, isRoot);
|
||||
if (!parsed.alignment) {
|
||||
return {
|
||||
label: rawName,
|
||||
alignment: null,
|
||||
isSpacer: false,
|
||||
isLine: false,
|
||||
isBoxArt: false,
|
||||
};
|
||||
}
|
||||
|
||||
const isBoxArt = hasBoxArtChars(parsed.name);
|
||||
const isLine =
|
||||
!isBoxArt &&
|
||||
isLineSpacerFiller(parsed.name) &&
|
||||
(parsed.alignment === "repetitive" || parsed.alignment === "center");
|
||||
|
||||
let label = parsed.name;
|
||||
if (parsed.alignment === "repetitive" && !isLine) {
|
||||
label = expandRepetitiveSpacerName(parsed.name);
|
||||
}
|
||||
|
||||
return {
|
||||
label,
|
||||
alignment: parsed.alignment,
|
||||
isSpacer: true,
|
||||
isLine,
|
||||
isBoxArt,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,536 @@
|
||||
export const zhCN: Record<string, string> = {
|
||||
"menu.connections": "连接",
|
||||
"menu.connections.connect": "连接",
|
||||
"menu.connections.disconnectCurrent": "断开当前服务器",
|
||||
"menu.connections.disconnectAll": "断开所有服务器",
|
||||
"menu.favorites": "收藏夹",
|
||||
"menu.favorites.add": "添加到收藏夹",
|
||||
"menu.favorites.manage": "管理收藏夹",
|
||||
"menu.self": "自己",
|
||||
"menu.rights": "权限",
|
||||
"menu.rights.serverGroups": "编辑服务器组...",
|
||||
"menu.rights.channelGroups": "编辑频道组...",
|
||||
"menu.rights.serverPermissions": "编辑服务器权限...",
|
||||
"menu.rights.channelPermissions": "编辑频道权限...",
|
||||
"menu.rights.overview": "权限概览...",
|
||||
"menu.rights.myRights": "查看我的权限",
|
||||
"menu.extras": "工具",
|
||||
"menu.help": "帮助",
|
||||
"menu.extras.identities": "身份",
|
||||
"menu.extras.contacts": "联系人",
|
||||
"menu.extras.collectedUrls": "收集的链接",
|
||||
"menu.extras.inviteFriend": "邀请好友",
|
||||
"menu.extras.whisperLists": "悄悄话列表",
|
||||
"menu.extras.whisperHistory": "悄悄话历史",
|
||||
"menu.extras.clientLog": "客户端日志",
|
||||
"menu.extras.banList": "封禁列表",
|
||||
"menu.extras.complaintList": "投诉列表",
|
||||
"menu.extras.offlineMessages": "离线消息",
|
||||
"menu.extras.serverQueryLogin": "ServerQuery 登录",
|
||||
"menu.extras.serverLog": "服务器日志",
|
||||
"menu.extras.startRecording": "开始录音",
|
||||
"menu.extras.startMultitrackRecording": "开始多轨录音",
|
||||
"menu.extras.stopRecording": "停止录音",
|
||||
"menu.extras.options": "选项",
|
||||
|
||||
"toolbar.setAway": "设为离开",
|
||||
"toolbar.backOnline": "恢复在线",
|
||||
"toolbar.awayOptions": "离开选项",
|
||||
"toolbar.whisper": "悄悄话目标",
|
||||
"whisper.channels": "频道",
|
||||
"whisper.clients": "用户",
|
||||
"whisper.clearAll": "清除所有悄悄话目标",
|
||||
"toolbar.micEnable": "启用麦克风",
|
||||
"toolbar.micMute": "麦克风静音",
|
||||
"toolbar.micUnmute": "取消麦克风静音",
|
||||
"toolbar.vadSensitivity": "语音激活灵敏度",
|
||||
"toolbar.muteSound": "关闭声音(拒听)",
|
||||
"toolbar.unmuteSound": "开启声音(取消拒听)",
|
||||
"toolbar.chooseOutputDevice": "选择输出设备",
|
||||
"toolbar.toggleTheme": "切换主题",
|
||||
|
||||
"away.setGlobal": "全局设为离开",
|
||||
"away.setGlobalStatus": "设置全局离开状态",
|
||||
|
||||
"connect.title": "连接",
|
||||
"connect.serverAddress": "服务器昵称或地址:",
|
||||
"connect.serverPassword": "服务器密码:",
|
||||
"connect.nickname": "昵称:",
|
||||
"connect.phoneticNickname": "昵称读音:",
|
||||
"connect.identity": "身份:",
|
||||
"connect.defaultChannel": "默认频道:",
|
||||
"connect.recordingProfile": "录音配置:",
|
||||
"connect.channelPassword": "频道密码:",
|
||||
"connect.playbackProfile": "播放配置:",
|
||||
"connect.onetimeGrant": "一次性权限密钥:",
|
||||
"connect.serverType": "服务器类型:",
|
||||
"connect.serverType.auto": "自动",
|
||||
"connect.serverType.teamspeak": "TeamSpeak",
|
||||
"connect.serverType.teaspeak": "TeaSpeak",
|
||||
"connect.hotkeyProfile": "快捷键配置:",
|
||||
"connect.sendMyTeamSpeakId": "发送 myTeamSpeak ID",
|
||||
"connect.soundPack": "声音包:",
|
||||
"connect.more": "更多",
|
||||
"connect.less": "收起",
|
||||
"connect.connect": "连接",
|
||||
"connect.connecting": "正在连接…",
|
||||
"connect.newTab": "在新标签页中打开",
|
||||
"connect.cancel": "取消",
|
||||
|
||||
"collectedUrls.title": "收集的链接",
|
||||
"collectedUrls.search": "搜索:",
|
||||
"collectedUrls.url": "链接",
|
||||
"collectedUrls.count": "次数",
|
||||
"collectedUrls.lastSeen": "最后提及",
|
||||
"collectedUrls.mentionedBy": "提及者",
|
||||
"collectedUrls.clearList": "清空列表",
|
||||
|
||||
"inviteFriend.title": "邀请好友",
|
||||
"inviteFriend.type": "邀请类型",
|
||||
"inviteFriend.includeChannel": "包含当前频道",
|
||||
"inviteFriend.link": "链接",
|
||||
"inviteFriend.addPermissionKey": "添加权限密钥",
|
||||
"inviteFriend.copyToClipboard": "复制到剪贴板",
|
||||
"inviteFriend.copied": "已复制!",
|
||||
|
||||
"clientLog.title": "客户端日志",
|
||||
"clientLog.level.critical": "严重",
|
||||
"clientLog.level.error": "错误",
|
||||
"clientLog.level.warning": "警告",
|
||||
"clientLog.level.info": "信息",
|
||||
"clientLog.level.debug": "调试",
|
||||
"clientLog.search": "搜索:",
|
||||
"clientLog.filter": "筛选:",
|
||||
"clientLog.caseSensitive": "区分大小写",
|
||||
"clientLog.mark": "标记",
|
||||
|
||||
"whisperHistory.title": "悄悄话历史 - {server}",
|
||||
"whisperHistory.empty": "暂无悄悄话历史。",
|
||||
"whisperHistory.started": "正在向以下目标发送悄悄话:{targets}",
|
||||
"whisperHistory.stopped": "已停止悄悄话",
|
||||
"whisperHistory.clear": "清除",
|
||||
"whisperHistory.options": "选项",
|
||||
|
||||
"whisperLists.title": "悄悄话列表",
|
||||
"whisperLists.namePlaceholder": "列表名称",
|
||||
"whisperLists.saveCurrent": "保存当前选择",
|
||||
"whisperLists.itemDetail": "{channels} 个频道,{clients} 个用户",
|
||||
"whisperLists.activate": "启用",
|
||||
"whisperLists.delete": "删除",
|
||||
"whisperLists.empty": "尚未保存悄悄话列表。请选择悄悄话目标并在此保存为列表。",
|
||||
|
||||
"identities.title": "身份",
|
||||
"identities.activate": "启用",
|
||||
"identities.add": "新建身份",
|
||||
"identities.delete": "删除",
|
||||
"identities.newName": "新身份",
|
||||
"identities.generated": "已生成",
|
||||
"identities.pending": "将在下次连接时生成",
|
||||
"identities.listLabel": "本地身份",
|
||||
"identities.name": "身份名称:",
|
||||
"identities.phoneticNickname": "昵称读音:",
|
||||
"identities.uniqueId": "唯一 ID:",
|
||||
"identities.unknown": "未知",
|
||||
"identities.setDefault": "设为默认",
|
||||
"identities.isDefault": "当前用作默认身份",
|
||||
"identities.export": "导出",
|
||||
"identities.import": "导入",
|
||||
|
||||
"connectionInfo.clientTitle": "连接信息 - {name}",
|
||||
"connectionInfo.serverTitle": "服务器连接信息",
|
||||
"connectionInfo.loading": "正在加载…",
|
||||
"connectionInfo.unavailable": "服务器无响应(可能缺少权限)。",
|
||||
"connectionInfo.ping": "延迟:",
|
||||
"connectionInfo.connectedSince": "连接时间:",
|
||||
"connectionInfo.uptime": "运行时间:",
|
||||
"connectionInfo.name": "名称:",
|
||||
"connectionInfo.avgPing": "平均延迟:",
|
||||
"connectionInfo.avgPacketLoss": "平均丢包率:",
|
||||
"connectionInfo.incoming": "传入",
|
||||
"connectionInfo.outgoing": "传出",
|
||||
"connectionInfo.packetsTransferred": "传输数据包",
|
||||
"connectionInfo.bytesTransferred": "传输字节",
|
||||
"connectionInfo.bandwidthLastSecond": "上一秒带宽",
|
||||
"connectionInfo.bandwidthLastMinute": "上一分钟带宽",
|
||||
"connectionInfo.ftBandwidth": "文件传输带宽",
|
||||
"connectionInfo.ftBytes": "文件传输字节",
|
||||
"connectionInfo.ip": "IP 地址:",
|
||||
"connectionInfo.packetLoss": "丢包率:",
|
||||
"connectionInfo.packetsSent": "已发送数据包:",
|
||||
"connectionInfo.packetsReceived": "已接收数据包:",
|
||||
"connectionInfo.bytesSent": "已发送数据:",
|
||||
"connectionInfo.bytesReceived": "已接收数据:",
|
||||
"connectionInfo.bandwidthSent": "发送带宽:",
|
||||
"connectionInfo.bandwidthReceived": "接收带宽:",
|
||||
|
||||
"menu.self.recordingProfile": "录音配置",
|
||||
"menu.self.playbackProfile": "播放配置",
|
||||
"menu.self.hotkeyProfile": "快捷键配置",
|
||||
"menu.self.soundPack": "声音包",
|
||||
"menu.self.setAway": "设为离开",
|
||||
"menu.self.enableMic": "启用麦克风",
|
||||
"menu.self.disableMic": "禁用麦克风",
|
||||
"menu.self.muteOutput": "关闭扬声器/耳机",
|
||||
"menu.self.unmuteOutput": "开启扬声器/耳机",
|
||||
"menu.self.changeNickname": "更改昵称",
|
||||
"menu.self.requestTalkPower": "申请发言权限",
|
||||
"menu.self.setAvatar": "设置头像",
|
||||
"menu.self.setPhoneticNickname": "设置昵称读音",
|
||||
"menu.self.connectionInfo": "连接信息",
|
||||
|
||||
"contacts.title": "联系人",
|
||||
"contacts.addOnlineClient": "选择在线用户...",
|
||||
"contacts.add": "添加",
|
||||
"contacts.remove": "移除",
|
||||
"contacts.empty": "暂无联系人。",
|
||||
"contacts.customName": "自定义名称:",
|
||||
"contacts.category.acquaintance": "熟人",
|
||||
"contacts.category.blocked": "已屏蔽",
|
||||
"contacts.category.friend": "好友",
|
||||
"contacts.phoneticName": "名称读音:",
|
||||
"contacts.show": "显示",
|
||||
"contacts.ignore": "忽略",
|
||||
"contacts.unignore": "取消忽略",
|
||||
"contacts.whisper": "悄悄话",
|
||||
"contacts.preferences": "偏好设置",
|
||||
|
||||
"favorites.title": "🔖 myTeamSpeak 收藏夹",
|
||||
"favorites.synced": "已同步的收藏",
|
||||
"favorites.notLoggedIn": "未登录",
|
||||
"favorites.local": "本地收藏",
|
||||
"favorites.unnamed": "(未命名)",
|
||||
"favorites.bookmarkName": "收藏名称:",
|
||||
"favorites.newFavoriteName": "新收藏",
|
||||
"favorites.showServerQueryClients": "显示 ServerQuery 用户",
|
||||
"favorites.connectOnStartup": "启动时连接",
|
||||
"favorites.enableMyTeamSpeak": "启用 myTeamSpeak 功能",
|
||||
"favorites.new": "新建收藏",
|
||||
"favorites.newFolder": "新建文件夹",
|
||||
"favorites.remove": "移除",
|
||||
"favorites.ok": "确定",
|
||||
"favorites.cancel": "取消",
|
||||
"favorites.apply": "应用",
|
||||
|
||||
"away.dialog.title": "设置离开消息",
|
||||
"away.dialog.message": "消息:",
|
||||
"away.dialog.template": "模板:",
|
||||
"away.dialog.none": "<无>",
|
||||
"away.dialog.ok": "确定",
|
||||
"away.dialog.save": "保存",
|
||||
"away.dialog.cancel": "取消",
|
||||
|
||||
"options.title": "选项",
|
||||
"options.ok": "确定",
|
||||
"options.cancel": "取消",
|
||||
"options.notImplemented": "此设置尚未实现。",
|
||||
"options.section.anwendung": "应用",
|
||||
"options.section.wiedergabe": "播放",
|
||||
"options.section.aufnahme": "录音",
|
||||
"options.section.design": "外观",
|
||||
"design.subtitle": "选择应用外观。",
|
||||
"design.theme.standard": "标准",
|
||||
"design.theme.standard.desc": "原始 WebSpeak3 设计。",
|
||||
"design.theme.nova": "Nova",
|
||||
"design.theme.nova.desc": "更现代的深色设计,带圆角元素。",
|
||||
"design.theme.greenteaspeak": "GreenTeaSpeak",
|
||||
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
|
||||
"design.status.connected": "已连接",
|
||||
"options.section.erweiterungen": "扩展",
|
||||
"options.section.hotkeys": "快捷键",
|
||||
"options.section.whispern": "悄悄话",
|
||||
"options.section.downloads": "下载",
|
||||
"options.section.chat": "聊天",
|
||||
"options.section.sicherheit": "安全",
|
||||
"options.section.nachrichten": "消息",
|
||||
"options.section.meldungen": "通知",
|
||||
"options.section.sounds": "声音",
|
||||
|
||||
"app.title": "应用",
|
||||
"app.subtitle": "常规应用设置",
|
||||
"app.language": "语言",
|
||||
"app.language.auto": "跟随系统",
|
||||
"app.language.de": "Deutsch",
|
||||
"app.language.en": "English",
|
||||
"app.language.zh-CN": "简体中文",
|
||||
|
||||
"playback.title": "播放",
|
||||
"playback.subtitle": "更改播放设置",
|
||||
"playback.profile": "配置",
|
||||
"playback.default": "默认",
|
||||
"playback.device": "播放设备:",
|
||||
"playback.systemDefault": "系统默认",
|
||||
"playback.quiet": "安静",
|
||||
"playback.loud": "响亮",
|
||||
"playback.voiceVolume": "语音音量",
|
||||
"playback.playTestTone": "▶ 播放测试音",
|
||||
"playback.options": "选项",
|
||||
"playback.autoVolume": "自动调节音量",
|
||||
"playback.ownMicClicks": "播放自己的麦克风按键音",
|
||||
"playback.otherMicClicks": "播放其他用户的麦克风按键音",
|
||||
|
||||
"recording.title": "录音",
|
||||
"recording.subtitle": "更改录音设置",
|
||||
"recording.device": "录音设备:",
|
||||
"recording.activation": "激活方式",
|
||||
"recording.pushToTalk": "按键说话",
|
||||
"recording.continuous": "持续传输",
|
||||
"recording.voiceActivation": "语音激活检测",
|
||||
"recording.testStart": "开始测试",
|
||||
"recording.testStop": "停止测试",
|
||||
"recording.hangoverDelay": "停止前延迟:",
|
||||
"recording.secondsUnit": "秒",
|
||||
"recording.dsp": "数字信号处理",
|
||||
"recording.typingAttenuation": "键盘声衰减",
|
||||
"recording.echoCancellation": "回声消除",
|
||||
"recording.noiseSuppression": "消除背景噪声",
|
||||
|
||||
"info.address": "地址:",
|
||||
"info.version": "版本:",
|
||||
"info.license": "许可证:",
|
||||
"info.currentClients": "当前用户:",
|
||||
"info.currentChannels": "当前频道:",
|
||||
"info.topic": "主题:",
|
||||
"info.audioCodec": "音频编解码器:",
|
||||
"info.spacer": "间隔符:",
|
||||
"info.rawName": "原始名称:",
|
||||
"info.passwordProtected": "密码保护:",
|
||||
"info.clients": "用户:",
|
||||
"info.country": "国家:",
|
||||
"info.muted": "麦克风静音:",
|
||||
"info.outputMuted": "扬声器静音:",
|
||||
"info.serverGroups": "服务器组:",
|
||||
"info.yes": "是",
|
||||
"info.no": "否",
|
||||
|
||||
"tree.notConnected": "未连接",
|
||||
"tree.clickToSelect": "单击选择,双击加入",
|
||||
"tree.clickToJoin": "双击加入",
|
||||
"tree.joinNotConnected": "未连接 — 无法切换频道",
|
||||
"tree.passwordProtected": "受密码保护",
|
||||
"tree.privateChatWith": "与其私聊",
|
||||
"tree.poke": "戳一戳",
|
||||
"tree.channelCommander": "频道指挥官",
|
||||
"tree.away": "离开",
|
||||
"tree.micMuted": "麦克风已静音",
|
||||
"tree.talking": "正在说话",
|
||||
"tree.noTalkPower": "在此频道中没有发言权限",
|
||||
"tree.soundMuted": "声音已关闭(拒听)",
|
||||
|
||||
"chat.server": "服务器",
|
||||
"chat.channel": "频道",
|
||||
"chat.notConnected": "未连接",
|
||||
"chat.messageChannel": "向频道发送消息...",
|
||||
"chat.messageServer": "向服务器发送消息...",
|
||||
"chat.messagePartner": "向 {name} 发送消息...",
|
||||
"chat.send": "发送",
|
||||
"chat.you": "你",
|
||||
|
||||
"serverLog.clientJoin": "{client} 进入了频道“{channel}”",
|
||||
"serverLog.clientLeave": "{client} 已断开连接(离开)",
|
||||
"serverLog.clientChannelSwitch": "{client} 从频道“{fromChannel}”移动到“{toChannel}”",
|
||||
"serverLog.clientChannelGroupAssigned": "已将频道组“{group}”分配给 {client}",
|
||||
"serverLog.channelCreated": "频道“{channel}”已创建",
|
||||
"serverLog.channelDeleted": "频道“{channel}”已删除",
|
||||
"serverLog.channelEdited": "频道“{channel}”已编辑",
|
||||
"serverLog.serverEdited": "服务器设置已更改",
|
||||
"serverLog.permissionError": "缺少权限:{action}",
|
||||
|
||||
"poke.title": "戳一戳",
|
||||
"poke.optionalMessage": "可选消息...",
|
||||
"poke.send": "发送",
|
||||
"poke.cancel": "取消",
|
||||
"poke.pokedYou": "戳了你一下",
|
||||
"poke.dismiss": "关闭",
|
||||
|
||||
"kick.title": "踢出:",
|
||||
"kick.reasonPlaceholder": "原因(可选)...",
|
||||
"kick.confirm": "踢出",
|
||||
"kick.cancel": "取消",
|
||||
|
||||
"ban.title": "封禁:",
|
||||
"ban.reasonPlaceholder": "原因(可选)...",
|
||||
"ban.duration": "时长:",
|
||||
"ban.durationPermanent": "永久",
|
||||
"ban.duration1h": "1 小时",
|
||||
"ban.duration1d": "1 天",
|
||||
"ban.duration1w": "1 周",
|
||||
"ban.confirm": "封禁",
|
||||
"ban.cancel": "取消",
|
||||
|
||||
"serverEdit.title": "编辑虚拟服务器",
|
||||
"serverEdit.tab.host": "主机",
|
||||
"serverEdit.tab.misc": "其他",
|
||||
"serverEdit.tab.transmission": "传输",
|
||||
"serverEdit.tab.antiflood": "防刷屏",
|
||||
"serverEdit.tab.security": "安全",
|
||||
"serverEdit.tab.log": "日志",
|
||||
"serverEdit.name": "服务器名称:",
|
||||
"serverEdit.welcomeMessage": "欢迎消息:",
|
||||
"serverEdit.clearPassword": "移除服务器密码",
|
||||
"serverEdit.newPassword": "新服务器密码:",
|
||||
"serverEdit.hostmessage": "主机消息:",
|
||||
"serverEdit.hostmessageMode": "显示模式:",
|
||||
"serverEdit.hostmessageMode.none": "不显示",
|
||||
"serverEdit.hostmessageMode.log": "在日志中显示",
|
||||
"serverEdit.hostmessageMode.modal": "以对话框显示",
|
||||
"serverEdit.hostmessageMode.modalquit": "以对话框显示并断开连接",
|
||||
"serverEdit.hostbannerUrl": "主机横幅链接:",
|
||||
"serverEdit.hostbannerGfxUrl": "主机横幅图片链接:",
|
||||
"serverEdit.hostbannerGfxInterval": "横幅刷新间隔(秒):",
|
||||
"serverEdit.hostbannerMode": "横幅缩放:",
|
||||
"serverEdit.hostbannerMode.noadjust": "不调整",
|
||||
"serverEdit.hostbannerMode.adjustignoreaspect": "调整(忽略宽高比)",
|
||||
"serverEdit.hostbannerMode.adjustkeepaspect": "调整(保持宽高比)",
|
||||
"serverEdit.hostbuttonTooltip": "主机按钮提示:",
|
||||
"serverEdit.hostbuttonUrl": "主机按钮链接:",
|
||||
"serverEdit.hostbuttonGfxUrl": "主机按钮图片链接:",
|
||||
"serverEdit.maxClients": "最大用户数:",
|
||||
"serverEdit.nickname": "服务器昵称:",
|
||||
"serverEdit.phoneticName": "名称读音:",
|
||||
"serverEdit.codecEncryptionMode": "语音加密:",
|
||||
"serverEdit.codecEncryptionMode.perchannel": "可按频道配置",
|
||||
"serverEdit.codecEncryptionMode.forcedoff": "全局禁用",
|
||||
"serverEdit.codecEncryptionMode.forcedon": "全局启用",
|
||||
"serverEdit.unchanged": "保持不变",
|
||||
"serverEdit.save": "保存",
|
||||
"serverEdit.cancel": "取消",
|
||||
|
||||
"serverProtocolLog.title": "服务器日志",
|
||||
"serverProtocolLog.empty": "暂无日志条目。",
|
||||
"banList.title": "封禁列表",
|
||||
"banList.empty": "未找到封禁记录。",
|
||||
"banList.name": "名称",
|
||||
"banList.ip": "IP",
|
||||
"banList.created": "创建时间",
|
||||
"banList.duration": "时长",
|
||||
"banList.invoker": "执行者",
|
||||
"banList.reason": "原因",
|
||||
"banList.permanent": "永久",
|
||||
"banList.delete": "删除",
|
||||
"banList.deleteAll": "全部删除",
|
||||
"complainList.title": "投诉列表",
|
||||
"complainList.empty": "未找到投诉记录。",
|
||||
"complainList.target": "对象",
|
||||
"complainList.from": "来自",
|
||||
"complainList.message": "消息",
|
||||
"complainList.timestamp": "时间",
|
||||
"offlineMessages.title": "离线消息",
|
||||
"offlineMessages.empty": "暂无消息。",
|
||||
"offlineMessages.subject": "主题",
|
||||
"offlineMessages.from": "来自",
|
||||
"offlineMessages.timestamp": "时间",
|
||||
"offlineMessages.targetUid": "目标 UID",
|
||||
"offlineMessages.message": "消息",
|
||||
"offlineMessages.send": "发送",
|
||||
"offlineMessages.new": "新消息",
|
||||
"offlineMessages.markRead": "标记为已读",
|
||||
"offlineMessages.backToList": "返回列表",
|
||||
"dialog.cancel": "取消",
|
||||
|
||||
"groupAssign.channelTitle": "分配频道组",
|
||||
"groupAssign.serverTitle": "分配服务器组",
|
||||
"groupAssign.empty": "未找到组。",
|
||||
"groupAssign.clickToRemove": "单击移除",
|
||||
|
||||
"serverQueryLogin.username": "用户名",
|
||||
"serverQueryLogin.password": "密码",
|
||||
"serverQueryLogin.login": "登录",
|
||||
|
||||
"permissionOverview.title": "我的权限",
|
||||
"permissionOverview.empty": "未找到权限。",
|
||||
"permissionOverview.name": "权限",
|
||||
"permissionOverview.value": "值",
|
||||
"permissionOverview.negated": "否定",
|
||||
"permissionOverview.skip": "跳过",
|
||||
|
||||
"permsEditor.title": "权限",
|
||||
"permsEditor.tab.server": "服务器组",
|
||||
"permsEditor.tab.client": "用户权限",
|
||||
"permsEditor.tab.channel": "频道权限",
|
||||
"permsEditor.tab.channelgroup": "频道组",
|
||||
"permsEditor.tab.channelclient": "频道用户权限",
|
||||
"permsEditor.clientDbId": "唯一用户数据库 ID:",
|
||||
"permsEditor.load": "加载",
|
||||
"permsEditor.pickOnlineClient": "或选择在线用户...",
|
||||
"permsEditor.pickTarget": "请在左侧选择组或频道,或输入用户 ID。",
|
||||
"permsEditor.addPermission": "添加",
|
||||
"permsEditor.searchPermission": "搜索权限...",
|
||||
|
||||
"dialog.ok": "确定",
|
||||
"channelContext.join": "切换到频道",
|
||||
"channelContext.files": "文件...",
|
||||
"fileBrowser.title": "文件传输",
|
||||
"fileBrowser.up": "上一级",
|
||||
"fileBrowser.refresh": "刷新",
|
||||
"fileBrowser.newFolder": "新建文件夹",
|
||||
"fileBrowser.upload": "上传",
|
||||
"fileBrowser.folderName": "文件夹名称",
|
||||
"fileBrowser.empty": "此文件夹为空。",
|
||||
"fileBrowser.name": "名称",
|
||||
"fileBrowser.size": "大小",
|
||||
"fileBrowser.modified": "修改时间",
|
||||
"fileBrowser.download": "下载",
|
||||
"fileBrowser.rename": "重命名",
|
||||
"fileBrowser.delete": "删除",
|
||||
"fileBrowser.deleteConfirm": "确定要删除吗?",
|
||||
"fileBrowser.uploading": "正在上传...",
|
||||
"fileBrowser.downloading": "正在下载...",
|
||||
|
||||
"serverContext.icons": "服务器图标...",
|
||||
"serverIcons.title": "管理服务器图标",
|
||||
"serverIcons.upload": "上传图标",
|
||||
"serverIcons.iconId": "图标 ID",
|
||||
"serverIcons.empty": "未找到图标。",
|
||||
|
||||
"clientContext.privateChat": "私聊",
|
||||
"clientContext.poke": "戳一戳",
|
||||
"clientContext.copyName": "复制名称",
|
||||
"clientContext.connectionInfo": "查看连接信息",
|
||||
"clientContext.addWhisperTarget": "添加为悄悄话目标",
|
||||
"clientContext.removeWhisperTarget": "从悄悄话目标中移除",
|
||||
"clientContext.assignChannelGroup": "分配频道组",
|
||||
"clientContext.assignServerGroup": "分配服务器组",
|
||||
"clientContext.kickChannel": "踢出频道",
|
||||
"clientContext.kick": "踢出服务器",
|
||||
"clientContext.ban": "封禁",
|
||||
"clientContext.notSupported": "网页客户端暂不支持此功能",
|
||||
|
||||
"serverContext.connectionInfo": "服务器连接信息",
|
||||
"serverContext.copyAddress": "复制服务器地址",
|
||||
"serverContext.addFavorite": "添加到收藏夹",
|
||||
"serverContext.disconnect": "断开连接",
|
||||
|
||||
"connectError.dismiss": "关闭",
|
||||
"dialog.close": "关闭",
|
||||
|
||||
"sounds.title": "声音",
|
||||
"sounds.subtitle": "配置事件提示音",
|
||||
"sounds.enable": "启用声音",
|
||||
"sounds.volume": "音量",
|
||||
"sounds.eventEnable": "启用此声音",
|
||||
"sounds.event.connect": "已连接",
|
||||
"sounds.event.disconnect": "已断开",
|
||||
"sounds.event.clientJoin": "用户加入",
|
||||
"sounds.event.clientLeave": "用户离开",
|
||||
"sounds.event.message": "收到消息",
|
||||
"sounds.event.poke": "收到戳一戳",
|
||||
"sounds.default": "默认",
|
||||
"sounds.custom": "自定义文件:{name}",
|
||||
"sounds.test": "▶ 测试",
|
||||
"sounds.upload": "上传",
|
||||
"sounds.reset": "重置",
|
||||
"sounds.importSoundpack": "导入声音包(.ts3soundpack)",
|
||||
"sounds.importResult": "已导入 {matched} 个声音,{unmatched} 个文件未匹配",
|
||||
|
||||
"nachrichten.title": "消息",
|
||||
"nachrichten.subtitle": "自定义消息",
|
||||
"nachrichten.disconnectMessage": "断开连接:",
|
||||
"nachrichten.disconnectMessagePlaceholder": "离开",
|
||||
"nachrichten.presetsTitle": "预设消息",
|
||||
"nachrichten.type": "类型",
|
||||
"nachrichten.type.away": "离开",
|
||||
"nachrichten.templateName": "模板名称",
|
||||
"nachrichten.message": "消息",
|
||||
"nachrichten.add": "添加",
|
||||
"nachrichten.delete": "删除",
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import './styles/greenteaspeak.css'
|
||||
import App from './App.tsx'
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,87 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
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;
|
||||
|
||||
return (
|
||||
<>
|
||||
{hasTabs ? (
|
||||
<div className="gts-connection-tabs" role="tablist" aria-label="Server-Verbindungen">
|
||||
{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)}
|
||||
title={tab.label}
|
||||
>
|
||||
<span className="gts-connection-tab-label">{tab.label}</span>
|
||||
{onCloseTab ? (
|
||||
<button
|
||||
type="button"
|
||||
className="gts-connection-tab-close"
|
||||
title="Verbindung trennen"
|
||||
aria-label={`Tab schließen: ${tab.label}`}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onCloseTab(tab.id);
|
||||
}}
|
||||
>
|
||||
×
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="gts-connection-tabs gts-brand-strip">
|
||||
<span className="gts-brand-label">GreenTeaSpeak</span>
|
||||
</div>
|
||||
)}
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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";
|
||||
@@ -36,6 +36,11 @@ export interface MicCaptureOptions {
|
||||
deviceId?: string;
|
||||
echoCancellation?: boolean;
|
||||
noiseSuppression?: boolean;
|
||||
/** Automatic gain control. Exposed as its own toggle (rather than folded into
|
||||
* echoCancellation) because AGC re-amplifying the mic signal after the
|
||||
* browser's own AEC runs can bring back audible echo residue in speaker+mic
|
||||
* (no headset) setups - some users get a cleaner result with it off. */
|
||||
autoGainControl?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,6 +66,7 @@ export class MicCapture {
|
||||
private deviceId?: string;
|
||||
private echoCancellation: boolean;
|
||||
private noiseSuppression: boolean;
|
||||
private autoGainControl: boolean;
|
||||
private context: AudioContext;
|
||||
threshold: number;
|
||||
hangoverSeconds: number;
|
||||
@@ -75,6 +81,7 @@ export class MicCapture {
|
||||
this.deviceId = options.deviceId;
|
||||
this.echoCancellation = options.echoCancellation ?? true;
|
||||
this.noiseSuppression = options.noiseSuppression ?? true;
|
||||
this.autoGainControl = options.autoGainControl ?? true;
|
||||
}
|
||||
|
||||
async start(): Promise<void> {
|
||||
@@ -84,8 +91,15 @@ export class MicCapture {
|
||||
this.stream = await navigator.mediaDevices.getUserMedia({
|
||||
audio: {
|
||||
channelCount: 1,
|
||||
// Requesting the pipeline's own rate (rather than leaving it to the
|
||||
// device/OS default) avoids an extra internal resampling step ahead
|
||||
// of the browser's own echo canceller - standard constraint, honored
|
||||
// by both Chromium and Firefox, "ideal" so it's not fatal if a device
|
||||
// genuinely can't provide it.
|
||||
sampleRate: { ideal: SAMPLE_RATE },
|
||||
echoCancellation: this.echoCancellation,
|
||||
noiseSuppression: this.noiseSuppression,
|
||||
autoGainControl: this.autoGainControl,
|
||||
...(this.deviceId ? { deviceId: { exact: this.deviceId } } : {}),
|
||||
},
|
||||
});
|
||||
@@ -134,6 +148,11 @@ export class MicCapture {
|
||||
this.silence.connect(this.context.destination);
|
||||
}
|
||||
|
||||
/** The raw mic input node, e.g. to additionally route it into a recorder. */
|
||||
getSourceNode(): AudioNode | null {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
/** Routes the raw mic signal to `destination` too, so you can hear yourself (a mic test), until disabled again. */
|
||||
setMonitoring(enabled: boolean, destination: AudioNode): void {
|
||||
if (!this.source) return;
|
||||
@@ -166,6 +185,45 @@ export class MicCapture {
|
||||
}
|
||||
}
|
||||
|
||||
function writeAsciiString(view: DataView, offset: number, text: string): void {
|
||||
for (let i = 0; i < text.length; i++) view.setUint8(offset + i, text.charCodeAt(i));
|
||||
}
|
||||
|
||||
/** Encodes raw stereo float samples (range -1..1) as an uncompressed 16-bit PCM WAV file. */
|
||||
export function encodeWavStereo(left: Float32Array, right: Float32Array, sampleRate: number): Blob {
|
||||
const numChannels = 2;
|
||||
const bytesPerSample = 2;
|
||||
const blockAlign = numChannels * bytesPerSample;
|
||||
const dataSize = left.length * blockAlign;
|
||||
const buffer = new ArrayBuffer(44 + dataSize);
|
||||
const view = new DataView(buffer);
|
||||
|
||||
writeAsciiString(view, 0, "RIFF");
|
||||
view.setUint32(4, 36 + dataSize, true);
|
||||
writeAsciiString(view, 8, "WAVE");
|
||||
writeAsciiString(view, 12, "fmt ");
|
||||
view.setUint32(16, 16, true);
|
||||
view.setUint16(20, 1, true); // PCM
|
||||
view.setUint16(22, numChannels, true);
|
||||
view.setUint32(24, sampleRate, true);
|
||||
view.setUint32(28, sampleRate * blockAlign, true);
|
||||
view.setUint16(32, blockAlign, true);
|
||||
view.setUint16(34, 16, true);
|
||||
writeAsciiString(view, 36, "data");
|
||||
view.setUint32(40, dataSize, true);
|
||||
|
||||
let offset = 44;
|
||||
for (let i = 0; i < left.length; i++) {
|
||||
const l = Math.max(-1, Math.min(1, left[i]));
|
||||
const r = Math.max(-1, Math.min(1, right[i]));
|
||||
view.setInt16(offset, l < 0 ? l * 0x8000 : l * 0x7fff, true);
|
||||
view.setInt16(offset + 2, r < 0 ? r * 0x8000 : r * 0x7fff, true);
|
||||
offset += blockAlign;
|
||||
}
|
||||
|
||||
return new Blob([buffer], { type: "audio/wav" });
|
||||
}
|
||||
|
||||
/** Output ("audiooutput") devices available for playback, e.g. for a device picker. */
|
||||
export async function listAudioOutputDevices(): Promise<MediaDeviceInfo[]> {
|
||||
if (!navigator.mediaDevices) return [];
|
||||
|
||||
Reference in new issue
Block a user