Compare commits

..
Author SHA1 Message Date
MoepchiandClaude Opus 5.5 e28e89bc60 Simulate a busy server in the demo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-18 12:34:11 +00:00
MoepchiandClaude Opus 5.5 8d8d942038 Keep double-clicks on controls from selecting text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-18 12:34:11 +00:00
MoepchiandClaude Opus 5.5 e28e18c88c Add the Command Center (IDE) layout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-18 12:34:11 +00:00
MoepchiandClaude Opus 5.5 2615904b1e Send server-log field names in camelCase
rename_all on the enum only renamed the kind tags, so the channel switch
entry arrived as from_channel/to_channel and the Server tab showed the raw
{fromChannel}/{toChannel} placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-16 08:41:58 +00:00
MoepchiandClaude Opus 5.5 5e7add6dc8 Drain queued packets before audio ticks in the connector
After a stall (CPU steal on the host), the missed 20 ms ticks fire in a
burst. With an unbiased select a tick could run before the already
received voice packets were processed, find an empty queue and play Opus
loss concealment, which sounds like a slowed-down tape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-16 08:18:20 +00:00
MoepchiandClaude Opus 5.5 983ce1e105 Rejoin the last channel after an automatic reconnect
A dropped gateway connection reconnected with the original connect
parameters, so everyone landed in the server's default channel again.
The reconnect now aims at the channel the user was in ("/<id>"), with
its cached password if one was entered.

The client log also records why a gateway connection ended: the
WebSocket close code, or the keepalive watchdog firing. Until now a drop
left no trace on the client side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-15 12:14:12 +00:00
MoepchiandClaude Opus 5.5 7d14c3409e Wait longer for the release preview image before giving up
GitHub's image service answered 429 for the whole 20 seconds after the
v0.16.0-beta.5 release, so the Bluesky post went out without a card. Back
off 15/30/45/60 s and honor Retry-After (capped at 60 s), which fits in
the job's 5-minute timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-11 15:24:01 +00:00
MoepchiandClaude Opus 5.5 882265beae Send file transfers in 192 KiB pieces instead of one message
A whole file used to cross the gateway as a single base64 line, which
readline, JSON.parse and JSON.stringify each copied: over 100 MB of heap
for one 25 MB download. Two parallel downloads ran the gateway out of
memory on 2026-10-11.

Downloads now arrive as fileDownloadChunk events that the web client
joins back together. Uploads go out as uploadFileChunk pieces when the
gateway announces "chunkedUpload"; older gateways still get the single
uploadFile message, and the gateway keeps accepting it from cached
clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-11 14:59:07 +00:00
MoepchiandClaude Opus 5.5 0aefd4198b ci: add a link preview card to Bluesky release posts
The Bluesky app builds the card itself when a link is pasted, the API
doesn't. Uses GitHub's social preview image for the release page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-07 18:46:00 +00:00
MoepchiandClaude Opus 5.5 3a91a8db07 ci: announce releases on Bluesky
Posts the first paragraph of the release notes plus the link. Notes with
<!-- no-social --> are skipped; a manual run defaults to a dry run that only
logs in and prints the post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-07 18:05:55 +00:00
rex2630andClaude Opus 5.5 51d7e107e5 i18n: add Czech translation (#14)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-07 19:25:04 +02:00
MoepchiandClaude Opus 5.5 1e71e43bd7 fix(web): only reset the reconnect backoff after a stable connection
On a flaky network every successful reconnect reset the backoff to 1 s,
so a connection that kept dropping after a few seconds made each tab
reconnect every few seconds. The backoff now starts over only once a
connection held for 30 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-07 17:04:06 +00:00
MoepchiandClaude Opus 5.5 c2b52b323d fix(gateway): rate-limit server connects per IP
Each "connect" spawns a new connector and a socket could send any number
of them, so a handful of sockets could join-flood a TeamSpeak server
through the gateway. New CONNECT_RATE_LIMIT (default 30/min per IP).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-07 11:47:05 +00:00
MoepchiandClaude Opus 5.5 bbb44b3eaa fix(gateway): don't let clients pick their IP behind TRUST_PROXY
TRUST_PROXY=1 trusted CF-Connecting-IP and the first X-Forwarded-For
entry, both of which a client can send itself when the proxy in front
isn't Cloudflare (nginx's $proxy_add_x_forwarded_for only appends), so
per-IP limits could be sidestepped. Now TRUST_PROXY=1 takes the last
X-Forwarded-For entry (the one the proxy appended), and the new
TRUST_PROXY=cloudflare takes only CF-Connecting-IP. The bundled compose
file (cloudflared) switches to cloudflare.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-05 18:31:13 +00:00
MoepchiandClaude Opus 5.5 bda908029b docs: link the wiki's full environment variable list from the README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-05 18:14:27 +00:00
MoepchiandClaude Opus 5.5 45e4af026f feat: offer ALLOWED_SERVERS as a dropdown or locked address field
With ALLOWED_SERVERS set, the gateway now passes the list to the web client
it serves, and the connect dialog shows a dropdown of those servers instead
of a free-text address, or a locked field when only one is allowed.
SERVER_PICKER=0 keeps the plain text field; lists with *. wildcards can't be
enumerated and keep it too. Entries may now carry a port, which is the
address offered in the dialog (the allowlist still ignores ports).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-05 15:06:45 +00:00
MoepchiandClaude Opus 5.5 ef0e3fad7d feat: more BBCode tags, basic Markdown and an opt-in for chat images
Chat now renders [size], [left]/[center]/[right], [list]/[*], [hr] and
[noparse] plus the Markdown TS6 sends (emphasis, code, links, images,
quotes, lists, headings, rules, escapes). [img] stays a link unless
"Load images in chat" is enabled in Options -> Application (off by
default, since loading reveals the reader's IP to the image host).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-04 11:09:05 +00:00
MoepchiandClaude Opus 5.5 839e26e4a3 feat: send links as [URL]...[/URL] like the native clients
Native TeamSpeak clients wrap links in [URL] tags when sending and only
link tagged ones, so a bare URL typed in the web client stayed plain
text for them. Chat and offline messages now wrap bare http(s) URLs;
links that are already tagged are left alone.

Also stops the collected-URLs list from picking up "[/URL]" as part of
a link, by sharing the renderer's URL pattern.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-04 10:32:10 +00:00
MoepchiandClaude Opus 5.5 e37e090ab2 feat: render BBCode in chat messages
Server, channel and private chat now render [b] [i] [u] [s] [color]
[url] (and [img] as a plain link), and bare http(s) URLs become links -
the welcome message's [URL]...[/URL] showed up as raw text before.
Built as React elements, so message text can't inject markup; only
http(s) links are allowed and [color] only takes a name or hex value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-04 10:29:05 +00:00
MoepchiandClaude Opus 5.5 9b836d5830 Fix server-edited log spam and chat panel growing with its lines
The 20s servergetvariables poll is answered with notifyserverupdated,
which tsclientlib applies as a PropertyChanged per field even when
nothing changed - so every poll logged "server settings changed".
Only log for notifyserveredited, the one that carries an invoker.

In the classic design .ts-chat-panel lacked min-height: 0, so the
message list grew with every line instead of scrolling, pushing the
chat input off-screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-04 09:33:33 +00:00
MoepchiandClaude Opus 5.5 d36b94a496 feat: arrow-key tree and menus, real buttons, contrast fixes
Accessibility stage 2.

- The channel tree is an ARIA tree with one Tab stop. Up/Down/Home/End walk
  the visible rows, Left/Right collapse, expand, or jump to parent and first
  child, and selection follows focus. The server row is focusable too.
- Menu bar entries are buttons with aria-expanded. Dropdown and context
  menus focus their first item on open, move with the arrow keys (except
  inside the volume slider), and Escape returns focus to the opener.
- Bookmark and contact list items, chat tabs and server tabs work from the
  keyboard (Delete closes a tab, since its × can't be a nested button).
- <main> landmark and a level-1 heading for screen-reader navigation.

An axe-core scan of the connected UI in every built-in design turned up
contrast failures, three of them real bugs: the active server tab, the
update toast and the feedback bubble sit on a fixed dark background but used
the theme's text colour, so the light theme showed dark-on-dark text. Also
darkens the light theme's muted text, the donate button, and lifts
GreenTeaSpeak's muted grey to 4.5:1 (its selection colour stays native).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-04 09:19:24 +00:00
23 changed files with 2729 additions and 193 deletions

No files matched your search

+133
View File
@@ -0,0 +1,133 @@
"""Post a short release announcement to Bluesky.
Reads the release (tag, url, body) as JSON from stdin, e.g. from
`gh release view <tag> --json tagName,url,body`. The post is the first
paragraph of the release notes plus the link and a preview card. Notes containing
<!-- no-social --> are skipped. DRY_RUN=true logs in (if credentials are set)
and prints the post without publishing it.
"""
import json
import os
import re
import sys
import time
import urllib.error
import urllib.request
from datetime import datetime, timezone
BLUESKY_LIMIT = 300
def build_post(release: dict) -> str | None:
body = release.get("body") or ""
if "<!-- no-social -->" in body:
return None
summary = body.strip().split("\n\n")[0].strip()
if summary.startswith("#"):
summary = ""
summary = re.sub(r"\[([^\]]+)\]\([^)]+\)", r"\1", summary)
summary = " ".join(re.sub(r"[`*_]", "", summary).split())
head = f"WebSpeak3 {release['tagName']}"
tail = f"\n\n{release['url']}"
room = BLUESKY_LIMIT - len(head) - len(tail) - 2
if len(summary) > room:
# Prefer dropping whole sentences over cutting one off mid-word.
cut = summary[:room].rfind(". ")
summary = summary[: cut + 1] if cut > 0 else summary[: room - 1].rstrip() + "…"
return f"{head}: {summary}{tail}" if summary else head + tail
def xrpc(method: str, payload: dict | bytes, token: str | None = None, content_type: str = "application/json") -> dict:
req = urllib.request.Request(
f"https://bsky.social/xrpc/{method}",
data=payload if isinstance(payload, bytes) else json.dumps(payload).encode(),
headers={"Content-Type": content_type, **({"Authorization": f"Bearer {token}"} if token else {})},
)
with urllib.request.urlopen(req, timeout=30) as res:
return json.load(res)
def fetch(url: str, attempt: int = 1) -> tuple[bytes, str]:
req = urllib.request.Request(url, headers={"User-Agent": "webspeak3-release-announcer"})
try:
with urllib.request.urlopen(req, timeout=30) as res:
return res.read(), res.headers.get_content_type()
except urllib.error.HTTPError as err:
# GitHub's image service throttles right after a release, often for over a minute.
# 15+30+45+60 s stays well inside the job's 5-minute timeout.
if err.code != 429 or attempt > 4:
raise
wait = 15 * attempt
retry_after = err.headers.get("Retry-After", "")
if retry_after.isdigit():
wait = min(int(retry_after), 60)
print(f"Preview image throttled (429), retrying in {wait} s.")
time.sleep(wait)
return fetch(url, attempt + 1)
def link_card(release: dict, text: str) -> dict:
"""The preview card the Bluesky app would show for a pasted link. The API doesn't build one itself.
The image is GitHub's own social preview for the release page. Its URL takes any cache-busting
segment, so we don't have to scrape the release page (GitHub rate-limits that)."""
url = release["url"]
card = {"uri": url, "title": f"WebSpeak3 {release['tagName']}",
"description": text.split("\n\n")[0].split(": ", 1)[-1]}
path = url.removeprefix("https://github.com/")
image, mime = fetch(f"https://opengraph.githubassets.com/{release['tagName']}/{path}")
if len(image) <= 1_000_000: # Bluesky's blob limit for thumbnails
card["image"] = (image, mime)
return card
def main() -> None:
release = json.load(sys.stdin)
text = build_post(release)
if text is None:
print("Release notes contain <!-- no-social -->, skipping.")
return
print(text)
url = release["url"]
try:
card = link_card(release, text)
print(f"Link card: {card['title']} (image: {len(card['image'][0]) if 'image' in card else 'none'} bytes)")
except Exception as err: # a missing preview shouldn't cost us the post
print(f"No link card: {err}")
card = None
dry_run = os.environ.get("DRY_RUN") == "true"
handle, password = os.environ.get("BLUESKY_HANDLE"), os.environ.get("BLUESKY_APP_PASSWORD")
if not password:
sys.exit(0 if dry_run else "BLUESKY_APP_PASSWORD is not set.")
session = xrpc("com.atproto.server.createSession", {"identifier": handle, "password": password})
print(f"Logged in as {session['handle']}.")
if dry_run:
print("Dry run, not posting.")
return
# Bluesky doesn't auto-link URLs in API posts; the link needs a facet with UTF-8 byte offsets.
start = len(text[: text.rindex(url)].encode())
record = {
"$type": "app.bsky.feed.post",
"text": text,
"langs": ["en"],
"createdAt": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
"facets": [{
"index": {"byteStart": start, "byteEnd": start + len(url.encode())},
"features": [{"$type": "app.bsky.richtext.facet#link", "uri": url}],
}],
}
if card:
external = {"uri": card["uri"], "title": card["title"], "description": card["description"]}
if "image" in card:
image, mime = card["image"]
external["thumb"] = xrpc("com.atproto.repo.uploadBlob", image, session["accessJwt"], mime)["blob"]
record["embed"] = {"$type": "app.bsky.embed.external", "external": external}
post = xrpc("com.atproto.repo.createRecord",
{"repo": session["did"], "collection": "app.bsky.feed.post", "record": record},
session["accessJwt"])
print(f"Posted: {post['uri']}")
if __name__ == "__main__":
main()
+39
View File
@@ -0,0 +1,39 @@
name: Announce release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Release tag to announce
required: true
dry_run:
description: Only log in and print the post, don't publish it
type: boolean
default: true
permissions:
contents: read
jobs:
bluesky:
name: Post to Bluesky
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- name: Post release
# Tag passed via env, never spliced into the script (user-controlled text).
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name || inputs.tag }}
DRY_RUN: ${{ inputs.dry_run && 'true' || 'false' }}
BLUESKY_HANDLE: moepchi.bsky.social
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
run: |
gh release view "$TAG" -R "$GITHUB_REPOSITORY" --json tagName,url,body \
| python3 .github/scripts/announce-release.py
+6 -4
View File
@@ -82,7 +82,7 @@ not need to be installed on the same machine, modified, or operated by you.
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
| ⌨️ **Keyboard basics** | Tab through the tree (Enter joins, context-menu key opens the menu), focus-trapped dialogs, labelled toolbar buttons |
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
| 🍵 **GreenTeaSpeak support** | Connects to real GreenTeaSpeak servers (not just TS3/TS6/TeaSpeak), plus an optional GTS-styled UI chrome (dark panels, gold menu bar, connection-tab strip) alongside the default look |
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
@@ -187,7 +187,7 @@ The **Design Store** (browse/upload community themes) points at the maintainer's
#### Environment variables
All optional; add them under `environment:` in your compose override next to `PORT`.
All optional; add them under `environment:` in your compose override next to `PORT`. These are the common ones - the full list (logging, feedback form, Design Store details, build-time variables) is on the wiki's [Configuration & Environment Variables](https://github.com/Moepchi/webspeak3/wiki/Configuration-and-Environment-Variables) page.
| Variable | Default | Purpose |
|---|---|---|
@@ -201,12 +201,14 @@ All optional; add them under `environment:` in your compose override next to `PO
| `STORE_DATA_FILE` | `store-themes.json` in the container's working dir | Where submitted themes (including screenshots) are stored. Mount a volume over this path if they should survive a container recreate. |
| `STORE_ALLOWED_ORIGIN` | `*` | CORS origin allowed to call the store endpoint, if you want to restrict it to your own frontend's origin. |
| `STORE_ADMIN_TOKEN` | unset | Bearer token for moderation. New submissions wait as "pending" until approved on the review page at `/api/store/admin` (enter the token there); the token holder's own submissions and the reserved author name(s) skip the queue. Without it, nothing ever gets published. Submitted CSS is also checked server-side: no `@import`/`@font-face`, no external `url()` — only inline `data:` images. |
| `ALLOWED_SERVERS` | unset (any server) | Comma-separated list of server addresses this gateway is allowed to connect to (e.g. `ts.example.com,*.example.net`). A port is matched separately from the host, so listing `ts.example.com` allows any port on it. An entry starting with `*.` matches any subdomain (`*.example.com` allows `ts.example.com`, not `example.com` itself - list that separately too if it should also be reachable). Locks a self-hosted instance down to specific server(s) instead of acting as a general "connect anywhere" client; a rejected `connect` gets an error back before any connector process is even spawned. |
| `ALLOWED_SERVERS` | unset (any server) | Comma-separated list of server addresses this gateway is allowed to connect to (e.g. `ts.example.com,*.example.net`). A port is matched separately from the host, so listing `ts.example.com` allows any port on it. An entry starting with `*.` matches any subdomain (`*.example.com` allows `ts.example.com`, not `example.com` itself - list that separately too if it should also be reachable). Locks a self-hosted instance down to specific server(s) instead of acting as a general "connect anywhere" client; a rejected `connect` gets an error back before any connector process is even spawned. An entry may carry a port (`ts.example.com:9988`): it still allows every port, but that's the address the connect dialog offers (see `SERVER_PICKER`). |
| `SERVER_PICKER` | on | With `ALLOWED_SERVERS` set (and no `*.` entries in it), the connect dialog's address field becomes a dropdown of those servers, or a locked field if there's only one. Set to `0` for the plain text field instead. Only works when the gateway serves the web client itself (the Docker image does). |
| `ALLOW_PRIVATE_TARGETS` | off | By default the gateway refuses to connect to private/internal addresses (loopback, `10.x`, `192.168.x`, CGNAT, link-local, …), no matter how they were reached (IP, DNS, SRV, TSDNS, nickname, file-transfer redirect), so it can't be abused to probe the network it runs in. **If your TeamSpeak server is on the same LAN as the gateway, set this to `1`.** |
| `TURN_URLS` | unset | Comma-separated TURN URLs (e.g. `turn:turn.example.com:3478`) offered to browsers for screen streams, for viewers or publishers behind NATs where direct P2P fails. Pair with `TURN_SECRET` (coturn's `use-auth-secret`; each browser gets its own credential valid for 24 h) or with static `TURN_USERNAME` / `TURN_CREDENTIAL`, which every visitor can read. |
| `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. |
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `300` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
| `TRUST_PROXY` | off | Set to `1` when the gateway is **only** reachable through a reverse proxy/tunnel (e.g. cloudflared): per-IP limits then use `CF-Connecting-IP` / `X-Forwarded-For` instead of the proxy's own address. Don't set it on a directly exposed gateway - clients could then spoof their IP. |
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
> **Trust model:** the gateway speaks the TeamSpeak protocol on the user's behalf, so whoever runs it necessarily handles their identity key, server/channel passwords and privilege keys (they're kept out of process listings, but the operator can still see them). Only use gateways you trust, and serve them over HTTPS/WSS (`TLS_CERT`/`TLS_KEY` or a TLS-terminating proxy) - plain HTTP exposes all of that on the wire. File uploads are limited to 24 MiB, downloads to 25 MiB.
+9 -6
View File
@@ -49,14 +49,17 @@ This roadmap is intentionally outcome-focused. It does not promise fixed dates.
Basics are in place: the UI language sets the document's `lang`/`dir`,
dialogs take focus on open, keep Tab inside, close on Escape, and hand focus
back; toolbar icon buttons are labelled; channel and client rows are
focusable (Enter joins a channel or opens a private chat, Space selects,
the context-menu key or Shift+F10 opens the menu with focus in it). Still to do:
back; toolbar icon and menu bar buttons are real, labelled buttons. The
channel tree is an ARIA tree with one Tab stop: arrow keys walk it (selection
follows focus), Left/Right collapse, expand and jump to parent or child,
Enter joins a channel or opens a private chat, and the context-menu key or
Shift+F10 opens the menu. Menus take focus on open, move with the arrow keys,
and Escape hands focus back to the button that opened them. An axe-core scan
of the connected UI is clean in every built-in design except for landmark
best practices and GreenTeaSpeak's native selection colours. Still to do:
- Replace the remaining clickable `<div>`s with real buttons
- Arrow-key navigation through the tree and menus
- Do a full screen-reader pass (NVDA/VoiceOver) through a real connect
session to find what else is missing
session to find what else is missing (e.g. announcing who is talking)
### Deployment experience
+171 -21
View File
@@ -37,6 +37,16 @@ use tsproto_packets::packets::{AudioData, CodecType, Direction, Flags, OutAudio,
const FRAME_SAMPLES: usize = 960;
/// Upper bound for a file download relayed to the browser (see its use).
const MAX_DOWNLOAD_BYTES: u64 = 25 << 20;
/// Uploads are capped the same way, independent of what the browser checks.
const MAX_UPLOAD_BYTES: u64 = 24 << 20;
/// File transfers cross the gateway in pieces of this size (raw bytes, a
/// multiple of 3 so the base64 pieces can simply be concatenated). One huge
/// line per file made the Node gateway hold several copies of it at once and
/// run out of heap (2026-10-11).
const TRANSFER_CHUNK_BYTES: usize = 192 << 10;
/// Half-received chunked uploads per connection - each can hold up to
/// MAX_UPLOAD_BYTES until it completes.
const MAX_PARTIAL_UPLOADS: usize = 4;
const MAX_ICON_BYTES: u64 = 512 << 10;
/// Avatars are fetched for everyone in the user's channel without asking;
/// TS3 servers default to a 300 KiB avatar size limit.
@@ -224,11 +234,11 @@ fn parse_codec_encryption_mode(s: &str) -> Option<CodecEncryptionMode> {
/// Human-facing entries for the Server tab's log-style notifications
/// (client join/leave/switch, channel group assignment, channel/server
/// changes, own permission errors) - mirrors what the native TS3 client
/// shows inline in the server chat. `rename_all = "camelCase"` covers both
/// the `kind` tag values and field names, so this needs no remapping on the
/// shows inline in the server chat. `rename_all` covers the `kind` tag values
/// and `rename_all_fields` the field names, so this needs no remapping on the
/// gateway side (unlike the snake_case variants below).
#[derive(Serialize)]
#[serde(tag = "kind", rename_all = "camelCase")]
#[serde(tag = "kind", rename_all = "camelCase", rename_all_fields = "camelCase")]
enum ServerLogEntry {
ClientJoin { client: String, channel: String },
ClientLeave { client: String },
@@ -385,12 +395,11 @@ enum Event {
/// Reply to a "ftlist" request - one channel/path's directory listing.
#[serde(rename = "fileList")]
FileList { cid: u64, path: String, entries: Vec<FileListEntry> },
/// A requested file download finished; `data` is the full file content,
/// base64-encoded. Whole files are buffered in memory and sent as one
/// event rather than streamed incrementally - fine for the file sizes a
/// TS3 channel filebase realistically holds, not meant for huge transfers.
#[serde(rename = "fileDownloadData")]
FileDownloadData { cid: u64, path: String, data: String },
/// One piece of a requested file download, base64-encoded. `offset` is
/// the raw byte offset of this piece (0 starts a new download), `done`
/// marks the last one. Pieces arrive in order.
#[serde(rename = "fileDownloadChunk")]
FileDownloadChunk { cid: u64, path: String, offset: u64, data: String, done: bool },
/// A requested file upload finished successfully.
#[serde(rename = "fileUploadDone")]
FileUploadDone { cid: u64, path: String },
@@ -489,6 +498,54 @@ struct FileListEntry {
timestamp: String,
}
/// Handles one `ftuploadchunk <cid>\t<offset>\t<total>\t<path>\t<base64>`
/// line. Pieces come in order; offset 0 starts an upload. Returns the complete
/// file once the piece that reaches <total> has arrived.
fn take_upload_chunk(
partials: &mut HashMap<(u64, String), (u64, Vec<u8>)>,
rest: &str,
) -> Result<Option<(u64, String, Vec<u8>)>, String> {
let mut parts: Vec<&str> = rest.splitn(5, '\t').collect();
// The stdin loop trims each line, which eats the trailing tab of an empty piece.
if parts.len() == 4 {
parts.push("");
}
let [cid, offset, total, path, data] = parts.as_slice() else {
return Err("Invalid ftuploadchunk args".into());
};
let (Ok(cid), Ok(offset), Ok(total), Ok(bytes)) = (
cid.trim().parse::<u64>(),
offset.trim().parse::<u64>(),
total.trim().parse::<u64>(),
base64::engine::general_purpose::STANDARD.decode(data.trim()),
) else {
return Err("Invalid ftuploadchunk args".into());
};
let key = (cid, path.to_string());
if offset == 0 {
if total > MAX_UPLOAD_BYTES {
return Err(format!("Upload refused: {path} is larger than {} KiB", MAX_UPLOAD_BYTES >> 10));
}
if !partials.contains_key(&key) && partials.len() >= MAX_PARTIAL_UPLOADS {
return Err("Too many uploads at once".into());
}
partials.insert(key.clone(), (total, Vec::with_capacity(total as usize)));
}
let Some((expected, buf)) = partials.get_mut(&key) else {
return Err(format!("Upload failed: {path} has no upload in progress"));
};
if buf.len() as u64 != offset || *expected != total || offset + bytes.len() as u64 > total {
partials.remove(&key);
return Err(format!("Upload failed: {path} arrived out of order"));
}
buf.extend_from_slice(&bytes);
if (buf.len() as u64) < total {
return Ok(None);
}
let (_, bytes) = partials.remove(&key).expect("present, checked above");
Ok(Some((cid, key.1, bytes)))
}
fn emit(event: &Event) {
println!("{}", serde_json::to_string(event).unwrap());
}
@@ -584,6 +641,10 @@ fn log_book_event(con: &data::Connection, event: &BookEvent) {
| PropertyId::ServerCodecEncryptionMode
| PropertyId::ServerTempChannelDefaultDeleteDelay
| PropertyId::ServerPrioritySpeakerDimmModificator,
// Only notifyserveredited carries an invoker; the 20s
// servergetvariables poll answers with notifyserverupdated, which
// rewrites every field (changed or not) without one.
invoker: Some(_),
..
} => {
emit_server_log(ServerLogEntry::ServerEdited);
@@ -1052,6 +1113,8 @@ async fn run(args: Args) -> Result<()> {
// request that stream belongs to.
let mut pending_downloads: HashMap<u16, (u64, String)> = HashMap::new();
let mut pending_uploads: HashMap<u16, (u64, String, Vec<u8>)> = HashMap::new();
// Chunked uploads still arriving from the browser: (cid, path) -> (total size, bytes so far).
let mut partial_uploads: HashMap<(u64, String), (u64, Vec<u8>)> = HashMap::new();
// Set by "permissionlist" while waiting to emit the full permission
// catalog (name-resolution reuses the same permission_names cache/fetch
// as "permoverview" above).
@@ -1085,6 +1148,10 @@ async fn run(args: Args) -> Result<()> {
loop {
let mut events = con.events();
let outcome = tokio::select! {
// After a stall (e.g. CPU steal) the missed audio ticks fire in a burst.
// Polling in order drains the queued packets first, otherwise a tick can
// find an empty queue and play Opus loss concealment instead.
biased;
line = stdin_lines.next_line() => LoopOutcome::StdinLine(line),
ev = events.next() => LoopOutcome::ConEvent(ev),
_ = audio_ticker.tick() => LoopOutcome::AudioTick,
@@ -2174,6 +2241,19 @@ async fn run(args: Args) -> Result<()> {
}
_ => emit(&Event::Error { message: "Invalid ftupload args".into() }),
}
} else if let Some(rest) = l.strip_prefix("ftuploadchunk ") {
match take_upload_chunk(&mut partial_uploads, rest) {
Ok(Some((cid, path, bytes))) => {
match con.upload_file(ChannelId(cid), &path, None, bytes.len() as u64, true, false) {
Ok(handle) => {
pending_uploads.insert(handle.0, (cid, path, bytes));
}
Err(e) => emit(&Event::Error { message: format!("Upload failed: {e}") }),
}
}
Ok(None) => {}
Err(message) => emit(&Event::Error { message }),
}
} else if l == "permissionlist" {
if pending_permission_list {
// A catalog fetch is already in flight (triggered by an
@@ -2969,9 +3049,9 @@ async fn run(args: Args) -> Result<()> {
// file does not stall channel switches, chat, etc. while in flight;
// emit() is just a println! under the hood, so it is safe to call
// from a spawned task even while the main loop is emitting too.
// Everything is buffered and then sent as one base64 JSON line,
// so cap it - a server could otherwise announce (or just send)
// gigabytes and take the whole gateway host's memory with it.
// It goes out in TRANSFER_CHUNK_BYTES pieces but the browser
// still assembles the whole file, so cap it - a server could
// otherwise announce (or just send) gigabytes.
let stream = result.stream;
let announced_size = result.size;
// Group/server icons are fetched automatically, without the user
@@ -2988,16 +3068,42 @@ async fn run(args: Args) -> Result<()> {
});
return;
}
let mut buf = Vec::new();
match stream.take(limit + 1).read_to_end(&mut buf).await {
Ok(_) if buf.len() as u64 > limit => emit(&Event::Error {
message: format!("Download aborted: {path} is larger than {} KiB", limit >> 10),
}),
Ok(_) => {
let data = base64::engine::general_purpose::STANDARD.encode(&buf);
emit(&Event::FileDownloadData { cid, path, data });
let mut stream = stream.take(limit + 1);
let mut buf = vec![0u8; TRANSFER_CHUNK_BYTES];
let mut offset = 0u64;
loop {
// Fill the whole chunk (or hit EOF) so every piece but the
// last is exactly TRANSFER_CHUNK_BYTES - see its comment.
let mut filled = 0;
let read = loop {
match stream.read(&mut buf[filled..]).await {
Ok(0) => break Ok(()),
Ok(n) => {
filled += n;
if filled == buf.len() {
break Ok(());
}
}
Err(e) => break Err(e),
}
};
if let Err(e) = read {
emit(&Event::Error { message: format!("Download failed: {e}") });
return;
}
Err(e) => emit(&Event::Error { message: format!("Download failed: {e}") }),
if offset + filled as u64 > limit {
emit(&Event::Error {
message: format!("Download aborted: {path} is larger than {} KiB", limit >> 10),
});
return;
}
let done = filled < buf.len();
let data = base64::engine::general_purpose::STANDARD.encode(&buf[..filled]);
emit(&Event::FileDownloadChunk { cid, path: path.clone(), offset, data, done });
if done {
return;
}
offset += filled as u64;
}
});
}
@@ -3079,3 +3185,47 @@ async fn run(args: Args) -> Result<()> {
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
fn chunk(offset: u64, total: u64, data: &[u8]) -> String {
format!("7\t{offset}\t{total}\t/a b.txt\t{}", base64::engine::general_purpose::STANDARD.encode(data))
}
#[test]
fn server_log_fields_are_camel_case() {
let entry = ServerLogEntry::ClientChannelSwitch {
client: "a".into(),
from_channel: "b".into(),
to_channel: "c".into(),
};
assert_eq!(
serde_json::to_string(&entry).unwrap(),
r#"{"kind":"clientChannelSwitch","client":"a","fromChannel":"b","toChannel":"c"}"#
);
}
#[test]
fn upload_chunks_assemble_in_order_and_reject_gaps() {
let mut partials = HashMap::new();
assert_eq!(take_upload_chunk(&mut partials, &chunk(0, 5, b"abc")), Ok(None));
assert_eq!(
take_upload_chunk(&mut partials, &chunk(3, 5, b"de")),
Ok(Some((7, "/a b.txt".to_string(), b"abcde".to_vec())))
);
assert!(partials.is_empty());
take_upload_chunk(&mut partials, &chunk(0, 5, b"abc")).unwrap();
assert!(take_upload_chunk(&mut partials, &chunk(4, 5, b"e")).is_err());
assert!(partials.is_empty(), "a gap drops the upload");
assert!(take_upload_chunk(&mut partials, &chunk(0, MAX_UPLOAD_BYTES + 1, b"a")).is_err());
// An empty file's only piece reaches us with its trailing tab trimmed off.
assert_eq!(
take_upload_chunk(&mut partials, chunk(0, 0, b"").trim_end()),
Ok(Some((7, "/a b.txt".to_string(), Vec::new())))
);
}
}
+3 -2
View File
@@ -9,8 +9,9 @@ services:
# This file publishes no port - the gateway is only reachable through
# the cloudflared tunnel below, so the client IP it forwards can be
# trusted (per-IP limits would otherwise see every user as the tunnel).
# Remove this if you publish a port directly instead.
- TRUST_PROXY=1
# Remove this if you publish a port directly instead; behind your own
# reverse proxy use TRUST_PROXY=1.
- TRUST_PROXY=cloudflare
# Nothing in here needs Linux capabilities (unprivileged port, plain
# TCP/UDP sockets), so drop them all.
cap_drop: [ALL]
+33 -6
View File
@@ -54,8 +54,8 @@ function isServerAllowed(host: unknown): boolean {
return ALLOWED_SERVERS.some((entry) => {
// "*.example.com" matches any subdomain (TLS-wildcard-style: not the
// bare apex itself - list that separately if it should be allowed too).
if (entry.startsWith("*.")) return target.endsWith(entry.slice(1));
return target === entry;
if (entry.startsWith("*.")) return target.endsWith(stripPort(entry).slice(1));
return target === stripPort(entry);
});
}
@@ -93,10 +93,18 @@ const ALLOWED_ORIGINS = (process.env.ALLOWED_ORIGINS ?? "")
const MAX_CONNECTIONS_PER_IP = Number(process.env.MAX_CONNECTIONS_PER_IP ?? 10);
const MAX_CONNECTIONS = Number(process.env.MAX_CONNECTIONS ?? 300);
const connectionsPerIp = new Map<string, number>();
// Every "connect" spawns a fresh connector, and a socket can send any number
// of them - without this, 10 sockets were enough to join-flood a TS server
// through this gateway at several joins per second. Real clients (reconnect
// backoff, restoring a handful of tabs) stay far below it.
const CONNECT_RATE_LIMIT = Number(process.env.CONNECT_RATE_LIMIT ?? 30);
const isConnectRateLimited = createRateLimiter(CONNECT_RATE_LIMIT, 60_000);
// Largest single WS message: file uploads travel base64-encoded inside one,
// so this is ~4/3 of the biggest uploadable file (see MAX_UPLOAD_BYTES in
// web/src/App.tsx). ws's own default is 100 MiB.
// Largest single WS message. Uploads now arrive in small "uploadFileChunk"
// pieces; this size only stays for browsers still running a client from
// before that, which send the whole file base64-encoded in one "uploadFile"
// message (~4/3 of MAX_UPLOAD_BYTES in web/src/App.tsx). ws's own default is
// 100 MiB.
const WS_MAX_PAYLOAD = 34 * 1024 * 1024;
const PORT = Number(process.env.PORT ?? 8080);
@@ -112,7 +120,7 @@ const WEB_DIST = process.env.WEB_DIST ?? path.resolve(__dirname, "../../web/dist
const SERVE_STATIC = process.env.WEB_STATIC !== "0";
// Sent to every browser in the "hello" message on socket open; see there.
const GATEWAY_FEATURES = ["clientVolume", "keepalive"];
const GATEWAY_FEATURES = ["clientVolume", "keepalive", "chunkedUpload"];
// Optional TURN relay for screen streams, also handed out in "hello". With
// TURN_SECRET (coturn's use-auth-secret) every socket gets its own credential,
@@ -134,9 +142,17 @@ function turnServers() {
// issue #12): set on the container, these end up in the served index.html as
// <meta> tags the client reads at startup, so changing them needs no rebuild.
// Meta tags rather than an inline script, which CONTENT_SECURITY_POLICY forbids.
// The allowlist goes along so the client can offer it as a dropdown (or a
// locked field for a single entry) instead of a free-text address; not with
// wildcards, which can't be listed, nor with SERVER_PICKER=0.
const SERVER_PICKER =
process.env.SERVER_PICKER !== "0" && !ALLOWED_SERVERS.some((e) => e.startsWith("*."))
? ALLOWED_SERVERS.join(",")
: undefined;
const RUNTIME_CONFIG_META = Object.entries({
"webspeak3-default-server": process.env.DEFAULT_SERVER,
"webspeak3-default-channel": process.env.DEFAULT_CHANNEL,
"webspeak3-allowed-servers": SERVER_PICKER,
})
.flatMap(([name, value]) =>
value ? [`<meta name="${name}" content="${value.replace(/[&"<>]/g, (c) => `&#${c.charCodeAt(0)};`)}">`] : [],
@@ -700,6 +716,13 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
);
break;
}
if (CONNECT_RATE_LIMIT > 0 && isConnectRateLimited(ip)) {
console.warn(`[ratelimit] too many connects from one IP, target host=${msg.host}`);
socket.send(
JSON.stringify({ type: "error", message: "Too many connection attempts. Please wait a minute." }),
);
break;
}
// Replacing a connection on the same socket: tear down the previous
// connector so we don't leak processes.
if (connection) {
@@ -973,6 +996,10 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
await connection?.uploadFile(msg.channelId, msg.path, msg.dataBase64);
break;
}
case "uploadFileChunk": {
await connection?.uploadFileChunk(msg.channelId, msg.path, msg.offset, msg.total, msg.data);
break;
}
case "getPermissionCatalog": {
await connection?.getPermissionCatalog();
break;
+12 -11
View File
@@ -1,19 +1,20 @@
import type { IncomingMessage } from "node:http";
// Behind a reverse proxy / tunnel (e.g. cloudflared) every request arrives
// from the proxy's own address, so per-IP limits would lump all users into
// one bucket. TRUST_PROXY=1 makes us read the client IP the proxy reports
// instead - only set it when the gateway is reachable *solely* through that
// proxy, otherwise anyone can send the header and pick their own "IP".
const TRUST_PROXY = process.env.TRUST_PROXY === "1";
// Behind a reverse proxy / tunnel every request arrives from the proxy's own
// address, so per-IP limits would lump all users into one bucket. Only set
// TRUST_PROXY when the gateway is reachable *solely* through that proxy:
// - "cloudflare": CF-Connecting-IP, which Cloudflare always sets itself.
// - "1": the last X-Forwarded-For entry, the one our own proxy appended;
// anything before it came from the client and can be made up.
const TRUST_PROXY = process.env.TRUST_PROXY;
export function clientIp(req: IncomingMessage): string {
if (TRUST_PROXY) {
if (TRUST_PROXY === "cloudflare") {
const cf = req.headers["cf-connecting-ip"];
if (typeof cf === "string" && cf) return cf.trim();
const xff = req.headers["x-forwarded-for"];
const first = (Array.isArray(xff) ? xff[0] : xff)?.split(",")[0]?.trim();
if (first) return first;
if (typeof cf === "string" && cf.trim()) return cf.trim();
} else if (TRUST_PROXY === "1") {
const last = String(req.headers["x-forwarded-for"] ?? "").split(",").at(-1)?.trim();
if (last) return last;
}
return (req.socket.remoteAddress ?? "unknown").replace(/^::ffff:/, "");
}
+1 -1
View File
@@ -36,7 +36,7 @@ const STORE_SCREENSHOT_RE = /^data:image\/(png|jpe?g|webp);base64,[A-Za-z0-9+/]+
// grow unbounded from spam that slips past rate limiting (a fresh IP per
// submission, say). Bounds worst case to ~300 * 450KB =~ 135MB in RAM.
const STORE_MAX_THEMES = 300;
const STORE_BASE_THEMES = new Set(["standard", "nova", "greenteaspeak", "pulse"]);
const STORE_BASE_THEMES = new Set(["standard", "nova", "greenteaspeak", "pulse", "ide"]);
// A handful of names (the operator's own) that only whoever holds
// STORE_ADMIN_TOKEN may publish under - stops anyone else from impersonating
+13 -2
View File
@@ -205,7 +205,7 @@ export type Ts3ConnectionEvent =
| { 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: "fileDownloadChunk"; cid: number; path: string; offset: number; data: string; done: boolean }
| { type: "fileUploadDone"; cid: number; path: string }
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] }
@@ -451,7 +451,7 @@ export class Ts3Connection {
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: "fileDownloadChunk"; cid: number; path: string; offset: number; data: string; done: boolean }
| { type: "fileUploadDone"; cid: number; path: string }
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] }
@@ -824,6 +824,17 @@ export class Ts3Connection {
this.writeLine(`ftupload ${channelId}\t${sanitizedPath}\t${dataBase64}`);
}
/** One piece of a chunked upload (see "chunkedUpload" in GATEWAY_FEATURES).
* Pieces must arrive in order; offset 0 starts the upload and the piece
* that reaches `total` sends it. Keeps every message small, unlike
* uploadFile above, which only stays for clients from before the split. */
async uploadFileChunk(channelId: number, path: string, offset: number, total: number, dataBase64: string): Promise<void> {
if (![channelId, offset, total].every(Number.isSafeInteger)) return;
if (typeof dataBase64 !== "string" || !/^[A-Za-z0-9+/]*={0,2}$/.test(dataBase64)) return;
const sanitizedPath = path.replace(/[\r\n\t]+/g, " ").trim();
this.writeLine(`ftuploadchunk ${channelId}\t${offset}\t${total}\t${sanitizedPath}\t${dataBase64}`);
}
async sendChatMessage(message: string): Promise<void> {
const sanitized = message.replace(/[\r\n]+/g, " ").trim();
if (sanitized) this.writeLine(`chat ${sanitized}`);
+95 -8
View File
@@ -12,7 +12,7 @@
--border: #b7bcc3;
--border-soft: #d3d7db;
--text: #1a1a1a;
--text-muted: #888;
--text-muted: #6b6b6b;
--accent: #2b4a6b;
--input-bg: #ffffff;
--input-text: #1a1a1a;
@@ -2004,6 +2004,19 @@
padding-left: 1.1rem;
}
/* Double-clicking UI controls (channels, users, tabs, menus) must not select text.
Chat, log and info panel stay selectable. */
.ts-app :is(.ts-row, .ts-menubar, .ts-toolbar, .ts-chat-tabs, .gts-connection-tabs, .ts-speaking-now, button) {
-webkit-user-select: none;
user-select: none;
}
/* Safari would otherwise block typing/selecting in inputs inside those areas */
.ts-app :is(input, textarea) {
-webkit-user-select: text;
user-select: text;
}
.ts-row {
display: flex;
align-items: center;
@@ -2016,11 +2029,32 @@
box-sizing: border-box;
}
.ts-app .ts-row:focus-visible {
.ts-app .ts-row:focus-visible,
.ts-plain-button:focus-visible {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
/* A real <button> that looks like the <span>/<li> text it replaced. :where()
keeps this at zero specificity, so every theme rule still wins. */
:where(.ts-plain-button) {
font: inherit;
color: inherit;
background: none;
border: 0;
padding: 0;
margin: 0;
cursor: inherit;
text-align: inherit;
}
:where(li > .ts-plain-button) {
display: block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.ts-tree-search {
box-sizing: border-box;
width: 100%;
@@ -2372,6 +2406,8 @@
display: flex;
flex-direction: column;
min-width: 0;
/* without this the panel grows with its lines instead of scrolling them */
min-height: 0;
}
.ts-chat-tabs {
@@ -2429,6 +2465,55 @@
word-break: break-word;
}
.ts-chat-bubble a {
color: var(--accent);
text-decoration: underline;
}
.ts-chat-bubble code {
font-family: ui-monospace, monospace;
font-size: 0.95em;
padding: 0 0.25em;
border: 1px solid var(--border-soft);
border-radius: 3px;
}
.ts-bb-list {
margin: 0.15em 0;
padding-left: 1.6em;
}
.ts-bb-quote {
margin: 0.15em 0;
padding-left: 0.6em;
border-left: 3px solid var(--border-soft);
}
.ts-bb-hr {
border: 0;
border-top: 1px solid var(--border-soft);
margin: 0.3em 0;
}
.ts-bb-h {
font-weight: bold;
font-size: 1.1em;
}
.ts-bb-h1 {
font-size: 1.4em;
}
.ts-bb-h2 {
font-size: 1.2em;
}
.ts-bb-img {
max-width: 100%;
max-height: 240px;
vertical-align: middle;
}
.ts-chat-from {
font-weight: 600;
color: var(--accent);
@@ -3847,6 +3932,8 @@
pointer-events: none;
}
/* No theme defines --panel-bg, so the update toast and the feedback bubble
are always dark: their text colors are fixed, not the theme's. */
.ts-update-toast {
position: fixed;
left: 50%;
@@ -3857,7 +3944,7 @@
align-items: center;
gap: 0.6rem;
background: var(--panel-bg, #23262e);
color: var(--text, #eee);
color: #eee;
border: 1px solid var(--border);
border-radius: 0.5rem;
padding: 0.6rem 0.7rem 0.6rem 0.9rem;
@@ -3877,7 +3964,7 @@
.ts-update-toast-dismiss {
background: transparent !important;
color: var(--text-muted, #999) !important;
color: #aaa !important;
border: none !important;
padding: 0 0.2rem !important;
font-size: 12px;
@@ -3935,7 +4022,7 @@
padding: 0 0.85rem;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.18);
background: #ff5e5b;
background: #d6403d; /* Ko-fi red, darkened to 4.5:1 for the white label */
color: #fff;
font-size: 12px;
font-weight: 600;
@@ -3947,7 +4034,7 @@
}
.ts-donate-fab:hover {
background: #ff4b47;
background: #c4362f;
transform: scale(1.06);
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
@@ -3961,7 +4048,7 @@
position: relative;
max-width: 13rem;
background: var(--panel-bg, #23262e);
color: var(--text, #eee);
color: #eee;
border: 1px solid var(--border);
border-radius: 0.6rem;
padding: 0.5rem 0.7rem;
@@ -3993,7 +4080,7 @@
border-radius: 50%;
border: 1px solid var(--border);
background: var(--panel-bg, #23262e);
color: var(--text-muted, #999);
color: #aaa;
font-size: 10px;
line-height: 1;
display: flex;
+385 -97
View File
File diff suppressed because it is too large. Load diff
+146 -12
View File
@@ -39,7 +39,12 @@ interface DemoClient {
const DEMO_CHANNELS: DemoChannel[] = [
{ id: 1, parent: 0, order: 0, name: "Lobby", topic: "Welcome to the WebSpeak3 demo!", codec: "Opus Voice", maxClients: null, hasPassword: false },
{ id: 2, parent: 0, order: 1, name: "Gaming", topic: "", codec: "Opus Voice", maxClients: 10, hasPassword: false },
{ id: 3, parent: 0, order: 2, name: "AFK", topic: "", codec: "Opus Voice", maxClients: null, hasPassword: false },
{ id: 4, parent: 2, order: 0, name: "Squad 1", topic: "", codec: "Opus Voice", maxClients: 5, hasPassword: false },
{ id: 5, parent: 2, order: 1, name: "Squad 2", topic: "", codec: "Opus Voice", maxClients: 5, hasPassword: false },
{ id: 6, parent: 0, order: 2, name: "Music", topic: "Requests in chat", codec: "Opus Music", maxClients: null, hasPassword: false },
{ id: 7, parent: 0, order: 3, name: "Talk", topic: "", codec: "Opus Voice", maxClients: null, hasPassword: false },
{ id: 8, parent: 7, order: 0, name: "Meeting Room", topic: "Password: ask an admin", codec: "Opus Voice", maxClients: 8, hasPassword: true },
{ id: 3, parent: 0, order: 4, name: "AFK", topic: "", codec: "Opus Voice", maxClients: null, hasPassword: false },
];
const DEMO_CHANNEL_GROUPS = [
@@ -154,6 +159,30 @@ function demoPermKey(scope: string, id1: number, id2?: number): string {
const SELF_ID = 101;
// Random visitors that join, wander around, chat and leave again (see scriptServerLife).
const DEMO_VISITOR_NAMES = ["Mia", "Noah", "Lena", "Kai", "Zoe", "Finn", "Ava", "Leo", "Ivy", "Max"];
const DEMO_COUNTRIES = ["DE", "US", "GB", "FR", "NL", "PL", "SE", "CZ", ""];
const DEMO_CHAT_LINES = [
"hey all",
"anyone up for a round later?",
"brb, getting coffee",
"lol",
"can you hear me?",
"gg",
"my mic was muted, sorry",
"back",
"who's hosting tonight?",
"check out https://github.com/Moepchi/webspeak3",
];
const DEMO_PM_LINES = [
"hey, got a sec?",
"you coming to Gaming later?",
"thanks for the help earlier!",
"can you move me to Gaming?",
];
const pick = <T,>(items: T[]): T => items[Math.floor(Math.random() * items.length)];
/**
* Drop-in stand-in for a real WebSocket. Implements the subset of the
* WebSocket interface App.tsx actually uses (onopen/onmessage/onerror/
@@ -170,8 +199,8 @@ export class DemoSocket {
private closed = false;
private timers: number[] = [];
private selfChannel = 1;
private selfChannelGroup = 4;
private selfServerGroups = new Set<number>([4]);
private selfChannelGroup = 1;
private selfServerGroups = new Set<number>([1]);
constructor() {
this.after(400, () => {
@@ -206,6 +235,8 @@ export class DemoSocket {
private after(ms: number, fn: () => void) {
const id = window.setTimeout(() => {
// Drop fired ids so the looping talker script doesn't grow the list forever.
this.timers = this.timers.filter((t) => t !== id);
if (this.closed) return;
fn();
}, ms);
@@ -234,6 +265,8 @@ export class DemoSocket {
});
this.after(150, () => this.sendChannels(nickname));
this.scriptServerLog(nickname);
this.scriptTalkers();
this.after(6000, () => this.scriptServerLife());
});
break;
}
@@ -258,7 +291,7 @@ export class DemoSocket {
this.after(80, () => this.emit({ type: "serverMessage", from: this.lastNickname, message: msg.message }));
break;
case "sendPrivateMessage": {
const partner = DEMO_NPCS.find((c) => c.id === msg.clientId);
const partner = this.npcs().find((c) => c.id === msg.clientId);
this.after(80, () =>
this.emit({
type: "privateMessage",
@@ -268,10 +301,21 @@ export class DemoSocket {
fromSelf: true,
})
);
if (partner && !partner.away) {
this.after(1500 + Math.random() * 2500, () =>
this.emit({
type: "privateMessage",
partnerId: partner.id,
partnerName: partner.name,
message: pick(["ok 👍", "haha sure", "one sec", "sounds good", "yep"]),
fromSelf: false,
})
);
}
break;
}
case "sendPoke": {
const partner = DEMO_NPCS.find((c) => c.id === msg.clientId);
const partner = this.npcs().find((c) => c.id === msg.clientId);
this.after(400, () =>
this.emit({ type: "poke", from: partner?.name ?? "Someone", message: "(demo poke - no reply expected)" })
);
@@ -284,7 +328,7 @@ export class DemoSocket {
if (clientId === SELF_ID) {
this.selfChannel = channelId;
} else {
const npc = DEMO_NPCS.find((c) => c.id === clientId);
const npc = this.npcs().find((c) => c.id === clientId);
if (npc) npc.channel = channelId;
}
this.after(120, () => this.sendChannels(this.lastNickname));
@@ -442,14 +486,14 @@ export class DemoSocket {
this.after(300, () => this.emit({ type: "serverGroupList", entries: DEMO_SERVER_GROUPS }));
break;
case "setChannelGroup": {
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
const npc = this.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);
const npc = this.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) {
@@ -459,7 +503,7 @@ export class DemoSocket {
break;
}
case "removeServerGroup": {
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
const npc = this.npcs().find((c) => c.databaseId === msg.clientDbId);
if (npc) {
npc.serverGroups = npc.serverGroups.filter((g) => g !== msg.serverGroupId);
} else if (msg.clientDbId === 1) {
@@ -611,11 +655,101 @@ export class DemoSocket {
type: "serverLog",
kind: "clientChannelGroupAssigned",
client: nickname,
group: "Guest",
group: "Channel Admin",
})
);
}
private visitors: DemoClient[] = [];
private nextVisitorId = 200;
private npcs(): DemoClient[] {
return [...DEMO_NPCS, ...this.visitors];
}
/** Random voice activity so the talking indicators (tree, speaker cards) are
* visible: every unmuted client in your channel talks now and then, sometimes
* over each other. Like real TS, only your own channel is audible. */
private scriptTalkers() {
const audible = this.npcs()
.filter(
(c) =>
c.channel === this.selfChannel &&
c.hasTalkPower &&
!c.inputMuted &&
c.inputHardwareEnabled &&
!c.away
)
.filter(() => Math.random() < 0.35)
.map((c) => c.id);
this.emit({ type: "talkers", clients: audible });
this.after(1200 + Math.random() * 2300, () => this.scriptTalkers());
}
/** One random server event every few seconds: visitors join, switch
* channels and leave, people write in the channel or send you a PM. */
private scriptServerLife() {
const roll = Math.random();
const freeNames = DEMO_VISITOR_NAMES.filter((n) => !this.visitors.some((v) => v.name === n));
if (roll < 0.3 && this.visitors.length < 6 && freeNames.length > 0) {
const id = this.nextVisitorId++;
const visitor: DemoClient = {
id,
channel: pick(DEMO_CHANNELS.filter((c) => c.id !== 3 && !c.hasPassword)).id,
name: pick(freeNames),
inputMuted: Math.random() < 0.15,
outputMuted: Math.random() < 0.1,
inputHardwareEnabled: true,
away: false,
awayMessage: "",
isChannelCommander: false,
country: pick(DEMO_COUNTRIES),
uid: `demo-uid-visitor-${id}`,
databaseId: id,
channelGroup: 3,
serverGroups: [pick([3, 4, 4])],
hasTalkPower: true,
};
this.visitors.push(visitor);
this.emit({ type: "serverLog", kind: "clientJoin", client: visitor.name, channel: this.channelName(visitor.channel) });
this.sendChannels(this.lastNickname);
} else if (roll < 0.37 && this.visitors.length > 0) {
const visitor = pick(this.visitors);
this.visitors = this.visitors.filter((v) => v !== visitor);
this.emit({ type: "serverLog", kind: "clientLeave", client: visitor.name });
this.sendChannels(this.lastNickname);
} else if (roll < 0.72) {
// Anyone wanders, not just visitors - otherwise the tree looks frozen.
const visitor = pick(this.npcs());
const target = pick(DEMO_CHANNELS.filter((c) => c.id !== visitor.channel));
this.emit({
type: "serverLog",
kind: "clientChannelSwitch",
client: visitor.name,
fromChannel: this.channelName(visitor.channel),
toChannel: target.name,
});
visitor.channel = target.id;
visitor.away = target.id === 3;
this.sendChannels(this.lastNickname);
} else if (roll < 0.92) {
const here = this.npcs().filter((c) => c.channel === this.selfChannel && !c.away);
if (here.length > 0) this.emit({ type: "chatMessage", from: pick(here).name, message: pick(DEMO_CHAT_LINES) });
} else {
const sender = pick(this.npcs().filter((c) => !c.away));
if (sender) {
this.emit({
type: "privateMessage",
partnerId: sender.id,
partnerName: sender.name,
message: pick(DEMO_PM_LINES),
fromSelf: false,
});
}
}
this.after(4000 + Math.random() * 6000, () => this.scriptServerLife());
}
private sendChannels(nickname: string) {
this.lastNickname = nickname;
const self: DemoClient = {
@@ -638,10 +772,10 @@ export class DemoSocket {
this.emit({
type: "channels",
channels: DEMO_CHANNELS,
clients: [self, ...DEMO_NPCS],
clients: [self, ...this.npcs()],
ownClientId: SELF_ID,
serverMaxClients: 32,
serverClientsOnline: 1 + DEMO_NPCS.length,
serverClientsOnline: 1 + this.npcs().length,
serverChannelsOnline: DEMO_CHANNELS.length,
});
}
+5 -2
View File
@@ -4,8 +4,9 @@ import de from "./locales/de.json";
import en from "./locales/en.json";
import zhCN from "./locales/zh-CN.json";
import fa from "./locales/fa.json";
import csCZ from "./locales/cs-CZ.json";
export type Lang = "de" | "en" | "zh-CN" | "fa";
export type Lang = "de" | "en" | "zh-CN" | "fa" | "cs-CZ";
const RTL_LANGS = new Set<Lang>(["fa"]);
export type LangPref = "auto" | Lang;
@@ -22,6 +23,7 @@ const translations: Record<Lang, Record<string, string>> = {
en,
"zh-CN": zhCN,
fa,
"cs-CZ": csCZ,
};
function detectSystemLang(): Lang {
@@ -29,6 +31,7 @@ function detectSystemLang(): Lang {
const normalized = nav?.toLowerCase() ?? "en";
if (normalized.startsWith("zh")) return "zh-CN";
if (normalized.startsWith("fa")) return "fa";
if (normalized.startsWith("cs")) return "cs-CZ";
return normalized.startsWith("de") ? "de" : "en";
}
@@ -38,7 +41,7 @@ export function resolveLang(pref: LangPref): Lang {
export function loadLangPref(): LangPref {
const raw = localStorage.getItem(LANGUAGE_KEY);
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "auto" ? raw : "auto";
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "cs-CZ" || raw === "auto" ? raw : "auto";
}
export function saveLangPref(pref: LangPref) {
+281
View File
@@ -0,0 +1,281 @@
import { Fragment, type ReactNode } from "react";
// TeamSpeak chat text -> React elements (never HTML strings, so message text
// can't inject markup). Understands the TS3/TS6 BBCode tags plus the basic
// Markdown TS6 sends: Markdown is first rewritten into BBCode, then a single
// parser renders both. Unknown tags stay literal, unclosed tags close at the end.
// ponytail: no [table], nested Markdown lists/quotes, ==highlight==, ||spoiler||,
// math or mermaid - add them once people actually send them.
const TAG_REGEX =
/\[(\/?)(b|i|u|s|url|img|color|size|left|center|right|list|\*|hr|noparse|md-code|md-quote|md-h)(?:=([^\]]*))?\]/gi;
const BLOCK_TAGS = new Set(["left", "center", "right", "list", "*", "hr", "md-quote", "md-h"]);
export const BARE_URL_REGEX = /https?:\/\/[^\s<>"\[\]]+/g;
const COLOR_REGEX = /^(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z]+)$/i;
const LIST_STYLES: Record<string, string> = { "1": "decimal", a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" };
// Spans Markdown must not touch: noparse, tagged links, inline code, Markdown
// links/images, <autolinks>, bare URLs and backslash escapes.
const MD_SPANS = new RegExp(
[
String.raw`\[noparse\][\s\S]*?\[\/noparse\]`,
String.raw`\[(url|img)(?:=[^\]]*)?\][\s\S]*?\[\/\1\]`,
String.raw`\x60([^\x60\n]+)\x60`,
String.raw`(!?)\[([^\]\n]*)\]\(<?(https?:\/\/[^\s)>]+)>?(?:\s[^)\n]*)?\)`,
String.raw`<(https?:\/\/[^\s>]+)>`,
BARE_URL_REGEX.source,
String.raw`\\([\\\x60*_{}\[\]()#+\-.!~>|=])`,
].join("|"),
"gi",
);
// Outgoing: an already-tagged link or Markdown span (left alone) or a bare URL (wrapped).
const WRAP_REGEX = new RegExp(
String.raw`(\[(url|img)(?:=[^\]]*)?\][\s\S]*?\[\/\2\]|!?\[[^\]\n]*\]\([^)\n]*\)|\x60[^\x60\n]*\x60|<https?:\/\/[^\s>]+>)|` +
BARE_URL_REGEX.source,
"gi",
);
interface Node {
tag: string;
arg?: string;
children: (Node | string)[];
}
export interface RenderOptions {
/** Load [img] / ![](...) inline. Off: they render as links, so no remote host sees the reader's IP. */
images?: boolean;
}
function emphasis(s: string): string {
return s
.replace(/\*\*(?=\S)([^\n]*?\S)\*\*/g, "[b]$1[/b]")
.replace(/~~(?=\S)([^\n]*?\S)~~/g, "[s]$1[/s]")
.replace(/\+\+(?=\S)([^\n]*?\S)\+\+/g, "[u]$1[/u]")
.replace(/(^|[^\w*[])\*(?=[^\s\]])([^*\n]*?\S)\*(?![\w*])/g, "$1[i]$2[/i]")
.replace(/(^|[^\w_[])_(?=[^\s\]])([^_\n]*?\S)_(?![\w_])/g, "$1[i]$2[/i]");
}
function markdownInline(text: string): string {
let out = "";
let last = 0;
for (const m of text.matchAll(MD_SPANS)) {
out += emphasis(text.slice(last, m.index));
last = m.index + m[0].length;
if (m[2] !== undefined) out += `[md-code][noparse]${m[2]}[/noparse][/md-code]`;
else if (m[5] !== undefined) out += m[3] ? `[img]${m[5]}[/img]` : `[url=${m[5]}]${m[4] || m[5]}[/url]`;
else if (m[6] !== undefined) out += m[6];
else if (m[7] !== undefined) out += `[noparse]${m[7]}[/noparse]`;
else out += m[0];
}
return out + emphasis(text.slice(last));
}
// Line-based Markdown blocks (TS6: one line is one paragraph): lists, quotes,
// headings and rules. Consecutive list/quote lines are grouped.
function markdownBlocks(text: string): string {
const out: { block: boolean; s: string }[] = [];
let group = null as { kind: string; items: string[] } | null;
const flush = () => {
if (!group) return;
const s =
group.kind === "quote"
? `[md-quote]${group.items.join("\n")}[/md-quote]`
: `[list${group.kind === "ol" ? "=1" : ""}]${group.items.map((i) => `[*]${i}`).join("")}[/list]`;
out.push({ block: true, s });
group = null;
};
for (const line of text.split("\n")) {
const item = /^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(line);
const quote = /^>(?:\s(.*))?$/.exec(line);
const kind = item ? (/\d/.test(item[1]) ? "ol" : "ul") : quote ? "quote" : null;
if (kind) {
if (group?.kind !== kind) flush();
group ??= { kind, items: [] };
group.items.push(item ? item[2] : (quote![1] ?? ""));
continue;
}
flush();
const heading = /^(#{1,3})\s+(.+)$/.exec(line);
if (/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(line)) out.push({ block: true, s: "[hr]" });
else if (heading) out.push({ block: true, s: `[md-h=${heading[1].length}]${heading[2]}[/md-h]` });
else out.push({ block: false, s: line });
}
flush();
return out.map((e, i) => (i > 0 && !e.block && !out[i - 1].block ? "\n" : "") + e.s).join("");
}
function parse(text: string): Node {
const root: Node = { tag: "", children: [] };
const stack = [root];
const re = new RegExp(TAG_REGEX.source, "gi");
let last = 0;
for (let m; (m = re.exec(text)); ) {
const top = stack[stack.length - 1];
if (m.index > last) top.children.push(text.slice(last, m.index));
last = re.lastIndex;
const tag = m[2].toLowerCase();
if (m[1]) {
const at = stack.findLastIndex((n) => n.tag === tag);
if (at > 0) stack.length = at;
else top.children.push(m[0]);
} else if (tag === "noparse") {
const end = text.toLowerCase().indexOf("[/noparse]", last);
const stop = end < 0 ? text.length : end;
top.children.push({ tag, children: [text.slice(last, stop)] });
last = re.lastIndex = end < 0 ? stop : end + "[/noparse]".length;
} else if (tag === "hr") {
top.children.push({ tag, children: [] });
} else if (tag === "*") {
const at = stack.findLastIndex((n) => n.tag === "list");
if (at > 0) {
stack.length = at + 1;
const li: Node = { tag, children: [] };
stack[at].children.push(li);
stack.push(li);
} else top.children.push(m[0]);
} else {
const node: Node = { tag, arg: m[3], children: [] };
top.children.push(node);
stack.push(node);
}
}
if (last < text.length) stack[stack.length - 1].children.push(text.slice(last));
return root;
}
function safeHref(raw: string): string | null {
const url = raw.trim();
return /^https?:\/\//i.test(url) ? url : /^www\./i.test(url) ? `https://${url}` : null;
}
function link(href: string, children: ReactNode, key: number) {
return (
<a key={key} href={href} target="_blank" rel="noopener noreferrer">
{children}
</a>
);
}
function textNode(text: string, key: number, linkUrls = true): ReactNode {
const parts: ReactNode[] = [];
text.split("\n").forEach((line, li) => {
if (li > 0) parts.push(<br key={`br${li}`} />);
let last = 0;
if (linkUrls) {
for (const m of line.matchAll(BARE_URL_REGEX)) {
if (m.index > last) parts.push(line.slice(last, m.index));
parts.push(link(m[0], m[0], li * 10000 + m.index));
last = m.index + m[0].length;
}
}
if (last < line.length) parts.push(line.slice(last));
});
return parts.length === 1 && typeof parts[0] === "string" ? parts[0] : <Fragment key={key}>{parts}</Fragment>;
}
function textOf(node: Node): string {
return node.children.map((c) => (typeof c === "string" ? c : textOf(c))).join("");
}
function fontSize(arg: string | undefined): string | undefined {
const rel = /^([+-])(\d)$/.exec(arg ?? "");
if (rel) return `${Math.min(2, Math.max(0.6, 1 + (rel[1] === "+" ? 1 : -1) * Number(rel[2]) * 0.2))}em`;
return /^\d{1,3}$/.test(arg ?? "") ? `${Math.min(28, Math.max(6, Number(arg)))}pt` : undefined;
}
function render(node: Node, key: number, opts: RenderOptions): ReactNode {
const isBlock = (c: Node | string | undefined) => typeof c === "object" && BLOCK_TAGS.has(c.tag);
const kids = () =>
node.children.map((c, i, all) => {
if (typeof c !== "string") return render(c, i, opts);
// Line breaks around block elements are already breaks; drop them.
let s = c;
if (i === 0 ? isBlock(node) : isBlock(all[i - 1])) s = s.replace(/^\n/, "");
if (i === all.length - 1 ? isBlock(node) : isBlock(all[i + 1])) s = s.replace(/\n$/, "");
if (node.tag === "list" && !s.trim()) return null;
return textNode(s, i);
});
switch (node.tag) {
case "b":
return <strong key={key}>{kids()}</strong>;
case "i":
return <em key={key}>{kids()}</em>;
case "u":
return <u key={key}>{kids()}</u>;
case "s":
return <s key={key}>{kids()}</s>;
case "color":
return (
<span key={key} style={node.arg && COLOR_REGEX.test(node.arg) ? { color: node.arg } : undefined}>
{kids()}
</span>
);
case "size":
return (
<span key={key} style={{ fontSize: fontSize(node.arg) }}>
{kids()}
</span>
);
case "left":
case "center":
case "right":
return (
<div key={key} style={{ textAlign: node.tag }}>
{kids()}
</div>
);
case "list": {
const style = node.arg ? LIST_STYLES[node.arg] : undefined;
return style ? (
<ol key={key} className="ts-bb-list" style={{ listStyleType: style }}>
{kids()}
</ol>
) : (
<ul key={key} className="ts-bb-list">
{kids()}
</ul>
);
}
case "*":
return <li key={key}>{kids()}</li>;
case "hr":
return <hr key={key} className="ts-bb-hr" />;
case "noparse":
return textNode(textOf(node), key, false);
case "md-code":
return <code key={key}>{kids()}</code>;
case "md-quote":
return (
<blockquote key={key} className="ts-bb-quote">
{kids()}
</blockquote>
);
case "md-h":
return (
<div key={key} className={`ts-bb-h ts-bb-h${node.arg}`}>
{kids()}
</div>
);
case "url":
case "img": {
const href = safeHref(node.arg ?? textOf(node));
// Plain-text label: a linkified URL or nested tag inside <a> would nest links.
const label = textOf(node);
if (!href) return <span key={key}>{label}</span>;
if (node.tag === "img" && opts.images)
return link(href, <img className="ts-bb-img" src={href} alt="" loading="lazy" referrerPolicy="no-referrer" />, key);
return link(href, label, key);
}
default:
return <Fragment key={key}>{kids()}</Fragment>;
}
}
export function renderBbcode(text: string, opts: RenderOptions = {}): ReactNode {
return render(parse(markdownInline(markdownBlocks(text.replace(/\r\n?/g, "\n")))), 0, opts);
}
// Outgoing: native clients send links as [URL]...[/URL] and only link those.
export function wrapUrls(text: string): string {
return text.replace(WRAP_REGEX, (m, kept) => (kept ? m : `[URL]${m}[/URL]`));
}
+677
View File
@@ -0,0 +1,677 @@
{
"menu.connections": "Připojení",
"menu.connections.connect": "Připojit",
"menu.connections.disconnectCurrent": "Odpojit od aktuálního serveru",
"menu.connections.disconnectAll": "Odpojit od všech serverů",
"menu.favorites": "Záložky",
"menu.favorites.add": "Přidat záložku",
"menu.favorites.manage": "Spravovat záložky",
"menu.self": "Já",
"menu.rights": "Oprávnění",
"menu.rights.serverGroups": "Upravit skupiny serveru...",
"menu.rights.channelGroups": "Upravit skupiny kanálů...",
"menu.rights.serverPermissions": "Upravit oprávnění serveru...",
"menu.rights.channelPermissions": "Upravit oprávnění kanálu...",
"menu.rights.overview": "Přehled oprávnění...",
"menu.rights.myRights": "Zobrazit moje oprávnění",
"menu.extras": "Nástroje",
"menu.help": "Nápověda",
"menu.help.about": "O WebSpeak3",
"menu.help.github": "GitHub",
"menu.help.changelog": "Seznam změn",
"menu.help.translate": "Pomozte s překladem (Weblate)",
"menu.extras.identities": "Identity",
"menu.extras.contacts": "Kontakty",
"menu.extras.collectedUrls": "Shromážděné URL",
"menu.extras.inviteFriend": "Pozvat přítele",
"menu.extras.whisperLists": "Seznamy šeptání",
"menu.extras.whisperHistory": "Historie šeptání",
"menu.extras.clientLog": "Protokol klienta",
"menu.extras.banList": "Seznam zákazů",
"menu.extras.complaintList": "Seznam stížností",
"menu.extras.offlineMessages": "Offline zprávy",
"menu.extras.serverQueryLogin": "Přihlášení ServerQuery",
"menu.extras.serverLog": "Protokol serveru",
"menu.extras.startRecording": "Spustit nahrávání",
"menu.extras.startMultitrackRecording": "Spustit vícestopé nahrávání",
"menu.extras.stopRecording": "Zastavit nahrávání",
"menu.extras.options": "Možnosti",
"menu.extras.feedback": "Odeslat zpětnou vazbu",
"feedback.fab.nudge": "Co si myslíte o WebSpeak3? Vaše zpětná vazba je vítána!",
"donate.label": "Přispět",
"donate.title": "Podpořit WebSpeak3 na Ko-fi",
"pwa.updateAvailable": "Je k dispozici nová verze",
"pwa.reload": "Načíst znovu",
"feedback.dialog.title": "Zpětná vazba",
"feedback.dialog.intro": "Report bug or share idea to help improve WebSpeak3.",
"feedback.dialog.category": "Kategorie",
"feedback.dialog.category.bug": "Chyba",
"feedback.dialog.category.idea": "Nápad",
"feedback.dialog.category.report": "Nahlášení (porušení pravidel/zneužití)",
"feedback.dialog.category.other": "Jiné",
"feedback.dialog.reportHint": "Nahlášení zůstávají soukromá a nikdy nejsou zveřejněna jako problém na GitHubu. Klidně uveďte dotčený server.",
"feedback.dialog.message": "Zpráva",
"feedback.dialog.messagePlaceholder": "Co se stalo nebo co navrhujete?",
"feedback.dialog.email": "E-mail (volitelné, pro další kontakt – zůstává soukromý a nikdy není zveřejněn)",
"feedback.dialog.publishAsIssue": "Publikovat jako veřejný problém na GitHubu",
"feedback.dialog.publishAsIssueHint": "Ponechte nezaškrtnuté, pokud chcete, aby vaše zpětná vazba zůstala soukromá a viditelná pouze správci.",
"feedback.dialog.publishAsIssueHintBug": "Hlášení chyb jsou vždy zveřejněna jako veřejný problém na GitHubu.",
"feedback.dialog.send": "Odeslat",
"restartNotice.title": "Krátké přerušení",
"restartNotice.body": "Server se za chvíli krátce restartuje. Vaše připojení bude na okamžik přerušeno.",
"restartNotice.ack": "Rozumím",
"menu.extras.tos": "Podmínky používání",
"tos.title": "Podmínky používání pro client.webspeak3.de",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via browser.",
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting service, and circumventing bans.",
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to relevant authorities.",
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see",
"tos.rule4Post": ".",
"tos.privacyLinkText": "zásady ochrany soukromí",
"tos.rule5Pre": "For abuse or complaints: see",
"tos.rule5Post": ".",
"tos.legalLinkText": "právní informace (Impressum)",
"tos.rule6": "By clicking \"Accept\" you agree to these terms. Your acceptance is stored only locally in your browser; you'll be asked again if rules change.",
"tos.accept": "Přijmout",
"tos.close": "Zavřít",
"feedback.dialog.cancel": "Zrušit",
"feedback.dialog.sending": "Odesílání…",
"feedback.dialog.success": "Děkujeme za zpětnou vazbu!",
"feedback.dialog.successWithIssue": "Děkujeme! Byl vytvořen problém:",
"feedback.dialog.error": "Odeslání se nezdařilo. Zkuste to prosím později.",
"toolbar.setAway": "Nastavit stav nepřítomen",
"toolbar.backOnline": "Zpět online",
"toolbar.awayOptions": "Možnosti nepřítomnosti",
"toolbar.whisper": "Cíle šeptání",
"whisper.channels": "Kanály",
"whisper.clients": "Klienti",
"whisper.clearAll": "Vymazat všechny cíle šeptání",
"toolbar.micEnable": "Zapnout mikrofon",
"toolbar.micMute": "Ztlumit mikrofon",
"toolbar.micUnmute": "Zrušit ztlumení mikrofonu",
"toolbar.vadSensitivity": "Citlivost aktivace hlasem",
"tabAudio.start": "Sdílet zvuk karty nebo okna do hlasového kanálu (sluchátka zabrání ozvěně)",
"tabAudio.stop": "Zastavit sdílení zvuku",
"tabAudio.noAudio": "Nebyl sdílen žádný zvuk. Ve výběru zvolte kartu nebo okno a zapněte jeho zvuk.",
"tabAudio.silent": "Ze sdíleného zvuku už 5 sekund nic nepřišlo. Systémový zvuk nefunguje na každém počítači s Windows; místo toho sdílejte kartu prohlížeče (např. Spotify na webu nebo YouTube) se zapnutou volbou „Sdílet zvuk karty“.",
"toolbar.muteSound": "Ztlumit zvuk (ohluchit)",
"toolbar.unmuteSound": "Zrušit ztlumení zvuku (odhluchit)",
"toolbar.chooseOutputDevice": "Vybrat výstupní zařízení",
"toolbar.toggleTheme": "Přepnout motiv",
"away.setGlobal": "Nastavit globální stav nepřítomen",
"away.setGlobalStatus": "Nastavit globální stav nepřítomnosti",
"connect.title": "Připojit",
"connect.novaSubtitle": "WebSpeak3 běží celý v prohlížeči — není potřeba nic stahovat",
"connect.serverAddress": "Přezdívka nebo adresa serveru:",
"connect.serverPassword": "Heslo serveru:",
"connect.nickname": "Přezdívka:",
"connect.phoneticNickname": "Fonetická přezdívka:",
"connect.identity": "Identita:",
"connect.defaultChannel": "Výchozí kanál:",
"connect.recordingProfile": "Profil snímání:",
"connect.channelPassword": "Heslo kanálu:",
"connect.playbackProfile": "Profil přehrávání:",
"connect.onetimeGrant": "Jednorázový klíč oprávnění:",
"connect.serverType": "Typ serveru:",
"connect.serverType.auto": "Automaticky",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.hotkeyProfile": "Profil klávesových zkratek:",
"connect.soundPack": "Balíček zvuků:",
"connect.more": "Více",
"connect.less": "Méně",
"connect.connect": "Připojit",
"connect.connecting": "Připojování…",
"connect.newTab": "V nové kartě",
"connect.cancel": "Zrušit",
"channelPasswordDialog.title": "Je vyžadováno heslo kanálu",
"channelPasswordDialog.prompt": "Tento kanál je chráněný heslem. Zadejte prosím heslo:",
"channelPasswordDialog.wrongPassword": "Nesprávné heslo, zkuste to prosím znovu:",
"channelPasswordDialog.submit": "Připojit se",
"channelPasswordDialog.cancel": "Zrušit",
"collectedUrls.title": "Shromážděné URL",
"collectedUrls.search": "Hledat:",
"collectedUrls.url": "URL",
"collectedUrls.count": "Počet",
"collectedUrls.lastSeen": "Naposledy zmíněno",
"collectedUrls.mentionedBy": "Zmínil",
"collectedUrls.clearList": "Vymazat seznam",
"inviteFriend.title": "Pozvat přítele",
"inviteFriend.type": "Typ pozvánky",
"inviteFriend.includeChannel": "Vložit aktuální kanál",
"inviteFriend.link": "Odkaz",
"inviteFriend.addPermissionKey": "Přidat klíč oprávnění",
"inviteFriend.copyToClipboard": "Kopírovat do schránky",
"inviteFriend.copied": "Zkopírováno!",
"clientLog.title": "Protokol klienta",
"clientLog.level.critical": "Kritické",
"clientLog.level.error": "Chyby",
"clientLog.level.warning": "Varování",
"clientLog.level.info": "Informace",
"clientLog.level.debug": "Ladění",
"clientLog.search": "Hledat:",
"clientLog.filter": "Filtr:",
"clientLog.caseSensitive": "Rozlišovat velká a malá písmena",
"clientLog.mark": "Označit",
"whisperHistory.title": "Historie šeptání – {server}",
"whisperHistory.empty": "Zatím žádná historie šeptání.",
"whisperHistory.started": "Šeptání pro: {targets}",
"whisperHistory.stopped": "Šeptání zastaveno",
"whisperHistory.clear": "Vymazat",
"whisperHistory.options": "Možnosti",
"whisperLists.title": "Seznamy šeptání",
"whisperLists.namePlaceholder": "Název seznamu",
"whisperLists.saveCurrent": "Uložit aktuální výběr",
"whisperLists.itemDetail": "{channels} kanálů, {clients} klientů",
"whisperLists.activate": "Aktivovat",
"whisperLists.delete": "Smazat",
"whisperLists.empty": "Zatím nejsou uloženy žádné seznamy šeptání. Vyberte cíle šeptání a uložte je zde jako seznam.",
"identities.title": "Identity",
"identities.activate": "Aktivovat",
"identities.add": "Nová identita",
"identities.delete": "Smazat",
"identities.newName": "Nová identita",
"identities.generated": "Vygenerována",
"identities.pending": "Vygeneruje se při příštím připojení",
"identities.listLabel": "Lokální identity",
"identities.name": "Název identity:",
"identities.phoneticNickname": "Fonetická přezdívka:",
"identities.uniqueId": "Jedinečné ID:",
"identities.unknown": "Neznámé",
"identities.setDefault": "Nastavit jako výchozí",
"identities.isDefault": "Aktuálně používána jako výchozí",
"identities.export": "Exportovat",
"identities.import": "Importovat",
"connectionInfo.clientTitle": "Informace o připojení – {name}",
"connectionInfo.serverTitle": "Informace o připojení k serveru",
"connectionInfo.loading": "Načítání…",
"connectionInfo.unavailable": "Server neodpovídá (chybí oprávnění?).",
"connectionInfo.ping": "Ping:",
"connectionInfo.connectedSince": "Připojeno od:",
"connectionInfo.uptime": "Doba běhu:",
"connectionInfo.name": "Název:",
"connectionInfo.avgPing": "Průměrný ping:",
"connectionInfo.avgPacketLoss": "Průměrná ztráta paketů:",
"connectionInfo.incoming": "Příchozí",
"connectionInfo.outgoing": "Odchozí",
"connectionInfo.packetsTransferred": "Přenesené pakety",
"connectionInfo.bytesTransferred": "Přenesené bajty",
"connectionInfo.bandwidthLastSecond": "Přenosová rychlost za poslední sekundu",
"connectionInfo.bandwidthLastMinute": "Přenosová rychlost za poslední minutu",
"connectionInfo.ftBandwidth": "Přenosová rychlost souborů",
"connectionInfo.ftBytes": "Bajty přenosu souborů",
"connectionInfo.ip": "IP adresa:",
"connectionInfo.packetLoss": "Ztráta paketů:",
"connectionInfo.packetsSent": "Odeslané pakety:",
"connectionInfo.packetsReceived": "Přijaté pakety:",
"connectionInfo.bytesSent": "Odeslaná data:",
"connectionInfo.bytesReceived": "Přijatá data:",
"connectionInfo.bandwidthSent": "Rychlost odesílání:",
"connectionInfo.bandwidthReceived": "Rychlost přijímání:",
"menu.self.recordingProfile": "Profil nahrávání",
"menu.self.playbackProfile": "Profil přehrávání",
"menu.self.hotkeyProfile": "Profil klávesových zkratek",
"menu.self.soundPack": "Balíček zvuků",
"menu.self.setAway": "Nastavit nepřítomnost",
"menu.self.enableMic": "Zapnout mikrofon",
"menu.self.disableMic": "Vypnout mikrofon",
"menu.self.muteOutput": "Ztlumit reproduktory/sluchátka",
"menu.self.unmuteOutput": "Zrušit ztlumení reproduktorů/sluchátek",
"menu.self.changeNickname": "Změnit přezdívku",
"menu.self.requestTalkPower": "Požádat o možnost mluvit",
"menu.self.setAvatar": "Nastavit avatar",
"menu.self.setPhoneticNickname": "Nastavit fonetickou přezdívku",
"menu.self.connectionInfo": "Připojení Informace",
"contacts.title": "Kontakty",
"contacts.addOnlineClient": "Vybrat online klienta...",
"contacts.add": "Přidat",
"contacts.remove": "Odebrat",
"contacts.empty": "Zatím žádné kontakty.",
"contacts.customName": "Vlastní název:",
"contacts.category.acquaintance": "Známý",
"contacts.category.blocked": "Blokovaný",
"contacts.category.friend": "Přítel",
"contacts.phoneticName": "Fonetické jméno:",
"contacts.show": "Zobrazit",
"contacts.ignore": "Ignorovat",
"contacts.unignore": "Přestat ignorovat",
"contacts.whisper": "Šeptat",
"contacts.preferences": "Předvolby",
"favorites.title": "🔖 Záložky myTeamSpeak",
"favorites.synced": "Synchronizované záložky",
"favorites.notLoggedIn": "Nepřihlášen",
"favorites.local": "Lokální záložky",
"favorites.unnamed": "(bez názvu)",
"favorites.bookmarkName": "Název záložky:",
"favorites.newFavoriteName": "Nová záložka",
"favorites.showServerQueryClients": "Zobrazit klienty ServerQuery",
"favorites.connectOnStartup": "Připojit při spuštění",
"favorites.new": "Nová záložka",
"favorites.newFolder": "Nová složka",
"favorites.remove": "Odebrat",
"favorites.ok": "OK",
"favorites.cancel": "Zrušit",
"favorites.apply": "Použít",
"away.dialog.title": "Nastavit zprávu při nepřítomnosti",
"away.dialog.message": "Zpráva:",
"away.dialog.template": "Šablona:",
"away.dialog.none": "<Žádná>",
"away.dialog.ok": "OK",
"away.dialog.save": "Uložit",
"away.dialog.cancel": "Zrušit",
"options.title": "Možnosti",
"options.ok": "OK",
"options.cancel": "Zrušit",
"options.notImplemented": "Toto nastavení zatím není implementováno.",
"options.section.anwendung": "Aplikace",
"options.section.wiedergabe": "Přehrávání",
"options.section.aufnahme": "Snímání",
"options.section.design": "Vzhled",
"design.subtitle": "Zvolte vzhled aplikace.",
"design.theme.standard": "Standardní",
"design.theme.standard.desc": "Původní vzhled WebSpeak3.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "Modernější tmavý vzhled se zaoblenými prvky.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Klasické rozvržení klienta GreenTeaSpeak s tmavými panely a zlatou lištou nabídky.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "Technické, ploché rozvržení ve stylu IDE pro pokročilé uživatele.",
"design.status.connected": "Připojeno",
"design.custom.new": "+ Nový vzhled",
"design.custom.import": "Importovat vzhled",
"design.custom.edit": "Upravit",
"design.custom.duplicate": "Duplikovat",
"design.custom.export": "Exportovat",
"design.custom.delete": "Smazat",
"design.custom.deleteConfirm": "Opravdu chcete tento vzhled smazat?",
"design.custom.newTitle": "Vytvořit nový vzhled",
"design.custom.editTitle": "Upravit vzhled",
"design.custom.name": "Název",
"design.custom.base": "Základní rozvržení",
"design.custom.css": "CSS",
"design.custom.hint": "This CSS loads while design is active. Use .ts-app { ... } and 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 layout.",
"design.custom.save": "Uložit",
"design.custom.copyOf": "Kopie {name}",
"design.custom.importError": "This file couldn't be read as WebSpeak3 design.",
"design.store.open": "Obchod",
"design.store.title": "Obchod s vzhledy",
"design.store.back": "Zpět",
"design.store.loading": "Načítání…",
"design.store.unavailable": "Obchod s vzhledy není na tomto serveru dostupný.",
"design.store.empty": "V obchodě zatím nejsou žádné vzhledy.",
"design.store.install": "Nainstalovat",
"design.store.installed": "Nainstalováno",
"design.store.by": "od {author}",
"design.store.screenshotAlt": "Snímek obrazovky {name}",
"design.store.rating.rate": "Ohodnotit {stars} hvězdičkami",
"design.store.rating.summary": "{average} ({count})",
"design.store.rating.none": "Zatím bez hodnocení",
"design.store.publishTitle": "Publikovat vzhled",
"design.store.publish.select": "Vyberte jeden ze svých vzhledů",
"design.store.publish.none": "Zatím nemáte žádný vlastní vzhled k publikování.",
"design.store.publish.author": "Vaše jméno (volitelné)",
"design.store.publish.authorPlaceholder": "Anonymně",
"design.store.publish.description": "Popis (volitelné)",
"design.store.publish.descriptionPlaceholder": "Čím je tento vzhled výjimečný?",
"design.store.publish.screenshot": "Snímek obrazovky (volitelné)",
"design.store.publish.screenshotTooLarge": "Tento obrázek je příliš velký. Použijte prosím menší snímek obrazovky.",
"design.store.publish.adminToken": "Token správce (potřeba pouze pro vyhrazené názvy)",
"design.store.publish.adminTokenPlaceholder": "Nechte prázdné, pokud nevíte, k čemu slouží",
"design.store.publish.submit": "Publikovat do obchodu",
"design.store.publish.success": "Vzhled byl publikován!",
"design.store.publish.pending": "Děkujeme! Váš vzhled byl odeslán a po kontrole se objeví v obchodě.",
"design.store.publish.error": "Publikování se nezdařilo.",
"options.section.erweiterungen": "Doplňky",
"options.section.hotkeys": "Klávesové zkratky",
"options.section.whispern": "Šeptat",
"options.section.downloads": "Stažené soubory",
"options.section.chat": "Chat",
"options.section.sicherheit": "Zabezpečení",
"options.section.nachrichten": "Zprávy",
"options.section.meldungen": "Oznámení",
"options.section.sounds": "Zvuky",
"app.title": "Aplikace",
"app.subtitle": "Obecná nastavení aplikace",
"app.language": "Jazyk",
"app.language.auto": "Výchozí systému",
"app.language.de": "Němčina",
"app.language.en": "Angličtina",
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Missing your language or spotted wrong translation? Help out on Weblate →",
"app.serverBanner": "Zobrazovat bannery serveru",
"app.serverBanner.hint": "Banner se načítá přímo z adresy nastavené administrátorem serveru a tento hostitel vidí vaši IP adresu.",
"app.chatImages": "Načítat obrázky v chatu",
"app.chatImages.hint": "Obrázky z tagů [img] a Markdownu se načítají přímo z adresy, kterou zvolil odesílatel, a tento hostitel vidí vaši IP adresu. Po vypnutí se zobrazí jako odkazy.",
"playback.title": "Přehrávání",
"playback.subtitle": "Změnit nastavení přehrávání",
"playback.profile": "Profil",
"playback.default": "Výchozí",
"playback.device": "Výstupní zařízení:",
"playback.systemDefault": "Výchozí systému",
"playback.quiet": "Tiché",
"playback.loud": "Hlasité",
"playback.voiceVolume": "Hlasitost hlasu",
"playback.playTestTone": "▶ Přehrát testovací zvuk",
"playback.options": "Možnosti",
"playback.autoVolume": "Automatická úprava hlasitosti",
"playback.ownMicClicks": "Přehrávat zvuky mikrofonu vlastního klienta",
"playback.otherMicClicks": "Přehrávat zvuky mikrofonu ostatních klientů",
"recording.title": "Snímání",
"recording.subtitle": "Změnit nastavení snímání",
"recording.device": "Vstupní zařízení:",
"recording.activation": "Aktivace",
"recording.pushToTalk": "Stiskni a mluv",
"recording.continuous": "Nepřetržitý přenos",
"recording.voiceActivation": "Detekce aktivace hlasem",
"recording.testStart": "Spustit test",
"recording.testStop": "Zastavit test",
"recording.hangoverDelay": "Zpoždění před deaktivací:",
"recording.secondsUnit": "s",
"recording.dsp": "Digitální zpracování signálu",
"recording.typingAttenuation": "Útlum při psaní",
"recording.echoCancellation": "Potlačení ozvěny",
"recording.noiseSuppression": "Odstranit hluk na pozadí",
"recording.autoGainControl": "Automatické řízení zesílení",
"recording.aec3": "Pokročilé potlačení ozvěny (beta, vyšší zatížení CPU)",
"info.address": "Adresa:",
"info.version": "Verze:",
"info.license": "Licence:",
"info.currentClients": "Aktuální klienti:",
"info.currentChannels": "Aktuální kanály:",
"info.topic": "Téma:",
"info.audioCodec": "Zvukový kodek:",
"info.spacer": "Oddělovač:",
"info.rawName": "Surový název:",
"info.passwordProtected": "Chráněno heslem:",
"info.clients": "Klienti:",
"info.country": "Země:",
"info.muted": "Mikrofon ztlumen:",
"info.outputMuted": "Reproduktory ztlumeny:",
"info.serverGroups": "Skupiny serveru:",
"info.yes": "Ano",
"info.no": "Ne",
"tree.noMatches": "Žádné výsledky",
"tree.search": "Hledat kanály a uživatele",
"tree.label": "Kanály",
"tree.notConnected": "Nepřipojeno",
"tree.clickToSelect": "Kliknutím vyberete, dvojklikem se připojíte",
"tree.clickToJoin": "Dvojklikem se připojíte",
"tree.joinNotConnected": "Nepřipojeno — nelze přepnout kanál",
"tree.passwordProtected": "Chráněno heslem",
"tree.privateChatWith": "Soukromý chat s",
"tree.poke": "Šťouchnout",
"tree.channelCommander": "Velitel kanálu",
"tree.away": "Nepřítomen",
"tree.micMuted": "Mikrofon ztlumen",
"tree.talking": "Mluví",
"tree.noTalkPower": "V tomto kanálu nemáte právo mluvit",
"tree.soundMuted": "Zvuk ztlumen (ohluchnutí)",
"tree.streaming": "Vysílá stream",
"publish.alpha": "Alfa",
"publish.alphaTitle": "Alfa – nestabilní, může se kdykoli změnit nebo přestat fungovat",
"publish.demoUnavailable": "Streamování není v demu dostupné – vyžaduje skutečný server TeamSpeak 6.",
"publish.alphaNote": "Streamování je ve fázi alfa. Používá nezdokumentovaný protokol Stream/Call služby TeamSpeak 6, takže připojení, kvalita obrazu i práce s diváky mohou selhat nebo se bez upozornění změnit. Není určeno pro produkční použití.",
"publish.start": "Sdílet obrazovku",
"publish.stop": "Zastavit sdílení",
"publish.title": "Vaše vysílání",
"publish.screen": "Obrazovka",
"publish.starting": "Spouštění…",
"publish.viewers": "Sleduje {count} diváků",
"publish.request.allow": "Povolit",
"publish.request.deny": "Odmítnout",
"publish.request.block": "Blokovat",
"publish.request.blockHint": "Odmítnout a už se neptat",
"publish.dialog.title": "Nastavení streamu",
"publish.dialog.basic": "Základní nastavení",
"publish.dialog.advanced": "Pokročilé nastavení",
"publish.dialog.golive": "Spustit vysílání",
"publish.dialog.cancel": "Zpět",
"publish.preset": "Předvolba",
"publish.preset.presentation": "Prezentace",
"publish.audio": "Snímat zvuk",
"publish.privacy": "Soukromí",
"publish.privacy.public": "Veřejné",
"publish.privacy.contacts": "Kontakty",
"publish.privacy.private": "Soukromé",
"publish.resolution": "Rozlišení",
"publish.res.source": "Zdroj",
"publish.fps": "FPS",
"publish.bitrate": "Datový tok",
"publish.audioBitrate": "Datový tok zvuku [Kbps]",
"publish.viewerLimit": "Limit diváků",
"publish.mode": "Režim připojení",
"publish.mode.p2p": "P2P",
"publish.mode.server": "Server",
"publish.mode.serverUnavailable": "Režim serveru používá SFU služby TS6 a zatím není implementován.",
"stream.untitled": "Stream",
"stream.stop": "Zavřít stream",
"stream.live": "Živě",
"stream.state.new": "Čekání na nabídku…",
"stream.state.connecting": "Připojování…",
"stream.state.connected": "Živě",
"stream.state.disconnected": "Připojení přerušeno",
"stream.state.failed": "Připojení selhalo",
"stream.state.closed": "Ukončeno",
"chat.server": "Server",
"chat.channel": "Kanál",
"chat.notConnected": "Nepřipojeno",
"chat.messageChannel": "Napsat zprávu do kanálu...",
"chat.messageServer": "Napsat zprávu serveru...",
"chat.messagePartner": "Napsat zprávu uživateli {name}...",
"chat.send": "Odeslat",
"chat.you": "Vy",
"serverLog.clientJoin": "{client} vstoupil do kanálu „{channel}“",
"serverLog.clientLeave": "{client} se odpojil (odešel)",
"serverLog.clientChannelSwitch": "{client} se přesunul z kanálu „{fromChannel}“ do „{toChannel}“",
"serverLog.clientChannelGroupAssigned": "Skupina kanálu „{group}“ byla přiřazena uživateli {client}",
"serverLog.channelCreated": "Kanál „{channel}“ byl vytvořen",
"serverLog.channelDeleted": "Kanál „{channel}“ byl smazán",
"serverLog.channelEdited": "Kanál „{channel}“ byl upraven",
"serverLog.serverEdited": "Nastavení serveru byla změněna",
"serverLog.permissionError": "Chybí oprávnění: {action}",
"poke.title": "Šťouchnout",
"poke.optionalMessage": "Volitelná zpráva...",
"poke.send": "Šťouchnout",
"poke.cancel": "Zrušit",
"poke.pokedYou": "vás šťouchnul",
"poke.dismiss": "Zavřít",
"kick.title": "Vykopnout:",
"kick.reasonPlaceholder": "Důvod (volitelné)...",
"kick.confirm": "Vykopnout",
"kick.cancel": "Zrušit",
"ban.title": "Zabanovat:",
"ban.reasonPlaceholder": "Důvod (volitelné)...",
"ban.duration": "Doba trvání:",
"ban.durationPermanent": "Trvale",
"ban.duration1h": "1 hodina",
"ban.duration1d": "1 den",
"ban.duration1w": "1 týden",
"ban.confirm": "Zabanovat",
"ban.cancel": "Zrušit",
"serverEdit.title": "Upravit virtuální server",
"serverEdit.tab.host": "Hostitel",
"serverEdit.tab.misc": "Ostatní",
"serverEdit.tab.transmission": "Přenos",
"serverEdit.tab.antiflood": "Ochrana proti zahlcení",
"serverEdit.tab.security": "Zabezpečení",
"serverEdit.tab.log": "Protokol",
"serverEdit.name": "Název serveru:",
"serverEdit.welcomeMessage": "Uvítací zpráva:",
"serverEdit.clearPassword": "Odstranit heslo serveru",
"serverEdit.newPassword": "Nové heslo serveru:",
"serverEdit.hostmessage": "Zpráva hostitele:",
"serverEdit.hostmessageMode": "Režim zobrazení:",
"serverEdit.hostmessageMode.none": "Nezobrazovat",
"serverEdit.hostmessageMode.log": "Zobrazit v protokolu",
"serverEdit.hostmessageMode.modal": "Zobrazit jako dialog",
"serverEdit.hostmessageMode.modalquit": "Zobrazit jako dialog a odpojit",
"serverEdit.hostbannerUrl": "URL banneru hostitele:",
"serverEdit.hostbannerGfxUrl": "URL obrázku banneru hostitele:",
"serverEdit.hostbannerGfxInterval": "Obnovení banneru (sekundy):",
"serverEdit.hostbannerMode": "Přizpůsobení banneru:",
"serverEdit.hostbannerMode.noadjust": "Neupravovat",
"serverEdit.hostbannerMode.adjustignoreaspect": "Přizpůsobit (ignorovat poměr stran)",
"serverEdit.hostbannerMode.adjustkeepaspect": "Přizpůsobit (zachovat poměr stran)",
"serverEdit.hostbuttonTooltip": "Nápověda tlačítka hostitele:",
"serverEdit.hostbuttonUrl": "URL tlačítka hostitele:",
"serverEdit.hostbuttonGfxUrl": "URL obrázku tlačítka hostitele:",
"serverEdit.maxClients": "Max. počet klientů:",
"serverEdit.nickname": "Přezdívka serveru:",
"serverEdit.phoneticName": "Fonetický název:",
"serverEdit.codecEncryptionMode": "Šifrování hlasu:",
"serverEdit.codecEncryptionMode.perchannel": "Nastavitelné pro každý kanál",
"serverEdit.codecEncryptionMode.forcedoff": "Globálně vypnuto",
"serverEdit.codecEncryptionMode.forcedon": "Globálně zapnuto",
"serverEdit.unchanged": "Ponechat beze změny",
"serverEdit.save": "Uložit",
"serverEdit.cancel": "Zrušit",
"serverProtocolLog.title": "Protokol serveru",
"serverProtocolLog.empty": "Žádné položky protokolu.",
"banList.title": "Seznam zákazů",
"banList.empty": "Nebyly nalezeny žádné zákazy.",
"banList.name": "Název",
"banList.ip": "IP",
"banList.created": "Vytvořeno",
"banList.duration": "Doba trvání",
"banList.invoker": "Od",
"banList.reason": "Důvod",
"banList.permanent": "Trvale",
"banList.delete": "Smazat",
"banList.deleteAll": "Smazat vše",
"complainList.title": "Seznam stížností",
"complainList.empty": "Nebyly nalezeny žádné stížnosti.",
"complainList.target": "Cíl",
"complainList.from": "Od",
"complainList.message": "Zpráva",
"complainList.timestamp": "Časové razítko",
"offlineMessages.title": "Offline zprávy",
"offlineMessages.empty": "Nebyly nalezeny žádné zprávy.",
"offlineMessages.subject": "Předmět",
"offlineMessages.from": "Od",
"offlineMessages.timestamp": "Časové razítko",
"offlineMessages.targetUid": "Cílové UID",
"offlineMessages.message": "Zpráva",
"offlineMessages.send": "Odeslat",
"offlineMessages.new": "Nová zpráva",
"offlineMessages.markRead": "Označit jako přečtené",
"offlineMessages.backToList": "Zpět na seznam",
"dialog.cancel": "Zrušit",
"groupAssign.channelTitle": "Přiřadit skupinu kanálu",
"groupAssign.serverTitle": "Přiřadit skupinu serveru",
"groupAssign.empty": "Nebyly nalezeny žádné skupiny.",
"groupAssign.clickToRemove": "Kliknutím odeberete",
"serverQueryLogin.username": "Uživatelské jméno",
"serverQueryLogin.password": "Heslo",
"serverQueryLogin.login": "Přihlásit",
"permissionOverview.title": "Moje oprávnění",
"permissionOverview.empty": "Nebyla nalezena žádná oprávnění.",
"permissionOverview.name": "Oprávnění",
"permissionOverview.value": "Hodnota",
"permissionOverview.negated": "Negováno",
"permissionOverview.skip": "Přeskočit",
"permsEditor.title": "Oprávnění",
"permsEditor.tab.server": "Skupiny serveru",
"permsEditor.tab.client": "Oprávnění klienta",
"permsEditor.tab.channel": "Oprávnění kanálu",
"permsEditor.tab.channelgroup": "Skupiny kanálu",
"permsEditor.tab.channelclient": "Oprávnění klientů kanálu",
"permsEditor.clientDbId": "Jedinečné DB ID klienta:",
"permsEditor.load": "Načíst",
"permsEditor.pickOnlineClient": "Nebo vyberte online klienta...",
"permsEditor.pickTarget": "Vyberte skupinu/kanál vlevo nebo zadejte ID klienta.",
"permsEditor.addPermission": "Přidat",
"permsEditor.searchPermission": "Hledat oprávnění...",
"dialog.ok": "OK",
"channelContext.join": "Přepnout na kanál",
"channelContext.files": "Soubory...",
"fileBrowser.title": "Přenosy souborů",
"fileBrowser.up": "Nahoru",
"fileBrowser.tooLarge": "Soubor je příliš velký – nahrávání je omezeno na {mb} MiB.",
"fileBrowser.refresh": "Obnovit",
"fileBrowser.newFolder": "Nová složka",
"fileBrowser.upload": "Nahrát",
"fileBrowser.folderName": "Název složky",
"fileBrowser.empty": "Tato složka je prázdná.",
"fileBrowser.name": "Název",
"fileBrowser.size": "Velikost",
"fileBrowser.modified": "Změněno",
"fileBrowser.download": "Stáhnout",
"fileBrowser.rename": "Přejmenovat",
"fileBrowser.delete": "Smazat",
"fileBrowser.deleteConfirm": "Opravdu smazat?",
"fileBrowser.uploading": "Nahrávání...",
"fileBrowser.downloading": "Stahování...",
"serverContext.icons": "Ikony serveru...",
"serverIcons.title": "Správa ikon serveru",
"serverIcons.upload": "Nahrát ikonu",
"serverIcons.iconId": "ID ikony",
"serverIcons.empty": "Nebyly nalezeny žádné ikony.",
"clientContext.privateChat": "Soukromý chat",
"clientContext.poke": "Šťouchnout",
"clientContext.watchStream": "Sledovat stream",
"clientContext.moveTo": "Přesunout do…",
"clientContext.volume": "Hlasitost",
"clientContext.volumeHint": "Pouze pro vás. Dvojklikem obnovíte 100 %.",
"clientContext.copyName": "Kopírovat název",
"clientContext.connectionInfo": "Zobrazit informace o připojení",
"clientContext.addWhisperTarget": "Přidat jako cíl šeptání",
"clientContext.removeWhisperTarget": "Odebrat jako cíl šeptání",
"clientContext.assignChannelGroup": "Přiřadit skupinu kanálu",
"clientContext.assignServerGroup": "Přiřadit skupinu serveru",
"clientContext.kickChannel": "Vykopnout z kanálu",
"clientContext.kick": "Vykopnout ze serveru",
"clientContext.ban": "Zabanovat",
"clientContext.notSupported": "Ve webovém klientovi zatím není podporováno",
"moveClient.title": "Přesunout",
"moveClient.empty": "Nejsou dostupné žádné kanály.",
"moveClient.current": "Aktuální kanál",
"moveClient.spacer": "Oddělovač",
"serverContext.connectionInfo": "Informace o připojení k serveru",
"serverContext.copyAddress": "Kopírovat adresu serveru",
"serverContext.addFavorite": "Přidat do oblíbených",
"serverContext.disconnect": "Odpojit",
"connectError.dismiss": "Zavřít",
"dialog.close": "Zavřít",
"sounds.title": "Zvuky",
"sounds.subtitle": "Nastavit zvuková upozornění na události",
"sounds.enable": "Povolit zvuky",
"sounds.volume": "Hlasitost",
"sounds.eventEnable": "Povolit tento zvuk",
"sounds.event.connect": "Připojeno",
"sounds.event.disconnect": "Odpojeno",
"sounds.event.clientJoin": "Klient se připojí",
"sounds.event.clientLeave": "Klient odejde",
"sounds.event.message": "Přijata zpráva",
"sounds.event.poke": "Přijato šťouchnutí",
"sounds.default": "Výchozí",
"sounds.custom": "Vlastní soubor: {name}",
"sounds.test": "▶ Test",
"sounds.upload": "Nahrát",
"sounds.reset": "Obnovit",
"sounds.importSoundpack": "Importovat balíček zvuků (.ts3soundpack)",
"sounds.importResult": "Importováno zvuků: {matched}, nespárovaných souborů: {unmatched}",
"nachrichten.title": "Zprávy",
"nachrichten.subtitle": "Přizpůsobit zprávy",
"nachrichten.disconnectMessage": "Odpojení:",
"nachrichten.disconnectMessagePlaceholder": "odcházím",
"nachrichten.presetsTitle": "Přednastavené zprávy",
"nachrichten.type": "Typ",
"nachrichten.type.away": "Nepřítomen",
"nachrichten.templateName": "Název šablony",
"nachrichten.message": "Zpráva",
"nachrichten.add": "Přidat",
"nachrichten.delete": "Smazat",
"tabs.disconnect": "Odpojit",
"identity.importInvalid": "„{file}“ není platný soubor identity.",
"log.fileTransferFailed": "Přenos souboru selhal:",
"log.serverReconnecting": "Spojení se serverem bylo ztraceno, obnovování připojení…",
"log.serverReconnected": "Připojení k serveru bylo obnoveno",
"log.fileTransferInvalidAddress": "Přenos souboru selhal (neplatná adresa)",
"sounds.importFailed": "Balíček zvuků se nepodařilo načíst – je to platný soubor .ts3soundpack/ZIP?",
"tabs.connections": "Připojení k serverům",
"shortcut.ctrl": "Ctrl"
}
+6 -3
View File
@@ -276,6 +276,8 @@
"design.theme.greenteaspeak.desc": "Klassisches GreenTeaSpeak-Client-Layout mit dunklen Panels und goldener Menüleiste.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "Technisches, flaches Layout im IDE-Stil für Power-User.",
"design.status.connected": "Verbunden",
"design.custom.new": "+ Neues Design",
"design.custom.import": "Design importieren",
@@ -338,9 +340,12 @@
"app.language.en": "English",
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? Hilf mit auf Weblate →",
"app.serverBanner": "Server-Banner anzeigen",
"app.serverBanner.hint": "Das Banner lädt direkt von der Adresse, die der Serverbetreiber eingetragen hat. Dieser Host sieht dabei deine IP-Adresse.",
"app.chatImages": "Bilder im Chat laden",
"app.chatImages.hint": "Bilder aus [img]-Tags und Markdown laden direkt von der Adresse, die der Absender gewählt hat, und dieser Host sieht deine IP-Adresse. Ausgeschaltet erscheinen sie als Link.",
"playback.title": "Wiedergabe",
"playback.subtitle": "Ändern der Wiedergabeeinstellungen",
"playback.profile": "Profile",
@@ -391,6 +396,7 @@
"info.no": "Nein",
"tree.noMatches": "Keine Treffer",
"tree.search": "Kanäle und Nutzer suchen",
"tree.label": "Kanäle",
"tree.notConnected": "Nicht verbunden",
"tree.clickToSelect": "Klicken zum Auswählen, Doppelklick zum Beitreten",
"tree.clickToJoin": "Doppelklick zum Beitreten",
@@ -659,10 +665,7 @@
"nachrichten.message": "Nachricht",
"nachrichten.add": "Hinzufügen",
"nachrichten.delete": "Löschen",
"tree.expand": "Aufklappen",
"tree.collapse": "Zuklappen",
"tabs.disconnect": "Verbindung trennen",
"tabs.closeTab": "Tab schließen: {label}",
"identity.importInvalid": "„{file}“ ist keine gültige Identitätsdatei.",
"log.fileTransferFailed": "Dateiübertragung fehlgeschlagen:",
"log.serverReconnecting": "Verbindung zum Server verloren, verbinde neu…",
+6 -3
View File
@@ -276,6 +276,8 @@
"design.theme.greenteaspeak.desc": "Classic GreenTeaSpeak client layout with dark panels and a gold menu bar.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "A technical, flat IDE-style layout for power users.",
"design.status.connected": "Connected",
"design.custom.new": "+ New design",
"design.custom.import": "Import design",
@@ -338,9 +340,12 @@
"app.language.en": "English",
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Help out on Weblate →",
"app.serverBanner": "Show server banners",
"app.serverBanner.hint": "The banner loads straight from the address the server admin set, and that host sees your IP address.",
"app.chatImages": "Load images in chat",
"app.chatImages.hint": "Images from [img] tags and Markdown load straight from the address the sender picked, and that host sees your IP address. When off, they show as links.",
"playback.title": "Playback",
"playback.subtitle": "Change your playback settings",
"playback.profile": "Profile",
@@ -391,6 +396,7 @@
"info.no": "No",
"tree.noMatches": "No matches",
"tree.search": "Search channels and users",
"tree.label": "Channels",
"tree.notConnected": "Not connected",
"tree.clickToSelect": "Click to select, double-click to join",
"tree.clickToJoin": "Double-click to join",
@@ -659,10 +665,7 @@
"nachrichten.message": "Message",
"nachrichten.add": "Add",
"nachrichten.delete": "Delete",
"tree.expand": "Expand",
"tree.collapse": "Collapse",
"tabs.disconnect": "Disconnect",
"tabs.closeTab": "Close tab: {label}",
"identity.importInvalid": "\"{file}\" is not a valid identity file.",
"log.fileTransferFailed": "File transfer failed:",
"log.serverReconnecting": "Connection to the server lost, reconnecting…",
+6 -3
View File
@@ -276,6 +276,8 @@
"design.theme.greenteaspeak.desc": "چیدمان کلاسیک کلاینت GreenTeaSpeak با پنل‌های تیره و نوار منوی طلایی.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "چیدمانی فنی و تخت به سبک IDE برای کاربران حرفه‌ای.",
"design.status.connected": "متصل",
"design.custom.new": "+ طراحی جدید",
"design.custom.import": "وارد کردن طراحی",
@@ -338,9 +340,12 @@
"app.language.en": "English",
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمه‌ای اشتباه دیدید؟ در Weblate کمک کنید →",
"app.serverBanner": "نمایش بنر سرور",
"app.serverBanner.hint": "بنر مستقیماً از نشانی‌ای بارگیری می‌شود که مدیر سرور تعیین کرده است و آن میزبان نشانی IP شما را می‌بیند.",
"app.chatImages": "بارگیری تصاویر در گفتگو",
"app.chatImages.hint": "تصاویر برچسب‌های [img] و مارک‌داون مستقیماً از نشانی‌ای که فرستنده انتخاب کرده بارگیری می‌شوند و آن میزبان نشانی IP شما را می‌بیند. در حالت خاموش به‌صورت پیوند نمایش داده می‌شوند.",
"playback.title": "پخش",
"playback.subtitle": "تنظیمات پخش را تغییر بده",
"playback.profile": "پروفایل",
@@ -390,6 +395,7 @@
"info.no": "خیر",
"tree.noMatches": "نتیجه‌ای یافت نشد",
"tree.search": "جستجوی کانال‌ها و کاربران",
"tree.label": "کانال‌ها",
"tree.notConnected": "متصل نیست",
"tree.clickToSelect": "برای انتخاب کلیک کن، برای ورود دوبار کلیک کن",
"tree.clickToJoin": "برای ورود دوبار کلیک کن",
@@ -658,10 +664,7 @@
"nachrichten.message": "پیام",
"nachrichten.add": "افزودن",
"nachrichten.delete": "حذف",
"tree.expand": "باز کردن",
"tree.collapse": "بستن",
"tabs.disconnect": "قطع اتصال",
"tabs.closeTab": "بستن زبانه: {label}",
"identity.importInvalid": "«{file}» یک فایل هویت معتبر نیست.",
"log.fileTransferFailed": "انتقال فایل ناموفق بود:",
"log.serverReconnecting": "اتصال به سرور قطع شد، در حال اتصال دوباره…",
+6 -3
View File
@@ -223,6 +223,8 @@
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "面向高级用户的扁平化 IDE 风格技术布局。",
"design.status.connected": "已连接",
"options.section.erweiterungen": "扩展",
"options.section.hotkeys": "快捷键",
@@ -241,9 +243,12 @@
"app.language.en": "English",
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?欢迎到 Weblate 参与改进 →",
"app.serverBanner": "显示服务器横幅",
"app.serverBanner.hint": "横幅直接从服务器管理员设置的地址加载,该主机会看到你的 IP 地址。",
"app.chatImages": "在聊天中加载图片",
"app.chatImages.hint": "[img] 标签和 Markdown 中的图片直接从发送者指定的地址加载,该主机会看到你的 IP 地址。关闭时显示为链接。",
"playback.title": "播放",
"playback.subtitle": "更改播放设置",
"playback.profile": "配置",
@@ -292,6 +297,7 @@
"info.no": "否",
"tree.noMatches": "无匹配结果",
"tree.search": "搜索频道和用户",
"tree.label": "频道",
"tree.notConnected": "未连接",
"tree.clickToSelect": "单击选择,双击加入",
"tree.clickToJoin": "双击加入",
@@ -658,10 +664,7 @@
"stream.state.failed": "连接失败",
"stream.state.closed": "已结束",
"clientContext.watchStream": "观看直播",
"tree.expand": "展开",
"tree.collapse": "折叠",
"tabs.disconnect": "断开连接",
"tabs.closeTab": "关闭标签页:{label}",
"identity.importInvalid": "“{file}”不是有效的身份文件。",
"log.fileTransferFailed": "文件传输失败:",
"log.serverReconnecting": "与服务器的连接已断开,正在重新连接…",
+9 -5
View File
@@ -23,7 +23,7 @@
--gts-border: #1c1f24;
--border-light: #3a4450;
--gts-text: #d7dee6;
--gts-text-muted: #7a8490;
--gts-text-muted: #8a94a0; /* native #7a8490, lifted to 4.5:1 on the panel */
--menu-text: #c8b882;
--menu-hover: #c8b882;
--menu-hover-text: #1a1a1a;
@@ -34,7 +34,7 @@
--error: #e62222;
--selection: #4a5560;
--selection-tree: #5a7ea0;
--server-log-text: #7a8490;
--server-log-text: #8a94a0;
--chat-separator: #1c1f24;
--chat-separator-selected: #4a5560;
--tree-fg: #d1d1d1;
@@ -375,7 +375,10 @@
color: var(--gts-text);
}
/* Multi-join tabs for Standard / Nova (same strip, slightly softer chrome) */
/* Multi-join tabs for Standard / Nova (same strip, slightly softer chrome).
Only GTS defines --bg-app/--bg-toolbar/--bg-panel, so this strip is always
dark here: its text colors are fixed, not the theme's --text (which is dark
in the light theme and made the active tab unreadable). */
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tabs {
display: flex;
gap: 1px;
@@ -396,7 +399,7 @@
background: var(--bg-toolbar, #2a2a2a);
border: 1px solid var(--border, #444);
border-bottom: none;
color: var(--text-muted, #aaa);
color: #aaa;
padding: 0 4px 0 10px;
max-width: 280px;
height: 100%;
@@ -408,7 +411,7 @@
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-active {
background: var(--bg-panel, #333);
color: var(--text, #eee);
color: #eee;
border-color: #b0b8c0;
}
@@ -422,6 +425,7 @@
.ts-app:not(.ts-design-greenteaspeak) .gts-connection-tab-close {
flex-shrink: 0;
text-align: center;
width: 16px;
height: 16px;
padding: 0;
+674
View File
@@ -0,0 +1,674 @@
/* Command Center (IDE style): explorer | voice grid + terminal | inspector,
flat zinc/emerald, always dark regardless of the light/dark toggle.
Variables sit in :where() so custom themes can override them; component
rules use .ts-app.ts-design-ide like Pulse does, so they beat App.css
without !important. Imported right after App.css in App.tsx - the order
matters for the zero-specificity block. */
:where(.ts-app.ts-design-ide) {
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
--ide-panel: #18181b;
--ide-faint: #71717a;
--ide-accent-bg: rgba(16, 185, 129, 0.1);
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-size: 13px;
--bg: #09090b;
--bg-toolbar-1: #18181b;
--bg-toolbar-2: #18181b;
--border: #27272a;
--border-soft: #27272a;
--text: #e4e4e7;
--text-muted: #a1a1aa;
--text-faint: #71717a;
--accent: #10b981;
--success: #10b981;
--input-bg: #09090b;
--input-text: #e4e4e7;
--button-bg-1: #18181b;
--button-bg-2: #18181b;
--button-bg-hover-1: #27272a;
--button-bg-hover-2: #27272a;
--row-hover: #27272a;
--client-text: #a1a1aa;
--self-text: #10b981;
--log-bg: #09090b;
}
.ts-app.ts-design-ide ::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.ts-app.ts-design-ide ::-webkit-scrollbar-track {
background: var(--bg);
border-left: 1px solid var(--border);
}
.ts-app.ts-design-ide ::-webkit-scrollbar-thumb {
background: #3f3f46;
border: 2px solid var(--bg);
}
.ts-app.ts-design-ide *:focus-visible {
outline: 1px solid var(--accent);
outline-offset: -1px;
}
/* ---------- Header: menubar + toolbar + connection tabs ---------- */
/* No own row for the menubar: the hamburger floats into the toolbar row */
.ts-app.ts-design-ide > .ts-menubar {
position: relative;
z-index: 20;
height: 0;
padding: 0;
border: 0;
overflow: visible;
}
.ts-app.ts-design-ide > .ts-menubar .ts-nova-menu-dropdown {
position: absolute;
top: 0.4rem;
right: 0.5rem;
}
.ts-app.ts-design-ide > .ts-toolbar {
padding-right: 3rem;
}
.ts-app.ts-design-ide > .ts-toolbar {
background: var(--ide-panel);
border-bottom: 1px solid var(--border);
box-shadow: none;
}
.ts-app.ts-design-ide .ts-icon-button {
background: transparent;
border: none;
border-radius: 4px;
box-shadow: none;
color: var(--text-muted);
}
.ts-app.ts-design-ide .ts-icon-button:hover {
background: var(--row-hover);
color: #fff;
}
.ts-app.ts-design-ide .gts-connection-tabs {
background: var(--bg);
border-bottom: 1px solid var(--border);
font-family: var(--ide-mono);
font-size: 12px;
}
.ts-app.ts-design-ide .gts-connection-tab {
background: transparent;
border: none;
border-right: 1px solid var(--border);
border-radius: 0;
color: var(--text-muted);
}
.ts-app.ts-design-ide .gts-connection-tab-active {
background: var(--ide-panel);
color: var(--text);
box-shadow: inset 0 2px 0 var(--accent);
}
/* ---------- Body: explorer | center | inspector ---------- */
.ts-app.ts-design-ide > .ts-body {
display: grid;
grid-template-columns: auto minmax(0, 1fr) 18rem;
grid-template-rows: minmax(0, 1fr);
}
/* Flatten the Standard "upper row" so tree and info panel become grid cells */
.ts-app.ts-design-ide .ts-upper {
display: contents;
}
.ts-app.ts-design-ide .ts-resize-handle-vertical,
.ts-app.ts-design-ide .ts-resize-handle-horizontal {
display: none;
}
.ts-app.ts-design-ide .ts-tree-panel,
.ts-app.ts-design-ide .ts-side-panel {
grid-row: 1;
overflow-y: auto;
background: var(--ide-panel);
}
.ts-app.ts-design-ide .ts-tree-panel {
grid-column: 1;
overflow-x: hidden;
min-width: 16rem;
padding: 0 0 0.5rem;
border-right: 1px solid var(--border);
font-family: var(--ide-mono);
font-size: 12px;
}
.ts-app.ts-design-ide .ts-side-panel {
grid-column: 3;
border-left: 1px solid var(--border);
font-family: var(--ide-mono);
font-size: 11px;
}
.ts-app.ts-design-ide .ts-chat-panel {
grid-column: 2;
grid-row: 1;
background: var(--bg);
}
/* Section headers like an IDE side bar */
.ts-app.ts-design-ide .ts-tree-panel::before,
.ts-app.ts-design-ide .ts-side-panel::before {
display: flex;
align-items: center;
flex-shrink: 0;
height: 2rem;
padding: 0 1rem;
margin-bottom: 0.4rem;
border-bottom: 1px solid var(--border);
font-family: var(--ide-mono);
font-size: 10px;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-tree-panel::before {
content: "Explorer";
}
.ts-app.ts-design-ide .ts-side-panel::before {
content: "Inspector";
margin-bottom: 0;
}
.ts-app.ts-design-ide .ts-tree-panel > * {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.ts-app.ts-design-ide .ts-row {
border-radius: 0;
}
.ts-app.ts-design-ide .ts-row-selected {
background: var(--ide-accent-bg);
color: var(--text);
}
/* Explorer tree as in the mockup: carets and dots instead of folder/server icons and orbs */
.ts-app.ts-design-ide .ts-server-row > svg,
.ts-app.ts-design-ide .ts-channel-row > svg {
display: none;
}
.ts-app.ts-design-ide .ts-server-row {
color: var(--text);
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.ts-app.ts-design-ide .ts-server-row::before {
content: "\25BE";
color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-row {
padding-top: 2px;
padding-bottom: 2px;
}
.ts-app.ts-design-ide .ts-channel-row {
color: var(--text-muted);
}
.ts-app.ts-design-ide .ts-channel-row:has(+ .ts-tree-list .ts-self) {
color: var(--text);
background: rgba(39, 39, 42, 0.5);
}
.ts-app.ts-design-ide .ts-tree-expander span {
border-top-color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-tree-expander-collapsed span {
border-top-color: transparent;
border-left-color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-client-row.ts-self {
font-weight: 400;
}
.ts-app.ts-design-ide .ts-client-row.ts-talking {
outline: 1px solid var(--accent);
outline-offset: -1px;
background: rgba(16, 185, 129, 0.05);
color: var(--text);
}
.ts-app.ts-design-ide .ts-talk-lamp-idle,
.ts-app.ts-design-ide .ts-talk-lamp-talking {
position: relative;
width: 6px;
height: 6px;
margin: 0 4px;
background: #52525b;
box-shadow: none;
}
.ts-app.ts-design-ide .ts-talk-lamp-talking {
background: var(--accent);
}
.ts-app.ts-design-ide .ts-talk-lamp-talking::after {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--accent);
animation: ts-ide-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ts-ide-ping {
75%,
100% {
transform: scale(2.5);
opacity: 0;
}
}
/* The narrow explorer must not squeeze the name away in favour of the away message */
.ts-app.ts-design-ide .ts-client-row .ts-tree-label {
flex-shrink: 0;
}
.ts-app.ts-design-ide .ts-client-away-message {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.ts-app.ts-design-ide .ts-talk-lamp-muted {
opacity: 0.7;
}
.ts-app.ts-design-ide .ts-tree-search {
font-family: var(--ide-mono);
border-radius: 0;
}
/* Inspector content */
.ts-app.ts-design-ide .ts-info-panel {
padding: 1rem;
}
.ts-app.ts-design-ide .ts-info-title {
color: var(--text);
font-size: 13px;
font-weight: 600;
}
.ts-app.ts-design-ide .ts-info-row {
color: var(--text-muted);
}
.ts-app.ts-design-ide .ts-info-connection-link {
color: var(--accent);
text-transform: uppercase;
letter-spacing: 0.05em;
font-size: 10px;
}
/* ---------- Center: breadcrumb, voice grid, terminal ---------- */
.ts-app.ts-design-ide .ts-ide-breadcrumb {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 0.3rem;
height: 2rem;
padding: 0 1rem;
border-bottom: 1px solid var(--border);
font-family: var(--ide-mono);
font-size: 12px;
color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-ide-breadcrumb span {
color: var(--text);
}
.ts-app.ts-design-ide .ts-speaking-now {
flex: 1;
min-height: 0;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
align-content: start;
gap: 1rem;
padding: 1.5rem;
}
.ts-app.ts-design-ide .ts-speaking-now-tile {
position: relative;
display: flex;
align-items: flex-start;
gap: 1rem;
padding: 1rem;
overflow: hidden;
background: var(--ide-panel);
border: 1px solid var(--border);
border-radius: 4px;
opacity: 0.8;
transition: opacity 0.15s ease;
}
.ts-app.ts-design-ide .ts-speaking-now-tile:hover,
.ts-app.ts-design-ide .ts-speaking-now-tile-active {
opacity: 1;
}
.ts-app.ts-design-ide .ts-speaking-now-tile-active {
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent), 0 0 12px rgba(16, 185, 129, 0.35);
}
/* Speaking glow along the top edge */
.ts-app.ts-design-ide .ts-speaking-now-tile-active::before {
content: "";
position: absolute;
inset: 0 0 auto;
height: 2px;
background: var(--accent);
box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}
.ts-app.ts-design-ide .ts-speaking-now-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 48px;
height: 48px;
overflow: hidden;
border-radius: 4px;
border: 1px solid var(--border);
background: var(--bg);
font-family: var(--ide-mono);
font-size: 18px;
font-weight: 600;
color: #fff;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.ts-app.ts-design-ide .ts-speaking-now-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.ts-app.ts-design-ide .ts-speaking-now-name {
min-width: 0;
max-width: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 500;
color: var(--text-muted);
}
.ts-app.ts-design-ide .ts-speaking-now-tile-active .ts-speaking-now-name {
color: var(--text);
font-weight: 600;
}
.ts-app.ts-design-ide .ts-speaking-now-body {
flex: 1;
min-width: 0;
}
.ts-app.ts-design-ide .ts-speaking-now-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
margin-bottom: 0.25rem;
}
.ts-app.ts-design-ide .ts-speaking-now-head .ts-talk-lamp-muted {
opacity: 0.6;
}
/* Little audio visualizer for the speaker */
.ts-app.ts-design-ide .ts-speaking-now-bars {
display: flex;
align-items: flex-end;
gap: 2px;
height: 12px;
}
.ts-app.ts-design-ide .ts-speaking-now-bars i {
width: 4px;
height: 100%;
background: var(--accent);
animation: ts-ide-bar 0.8s ease-in-out infinite alternate;
}
.ts-app.ts-design-ide .ts-speaking-now-bars i:nth-child(2) {
animation-delay: -0.3s;
}
.ts-app.ts-design-ide .ts-speaking-now-bars i:nth-child(3) {
animation-delay: -0.55s;
}
@keyframes ts-ide-bar {
from {
height: 25%;
}
to {
height: 100%;
}
}
.ts-app.ts-design-ide .ts-speaking-now-groups {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
}
.ts-app.ts-design-ide .ts-speaking-now-group {
padding: 0 0.25rem;
border: 1px solid var(--group-color);
background: color-mix(in srgb, var(--group-color) 10%, transparent);
color: color-mix(in srgb, var(--group-color) 75%, #fff);
font-family: var(--ide-mono);
font-size: 9px;
line-height: 1.5;
text-transform: uppercase;
}
.ts-app.ts-design-ide .ts-speaking-now-tile {
cursor: pointer;
}
.ts-app.ts-design-ide .ts-speaking-now-tile-selected {
border-color: var(--text-muted);
background: #1f1f23;
opacity: 1;
}
/* Speaking wins over selected */
.ts-app.ts-design-ide .ts-speaking-now-tile-selected.ts-speaking-now-tile-active {
border-color: var(--accent);
}
.ts-app.ts-design-ide .ts-speaking-now-status {
margin-top: 0.375rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--ide-mono);
font-size: 11px;
color: var(--ide-faint);
}
/* Terminal: fixed-height bottom pane once the voice grid is above it */
.ts-app.ts-design-ide .ts-chat-panel:has(.ts-speaking-now) .ts-chat-messages {
flex: 0 0 11rem;
}
.ts-app.ts-design-ide .ts-chat-tabs {
order: 1;
gap: 1.5rem;
padding: 0.5rem 1rem 0;
background: var(--ide-panel);
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
.ts-app.ts-design-ide .ts-chat-messages {
order: 2;
padding: 1rem;
background: var(--ide-panel);
font-family: var(--ide-mono);
font-size: 12px;
line-height: 1.6;
color: var(--text-muted);
}
.ts-app.ts-design-ide .ts-chat-tab {
padding: 0 0 0.5rem;
background: transparent;
border: none;
border-bottom: 2px solid transparent;
border-radius: 0;
font-family: var(--ide-mono);
font-size: 11px;
font-weight: 400;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--ide-faint);
}
.ts-app.ts-design-ide .ts-chat-tab:hover {
color: var(--text);
}
.ts-app.ts-design-ide .ts-chat-tab-active {
border-bottom-color: var(--accent);
color: var(--text);
}
.ts-app.ts-design-ide .ts-chat-from {
color: #d4d4d8;
font-weight: 500;
}
.ts-app.ts-design-ide .ts-chat-line-self .ts-chat-from {
color: var(--accent);
}
.ts-app.ts-design-ide .ts-chat-line-log {
color: #60a5fa;
}
.ts-app.ts-design-ide .ts-chat-bubble {
background: none;
padding: 0;
border-radius: 0;
}
/* Prompt-style input */
.ts-app.ts-design-ide .ts-chat-input-row {
order: 3;
align-items: center;
gap: 0.5rem;
padding: 0.3rem 1rem;
background: var(--bg);
border-top: 1px solid var(--border);
font-family: var(--ide-mono);
}
.ts-app.ts-design-ide .ts-chat-input-row::before {
content: "➜ ~/channel";
flex-shrink: 0;
font-weight: 600;
font-size: 12px;
color: #60a5fa;
}
.ts-app.ts-design-ide .ts-chat-input-row textarea,
.ts-app.ts-design-ide .ts-chat-input-row input {
background: transparent;
border: none;
box-shadow: none;
font-family: var(--ide-mono);
font-size: 12px;
color: var(--text);
}
.ts-app.ts-design-ide .ts-chat-input-row button,
.ts-app.ts-design-ide .ts-dialog button:not(.ts-icon-button) {
border-radius: 4px;
border: 1px solid var(--border);
box-shadow: none;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
}
/* Client log strip at the very bottom */
.ts-app.ts-design-ide > .ts-log {
background: var(--bg);
border-top: 1px solid var(--border);
font-family: var(--ide-mono);
}
/* Narrow screens: stack instead of three columns */
@media (max-width: 900px) {
.ts-app.ts-design-ide > .ts-body {
grid-template-columns: minmax(0, 1fr);
grid-template-rows: auto minmax(0, 1fr);
}
.ts-app.ts-design-ide .ts-tree-panel {
grid-column: 1;
grid-row: 1;
width: auto !important;
max-height: 40vh;
border-right: none;
border-bottom: 1px solid var(--border);
}
.ts-app.ts-design-ide .ts-side-panel {
display: none;
}
.ts-app.ts-design-ide .ts-chat-panel {
grid-column: 1;
grid-row: 2;
}
}
@media (prefers-reduced-motion: reduce) {
.ts-app.ts-design-ide .ts-talk-lamp-talking::after,
.ts-app.ts-design-ide .ts-speaking-now-bars i {
animation: none;
}
}
@@ -57,22 +57,31 @@ export function GreenteaSpeakChrome({
tab.connecting ? " gts-connection-tab-connecting" : ""
}`}
onClick={() => onSelectTab?.(tab.id)}
tabIndex={0}
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
else if (e.key === "Enter" || e.key === " ") onSelectTab?.(tab.id);
else return;
e.preventDefault();
}}
title={tab.label}
>
<span className="gts-connection-tab-label">{tab.label}</span>
{onCloseTab ? (
<button
type="button"
<span
className="gts-connection-tab-close"
aria-hidden="true"
title={t("tabs.disconnect")}
aria-label={t("tabs.closeTab", { label: tab.label })}
onClick={(e) => {
e.stopPropagation();
onCloseTab(tab.id);
}}
>
×
</button>
</span>
) : null}
</div>
);