mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ced63fdb2a | ||
|
|
d860aa61e5 | ||
|
|
341a1644a6 | ||
|
|
97421ff2de | ||
|
|
d64b25f22f | ||
|
|
be7247f3f6 | ||
|
|
bcdbabe201 | ||
|
|
3c24ddc7d3 | ||
|
|
94b290fa06 | ||
|
|
bf6008f857 | ||
|
|
632e77ccc8 | ||
|
|
aa324274a4 | ||
|
|
00c8cfac06 | ||
|
|
ff570d9131 | ||
|
|
b5a5ec5236 | ||
|
|
5a639628a9 | ||
|
|
7a0a64b518 | ||
|
|
935b867c76 | ||
|
|
cc70bc4736 | ||
|
|
603cedd907 | ||
|
|
803cefd653 | ||
|
|
01faa6593c | ||
|
|
e28e89bc60 | ||
|
|
8d8d942038 | ||
|
|
e28e18c88c | ||
|
|
2615904b1e | ||
|
|
5e7add6dc8 | ||
|
|
983ce1e105 | ||
|
|
7d14c3409e | ||
|
|
882265beae | ||
|
|
0aefd4198b | ||
|
|
3a91a8db07 | ||
|
|
51d7e107e5 | ||
|
|
1e71e43bd7 | ||
|
|
c2b52b323d | ||
|
|
bbb44b3eaa | ||
|
|
bda908029b | ||
|
|
45e4af026f |
No files matched your search
@@ -1,5 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question / Discussion
|
||||
url: https://github.com/Moepchi/webspeak3/discussions
|
||||
url: https://github.com/WebSpeak3/webspeak3/discussions
|
||||
about: Ask a question or discuss an idea before filing an issue.
|
||||
@@ -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()
|
||||
@@ -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
|
||||
@@ -56,6 +56,7 @@ jobs:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
build-args: WEBSPEAK3_VERSION=${{ github.event.release.tag_name || 'latest' }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -90,6 +90,10 @@ COPY --from=connector-builder /src/connector/target/*/release/ts-connector /app/
|
||||
COPY --from=web-builder /src/web/dist /app/web/dist
|
||||
|
||||
ENV PORT=8080
|
||||
# Release tag, set by .github/workflows/docker-publish.yml. Only used for the
|
||||
# anonymous usage ping (gateway/src/telemetry.ts).
|
||||
ARG WEBSPEAK3_VERSION=unknown
|
||||
ENV WEBSPEAK3_VERSION=$WEBSPEAK3_VERSION
|
||||
ENV WEB_DIST=/app/web/dist
|
||||
ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<a href="Dockerfile"><img src="https://img.shields.io/badge/docker-build%20passing-2496ED?logo=docker&logoColor=white" alt="Docker Build"></a>
|
||||
<a href="gateway/package.json"><img src="https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white" alt="Node Version"></a>
|
||||
<a href="connector/Cargo.toml"><img src="https://img.shields.io/badge/rust-2021-000000?logo=rust&logoColor=white" alt="Rust Version"></a>
|
||||
<a href="https://github.com/Moepchi/webspeak3/releases"><img src="https://img.shields.io/github/v/release/Moepchi/webspeak3?include_prereleases&label=release" alt="Latest Release"></a>
|
||||
<a href="https://github.com/WebSpeak3/webspeak3/releases"><img src="https://img.shields.io/github/v/release/WebSpeak3/webspeak3?include_prereleases&label=release" alt="Latest Release"></a>
|
||||
<img src="https://img.shields.io/badge/status-public%20beta-f0b429" alt="Project Status">
|
||||
</p>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<a href="#-quick-start">🚀 Quick Start</a> ·
|
||||
<a href="#-installation">📖 Installation</a> ·
|
||||
<a href="ROADMAP.md">🗺️ Roadmap</a> ·
|
||||
<a href="https://github.com/Moepchi/webspeak3/issues">🐛 Report Bug</a>
|
||||
<a href="https://github.com/WebSpeak3/webspeak3/issues">🐛 Report Bug</a>
|
||||
</p>
|
||||
|
||||
> The [live demo](https://demo.webspeak3.de) runs entirely in your browser with simulated data — no real TeamSpeak server involved. It's there to show the UI, not the real connection.
|
||||
@@ -147,7 +147,7 @@ scope, known limitations, and the next milestones.
|
||||
Clone the repo (the Rust connector depends on a git submodule, so pull it in too):
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/Moepchi/webspeak3.git
|
||||
git clone --recurse-submodules https://github.com/WebSpeak3/webspeak3.git
|
||||
cd webspeak3
|
||||
```
|
||||
|
||||
@@ -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/WebSpeak3/webspeak3/wiki/Configuration-and-Environment-Variables) page.
|
||||
|
||||
| Variable | Default | Purpose |
|
||||
|---|---|---|
|
||||
@@ -197,16 +197,26 @@ All optional; add them under `environment:` in your compose override next to `PO
|
||||
| `DEFAULT_SERVER` / `DEFAULT_CHANNEL` | unset | Server (and optionally channel) every visitor auto-connects to — see [Bake in a default server](#2-bake-in-a-default-server). |
|
||||
| `BROADCAST_TOKEN` | unset | Bearer token required to call `/api/broadcast` (send an in-app notice to all connected clients before a maintenance restart). Endpoint 404s while unset. |
|
||||
| `TLS_CERT` / `TLS_KEY` | unset | Paths to serve the gateway over HTTPS/WSS directly instead of behind a reverse proxy/tunnel. Both must be set together. |
|
||||
| `STORE_ENABLED` | off | Set to `1` to turn this gateway's own `/api/store/themes` endpoint on. Only needed if you want to run your own Design Store instead of using the maintainer's shared one (see `STORE_URL` build arg above) — the endpoint 404s while unset. |
|
||||
| `STORE_ENABLED` | off | Set to `1` to turn this gateway's own `/api/store/themes` endpoint on. Only needed if you want to run your own Design Store instead of using the maintainer's shared one (see `STORE_URL` build arg above) — the endpoint 404s while unset. The store can also run as its own process (`node dist/store-server.js`, same image) so redeploying it never drops voice connections; route `/api/store/*` to it in your reverse proxy. |
|
||||
| `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. |
|
||||
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
|
||||
| `NEWS_TICKER` | on | Set to `0` to hide the news ticker at the bottom of the client. |
|
||||
| `NEWS_TICKER_CENTRAL` | on | Set to `0` to drop the official WebSpeak3 news (releases, new store designs, announcements) and only show your own messages. |
|
||||
| `NEWS_TICKER_MESSAGES` | – | Your own ticker messages, separated by `\|`, e.g. `Maintenance tonight at 10pm \| Welcome!` |
|
||||
|
||||
> **Anonymous usage ping:** when the gateway starts and then once a day, it sends a random instance ID (made up on first start, stored in `instance-id` in the working directory, used for nothing else) and its version number to `gateway.webspeak3.de`. That's the only way to tell whether anyone self-hosts WebSpeak3 at all, and how many instances still run an old version, e.g. after a security fix. Nothing else is sent: no hostnames, no TeamSpeak servers, no users, no settings. The receiving side doesn't store IP addresses. The startup log says when it's on. Turn it off with `TELEMETRY=0`.
|
||||
|
||||
> **News ticker:** like the native TS3 client, a small scrolling line at the bottom shows news. Your users' browsers load the official news straight from `gateway.webspeak3.de`, the same way the Design Store works. Your own messages come from `NEWS_TICKER_MESSAGES`. Users can hide the ticker with ✕ until something new comes in.
|
||||
|
||||
> **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.
|
||||
|
||||
@@ -229,7 +239,7 @@ All optional; add them under `environment:` in your compose override next to `PO
|
||||
The Rust connector depends on the `tsclientlib` crate, vendored as a git submodule — make sure to pull it in too:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/Moepchi/webspeak3.git
|
||||
git clone --recurse-submodules https://github.com/WebSpeak3/webspeak3.git
|
||||
cd webspeak3
|
||||
```
|
||||
|
||||
@@ -340,6 +350,25 @@ Either way: on your own hosted instance, the mandatory first-visit Terms of Use
|
||||
|
||||
The vast majority of this project's code was written by [Claude Code](https://claude.com/claude-code) (Anthropic's Claude), working iteratively with the repo owner one feature at a time.
|
||||
|
||||
## 🌈 In Memory of Akimo
|
||||
|
||||
<!-- Permanent: never remove this section. -->
|
||||
<img src="web/src/assets/akimo.jpg" alt="Akimo" width="120" align="left" />
|
||||
|
||||
WebSpeak3 is dedicated to Akimo, the project owner's dog, who crossed the rainbow bridge on October 21, 2026. 🐾
|
||||
|
||||
<br clear="left" />
|
||||
|
||||
## Star History
|
||||
|
||||
<a href="https://www.star-history.com/?repos=webspeak3%2Fwebspeak3&type=date&legend=bottom-right">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=webspeak3/webspeak3&type=date&theme=dark&legend=bottom-right" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=webspeak3/webspeak3&type=date&legend=bottom-right" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=webspeak3/webspeak3&type=date&legend=bottom-right" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
---
|
||||
|
||||
### Legal / Disclaimer
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ best practices and GreenTeaSpeak's native selection colours. Still to do:
|
||||
|
||||
## Feedback
|
||||
|
||||
Please use [GitHub Issues](https://github.com/Moepchi/webspeak3/issues) for
|
||||
Please use [GitHub Issues](https://github.com/WebSpeak3/webspeak3/issues) for
|
||||
reproducible bugs and feature requests. Include the browser and version,
|
||||
operating system, deployment method, and whether the issue affects voice,
|
||||
microphone access, or only the interface.
|
||||
|
||||
+167
-21
@@ -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());
|
||||
}
|
||||
@@ -1056,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).
|
||||
@@ -1089,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,
|
||||
@@ -2178,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
|
||||
@@ -2973,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
|
||||
@@ -2992,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;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3083,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
@@ -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]
|
||||
|
||||
+50
-9
@@ -8,8 +8,10 @@ import { fileURLToPath } from "node:url";
|
||||
import { WebSocketServer, type WebSocket } from "ws";
|
||||
import { Ts3Connection, type ServerType, type Ts3ConnectOptions } from "./ts3/connection.js";
|
||||
import { handleStore } from "./store.js";
|
||||
import { handleNewsConfig } from "./news.js";
|
||||
import { logFeedback, logConnectionEvent } from "./activity-log.js";
|
||||
import { clientIp, createRateLimiter } from "./net.js";
|
||||
import "./telemetry.js";
|
||||
|
||||
const SERVER_TYPES = new Set<ServerType>(["teamspeak", "teaspeak", "auto"]);
|
||||
|
||||
@@ -54,8 +56,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 +95,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 +122,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 +144,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)};`)}">`] : [],
|
||||
@@ -174,7 +192,7 @@ const FEEDBACK_ALLOWED_ORIGIN = process.env.FEEDBACK_ALLOWED_ORIGIN ?? "*";
|
||||
// A token with "Issues: write" access on the target repo. Without it,
|
||||
// feedback is still accepted and logged, just never turned into an issue.
|
||||
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
|
||||
const GITHUB_REPO = process.env.GITHUB_REPO ?? "Moepchi/webspeak3";
|
||||
const GITHUB_REPO = process.env.GITHUB_REPO ?? "WebSpeak3/webspeak3";
|
||||
const FEEDBACK_CATEGORIES = new Set(["bug", "idea", "report", "other"]);
|
||||
const FEEDBACK_MESSAGE_MAX_LENGTH = 4000;
|
||||
|
||||
@@ -348,7 +366,7 @@ async function handleFeedback(req: IncomingMessage, res: ServerResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
let body: { category?: unknown; message?: unknown; email?: unknown; publishAsIssue?: unknown; website?: unknown };
|
||||
let body: { category?: unknown; message?: unknown; email?: unknown; server?: unknown; publishAsIssue?: unknown; website?: unknown };
|
||||
try {
|
||||
body = JSON.parse(raw || "{}");
|
||||
} catch {
|
||||
@@ -371,6 +389,9 @@ async function handleFeedback(req: IncomingMessage, res: ServerResponse) {
|
||||
const message =
|
||||
typeof body.message === "string" ? body.message.trim().slice(0, FEEDBACK_MESSAGE_MAX_LENGTH) : "";
|
||||
const email = typeof body.email === "string" ? body.email.trim().slice(0, 200) || undefined : undefined;
|
||||
// Like the e-mail: private log only, never in the public issue - it may
|
||||
// name someone else's server.
|
||||
const server = typeof body.server === "string" ? body.server.trim().slice(0, 200) : "";
|
||||
const publishAsIssue = body.publishAsIssue === true;
|
||||
|
||||
if (!message) {
|
||||
@@ -379,7 +400,12 @@ async function handleFeedback(req: IncomingMessage, res: ServerResponse) {
|
||||
return;
|
||||
}
|
||||
|
||||
await logFeedback({ at: new Date().toISOString(), category, message, email });
|
||||
await logFeedback({
|
||||
at: new Date().toISOString(),
|
||||
category,
|
||||
message: server ? `${message}\n**Server:** ${server}` : message,
|
||||
email,
|
||||
});
|
||||
|
||||
let githubIssueUrl: string | undefined;
|
||||
if (publishAsIssue) {
|
||||
@@ -454,6 +480,10 @@ const requestHandler = (req: IncomingMessage, res: ServerResponse) => {
|
||||
await handleFeedback(req, res);
|
||||
return;
|
||||
}
|
||||
if (requestUrl.pathname === "/api/news") {
|
||||
handleNewsConfig(res);
|
||||
return;
|
||||
}
|
||||
if (requestUrl.pathname === "/api/broadcast") {
|
||||
await handleBroadcast(req, res);
|
||||
return;
|
||||
@@ -700,6 +730,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 +1010,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
@@ -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:/, "");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
// --- News ticker -----------------------------------------------------------
|
||||
//
|
||||
// Two halves:
|
||||
// * handleNewsFeed - the central feed every client shows by default. Served
|
||||
// by store-server.ts at /api/store/news, so it rides the existing
|
||||
// /api/store tunnel route. Manual items live in NEWS_DATA_FILE and are
|
||||
// managed with STORE_ADMIN_TOKEN (the stats panel); the latest release and
|
||||
// the newest store design are added automatically.
|
||||
// * handleNewsConfig - every gateway's /api/news. Tells its own client
|
||||
// whether to show the ticker at all (NEWS_TICKER=0 turns it off), whether
|
||||
// to include the central feed (NEWS_TICKER_CENTRAL=0 drops it), and the
|
||||
// instance's own messages (NEWS_TICKER_MESSAGES, separated by "|").
|
||||
//
|
||||
// Like store.ts, this file has zero private modifications.
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { readFile, rename, writeFile } from "node:fs/promises";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { isAdminRequest, latestPublicTheme } from "./store.js";
|
||||
|
||||
type NewsItem =
|
||||
| { id: string; kind: "text"; text: string; url?: string; at: string }
|
||||
| { id: string; kind: "release"; version: string; url: string; at: string }
|
||||
| { id: string; kind: "theme"; name: string; author: string; at: string };
|
||||
type TextItem = Extract<NewsItem, { kind: "text" }>;
|
||||
|
||||
const NEWS_DATA_FILE = process.env.NEWS_DATA_FILE;
|
||||
const GITHUB_REPO = process.env.GITHUB_REPO ?? "WebSpeak3/webspeak3";
|
||||
const MAX_ITEMS = 20;
|
||||
const MAX_TEXT = 300;
|
||||
const AUTO_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000;
|
||||
|
||||
let cache: TextItem[] | null = null;
|
||||
|
||||
async function load(): Promise<TextItem[]> {
|
||||
if (cache) return cache;
|
||||
if (!NEWS_DATA_FILE) return (cache = []);
|
||||
try {
|
||||
cache = JSON.parse(await readFile(NEWS_DATA_FILE, "utf-8")) as TextItem[];
|
||||
} catch (err) {
|
||||
if ((err as NodeJS.ErrnoException).code !== "ENOENT") throw err;
|
||||
cache = [];
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
async function save(items: TextItem[]) {
|
||||
const tmp = `${NEWS_DATA_FILE}.tmp`;
|
||||
await writeFile(tmp, JSON.stringify(items), "utf-8");
|
||||
await rename(tmp, NEWS_DATA_FILE!);
|
||||
cache = items;
|
||||
}
|
||||
|
||||
// Unauthenticated GitHub API allows 60 requests/hour; one per hour is plenty.
|
||||
let release: { item: NewsItem | null; fetchedAt: number } = { item: null, fetchedAt: 0 };
|
||||
|
||||
async function latestRelease(): Promise<NewsItem | null> {
|
||||
if (Date.now() - release.fetchedAt < 60 * 60 * 1000) return release.item;
|
||||
release.fetchedAt = Date.now();
|
||||
try {
|
||||
const res = await fetch(`https://api.github.com/repos/${GITHUB_REPO}/releases?per_page=1`, {
|
||||
headers: { Accept: "application/vnd.github+json", "User-Agent": "webspeak3-store" },
|
||||
});
|
||||
if (!res.ok) return release.item;
|
||||
const [r] = (await res.json()) as { tag_name: string; html_url: string; published_at: string }[];
|
||||
release.item = r ? { id: `release-${r.tag_name}`, kind: "release", version: r.tag_name, url: r.html_url, at: r.published_at } : null;
|
||||
} catch (err) {
|
||||
console.error("[news] Release lookup failed:", err);
|
||||
}
|
||||
return release.item;
|
||||
}
|
||||
|
||||
function isRecent(item: NewsItem | null | undefined): item is NewsItem {
|
||||
return item != null && Date.now() - Date.parse(item.at) < AUTO_MAX_AGE_MS;
|
||||
}
|
||||
|
||||
function json(res: ServerResponse, status: number, body: unknown) {
|
||||
res.writeHead(status, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify(body));
|
||||
}
|
||||
|
||||
async function readBody(req: IncomingMessage): Promise<Record<string, unknown> | null> {
|
||||
let raw = "";
|
||||
for await (const chunk of req) {
|
||||
raw += chunk;
|
||||
if (raw.length > 5_000) return null;
|
||||
}
|
||||
try {
|
||||
const parsed = JSON.parse(raw) as unknown;
|
||||
return parsed && typeof parsed === "object" ? (parsed as Record<string, unknown>) : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function handleNewsFeed(req: IncomingMessage, res: ServerResponse, pathname: string) {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
|
||||
res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
|
||||
if (req.method === "OPTIONS") {
|
||||
res.writeHead(204);
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
if (pathname === "/api/store/news") {
|
||||
const theme = await latestPublicTheme();
|
||||
const auto = [
|
||||
await latestRelease(),
|
||||
theme && ({ id: `theme-${theme.id}`, kind: "theme", name: theme.name, author: theme.author, at: theme.createdAt } as NewsItem),
|
||||
].filter(isRecent);
|
||||
res.setHeader("Cache-Control", "public, max-age=300");
|
||||
json(res, 200, { items: [...(await load()), ...auto] });
|
||||
return;
|
||||
}
|
||||
|
||||
// /api/store/news/admin: GET lists, POST {action:"add",text,url?} or {action:"delete",id}.
|
||||
if (!NEWS_DATA_FILE) return json(res, 404, { error: "not_found" });
|
||||
if (!isAdminRequest(req)) return json(res, 401, { error: "unauthorized" });
|
||||
if (req.method === "GET") return json(res, 200, { items: await load() });
|
||||
if (req.method !== "POST") return json(res, 405, { error: "method_not_allowed" });
|
||||
|
||||
const body = await readBody(req);
|
||||
const items = [...(await load())];
|
||||
if (body?.action === "delete" && typeof body.id === "string") {
|
||||
await save(items.filter((i) => i.id !== body.id));
|
||||
return json(res, 200, { ok: true });
|
||||
}
|
||||
if (body?.action === "add" && typeof body.text === "string" && body.text.trim()) {
|
||||
const url = typeof body.url === "string" && /^https:\/\/\S+$/.test(body.url.trim()) ? body.url.trim() : undefined;
|
||||
if (items.length >= MAX_ITEMS) return json(res, 400, { error: "too_many_items" });
|
||||
items.push({ id: randomUUID(), kind: "text", text: body.text.trim().slice(0, MAX_TEXT), url, at: new Date().toISOString() });
|
||||
await save(items);
|
||||
return json(res, 200, { ok: true });
|
||||
}
|
||||
json(res, 400, { error: "bad_request" });
|
||||
}
|
||||
|
||||
const NEWS_TICKER = process.env.NEWS_TICKER !== "0";
|
||||
const NEWS_TICKER_CENTRAL = process.env.NEWS_TICKER_CENTRAL !== "0";
|
||||
const LOCAL_ITEMS: NewsItem[] = (process.env.NEWS_TICKER_MESSAGES ?? "")
|
||||
.split("|")
|
||||
.map((text) => text.trim().slice(0, MAX_TEXT))
|
||||
.filter(Boolean)
|
||||
.map((text, i) => ({ id: `local-${i}-${text}`, kind: "text", text, at: "" }));
|
||||
|
||||
export function handleNewsConfig(res: ServerResponse) {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
res.setHeader("Cache-Control", "public, max-age=300");
|
||||
json(res, 200, NEWS_TICKER ? { enabled: true, central: NEWS_TICKER_CENTRAL, items: LOCAL_ITEMS } : { enabled: false });
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
// --- Receiving end of telemetry.ts ---------------------------------------------
|
||||
//
|
||||
// Only served by store-server.ts, and only with PING_DATA_FILE set. Keeps one
|
||||
// row per instance id: version, first and last seen. No IP addresses, no
|
||||
// request log. The admin view returns counts only.
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { readFile, rename, writeFile } from "node:fs/promises";
|
||||
import { clientIp, createRateLimiter } from "./net.js";
|
||||
import { isAdminRequest } from "./store.js";
|
||||
|
||||
const PING_DATA_FILE = process.env.PING_DATA_FILE;
|
||||
const MAX_INSTANCES = 20_000;
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
const isRateLimited = createRateLimiter(20, 60 * 60 * 1000);
|
||||
|
||||
interface Instance {
|
||||
version: string;
|
||||
firstSeen: string;
|
||||
lastSeen: string;
|
||||
}
|
||||
|
||||
let cache: Record<string, Instance> | null = null;
|
||||
|
||||
async function load(): Promise<Record<string, Instance>> {
|
||||
if (cache) return cache;
|
||||
try {
|
||||
cache = JSON.parse(await readFile(PING_DATA_FILE!, "utf-8")) as Record<string, Instance>;
|
||||
} catch (err) {
|
||||
if ((err as NodeJS.ErrnoException).code !== "ENOENT") throw err;
|
||||
cache = {};
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
async function save(instances: Record<string, Instance>) {
|
||||
// Instances silent for 90 days are gone for good.
|
||||
const cutoff = Date.now() - 90 * DAY_MS;
|
||||
for (const [id, i] of Object.entries(instances)) if (Date.parse(i.lastSeen) < cutoff) delete instances[id];
|
||||
const tmp = `${PING_DATA_FILE}.tmp`;
|
||||
await writeFile(tmp, JSON.stringify(instances), "utf-8");
|
||||
await rename(tmp, PING_DATA_FILE!);
|
||||
}
|
||||
|
||||
function json(res: ServerResponse, status: number, body: unknown) {
|
||||
res.writeHead(status, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify(body));
|
||||
}
|
||||
|
||||
export async function handlePing(req: IncomingMessage, res: ServerResponse, pathname: string) {
|
||||
if (!PING_DATA_FILE) return json(res, 404, { error: "not_found" });
|
||||
|
||||
if (pathname === "/api/ping/stats" && req.method === "GET") {
|
||||
if (!isAdminRequest(req)) return json(res, 401, { error: "unauthorized" });
|
||||
const now = Date.now();
|
||||
const instances = Object.values(await load());
|
||||
const activeSince = (days: number) => instances.filter((i) => now - Date.parse(i.lastSeen) < days * DAY_MS);
|
||||
const versions: Record<string, number> = {};
|
||||
for (const i of activeSince(30)) versions[i.version] = (versions[i.version] ?? 0) + 1;
|
||||
return json(res, 200, {
|
||||
active2d: activeSince(2).length,
|
||||
active7d: activeSince(7).length,
|
||||
active30d: activeSince(30).length,
|
||||
newLast7d: instances.filter((i) => now - Date.parse(i.firstSeen) < 7 * DAY_MS).length,
|
||||
versions,
|
||||
});
|
||||
}
|
||||
|
||||
if (pathname !== "/api/ping" || req.method !== "POST") return json(res, 405, { error: "method_not_allowed" });
|
||||
if (isRateLimited(clientIp(req))) return json(res, 429, { error: "rate_limited" });
|
||||
|
||||
let raw = "";
|
||||
for await (const chunk of req) {
|
||||
raw += chunk;
|
||||
if (raw.length > 500) return json(res, 413, { error: "payload_too_large" });
|
||||
}
|
||||
let body: { id?: unknown; version?: unknown };
|
||||
try {
|
||||
body = JSON.parse(raw || "{}");
|
||||
} catch {
|
||||
return json(res, 400, { error: "invalid_json" });
|
||||
}
|
||||
const { id, version } = body;
|
||||
if (typeof id !== "string" || !/^[0-9a-f-]{36}$/.test(id) || typeof version !== "string" || !/^[\w.+-]{1,40}$/.test(version)) {
|
||||
return json(res, 400, { error: "invalid_ping" });
|
||||
}
|
||||
|
||||
const instances = await load();
|
||||
const now = new Date().toISOString();
|
||||
const known = instances[id];
|
||||
if (!known && Object.keys(instances).length >= MAX_INSTANCES) return json(res, 507, { error: "full" });
|
||||
instances[id] = { version, firstSeen: known?.firstSeen ?? now, lastSeen: now };
|
||||
await save(instances);
|
||||
json(res, 200, { ok: true });
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Standalone Design Store: the same /api/store/* routes index.ts serves, in a
|
||||
// process of its own. Lets the store be redeployed or restarted without
|
||||
// dropping anyone's voice connection. Same image, different command:
|
||||
// node dist/store-server.js (with STORE_ENABLED=1)
|
||||
// The gateway in front of the same hostname then runs with STORE_ENABLED off
|
||||
// and the reverse proxy routes /api/store/* here.
|
||||
import { createServer } from "node:http";
|
||||
import { handleStore } from "./store.js";
|
||||
import { handlePing } from "./ping.js";
|
||||
import { handleNewsFeed } from "./news.js";
|
||||
|
||||
const PORT = Number(process.env.PORT ?? 8080);
|
||||
|
||||
createServer((req, res) => {
|
||||
res.setHeader("X-Content-Type-Options", "nosniff");
|
||||
const { pathname } = new URL(req.url ?? "/", "http://localhost");
|
||||
if (pathname === "/healthz") {
|
||||
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
|
||||
res.end("ok\n");
|
||||
return;
|
||||
}
|
||||
if (pathname === "/api/store/admin" || pathname === "/api/store/themes" || pathname.startsWith("/api/store/themes/")) {
|
||||
handleStore(req, res, pathname).catch((err) => {
|
||||
console.error("[store] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (pathname === "/api/store/news" || pathname === "/api/store/news/admin") {
|
||||
handleNewsFeed(req, res, pathname).catch((err) => {
|
||||
console.error("[news] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (pathname === "/api/ping" || pathname === "/api/ping/stats") {
|
||||
handlePing(req, res, pathname).catch((err) => {
|
||||
console.error("[ping] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.writeHead(404, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "not_found" }));
|
||||
}).listen(PORT, () => console.log(`WebSpeak3 store listening on http://localhost:${PORT}`));
|
||||
+14
-2
@@ -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
|
||||
@@ -136,7 +136,7 @@ async function saveStoreThemes(themes: StoreTheme[]): Promise<void> {
|
||||
await rename(tmp, STORE_DATA_FILE);
|
||||
}
|
||||
|
||||
function isAdminRequest(req: IncomingMessage): boolean {
|
||||
export function isAdminRequest(req: IncomingMessage): boolean {
|
||||
const authHeader = req.headers.authorization ?? "";
|
||||
return authHeader.startsWith("Bearer ") && isValidStoreAdminToken(authHeader.slice("Bearer ".length));
|
||||
}
|
||||
@@ -147,6 +147,11 @@ function isPublic(theme: StoreTheme): boolean {
|
||||
return theme.status === "approved" && isSafeThemeCss(theme.css);
|
||||
}
|
||||
|
||||
/** Newest public design, for the news ticker (news.ts). */
|
||||
export async function latestPublicTheme(): Promise<StoreTheme | undefined> {
|
||||
return (await loadStoreThemes()).filter(isPublic).sort((a, b) => b.createdAt.localeCompare(a.createdAt))[0];
|
||||
}
|
||||
|
||||
// Same in-memory-per-IP approach as FEEDBACK_RATE_LIMIT in index.ts; kept as a
|
||||
// separate map since the two endpoints are independent.
|
||||
const STORE_RATE_LIMIT = 5;
|
||||
@@ -367,6 +372,13 @@ async function handleStoreSubmit(req: IncomingMessage, res: ServerResponse) {
|
||||
}
|
||||
|
||||
const themes = await loadStoreThemes();
|
||||
// Re-uploading an installed store theme unchanged would just duplicate it.
|
||||
const cssKey = normalizeCss(css).replace(/\s+/g, "");
|
||||
if (themes.some((t) => normalizeCss(t.css).replace(/\s+/g, "") === cssKey)) {
|
||||
res.writeHead(409, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "duplicate" }));
|
||||
return;
|
||||
}
|
||||
if (themes.length >= STORE_MAX_THEMES) {
|
||||
res.writeHead(507, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "store_full" }));
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
// --- Anonymous usage ping ----------------------------------------------------
|
||||
//
|
||||
// Once at startup and then once a day, the gateway tells webspeak3.de that an
|
||||
// instance is running. That's the only way to know whether anyone self-hosts
|
||||
// at all, and which versions are still out there (e.g. before dropping
|
||||
// support for something or after a security fix).
|
||||
//
|
||||
// Sent: a random instance id (generated here, used for nothing else) and the
|
||||
// version. Not sent: hostnames, TeamSpeak servers, user counts, settings.
|
||||
// The receiving side stores no IP addresses (see ping.ts).
|
||||
//
|
||||
// On by default, off with TELEMETRY=0. Said so in the startup log, too.
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import path from "node:path";
|
||||
|
||||
const TELEMETRY_URL = process.env.TELEMETRY_URL || "https://gateway.webspeak3.de/api/ping";
|
||||
const VERSION = process.env.WEBSPEAK3_VERSION || "unknown";
|
||||
// ponytail: without a volume over the working directory a container recreate
|
||||
// makes a new id, so an update counts twice for a day or so.
|
||||
const ID_FILE = process.env.TELEMETRY_ID_FILE ?? path.resolve(process.cwd(), "instance-id");
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
|
||||
async function instanceId(): Promise<string> {
|
||||
try {
|
||||
const id = (await readFile(ID_FILE, "utf-8")).trim();
|
||||
if (/^[0-9a-f-]{36}$/.test(id)) return id;
|
||||
} catch {
|
||||
// first start - fall through
|
||||
}
|
||||
const id = randomUUID();
|
||||
await writeFile(ID_FILE, id + "\n").catch(() => {});
|
||||
return id;
|
||||
}
|
||||
|
||||
async function ping(id: string) {
|
||||
try {
|
||||
await fetch(TELEMETRY_URL, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id, version: VERSION }),
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
});
|
||||
} catch {
|
||||
// Offline or blocked - not worth a log line every day.
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.TELEMETRY !== "0") {
|
||||
console.log(
|
||||
`Sending an anonymous usage ping (random instance id + version ${VERSION}) to ${new URL(TELEMETRY_URL).host} at startup and once a day. Disable with TELEMETRY=0.`
|
||||
);
|
||||
void instanceId().then((id) => {
|
||||
void ping(id);
|
||||
setInterval(() => void ping(id), DAY_MS).unref();
|
||||
});
|
||||
}
|
||||
@@ -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}`);
|
||||
|
||||
+145
-1
@@ -74,7 +74,21 @@
|
||||
}
|
||||
|
||||
/* Nova: alternate design, independent of the light/dark toggle (always dark). */
|
||||
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap");
|
||||
/* Self-hosted (OFL) so no visitor IP goes to Google Fonts. */
|
||||
@font-face {
|
||||
font-family: "Manrope";
|
||||
font-weight: 500 800;
|
||||
font-display: swap;
|
||||
src: url("./assets/fonts/manrope-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Manrope";
|
||||
font-weight: 500 800;
|
||||
font-display: swap;
|
||||
src: url("./assets/fonts/manrope-latin-ext.woff2") format("woff2");
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
:where(.ts-app.ts-design-nova) {
|
||||
--success: oklch(0.75 0.15 150);
|
||||
@@ -1720,6 +1734,28 @@
|
||||
margin: 0 0.2rem;
|
||||
}
|
||||
|
||||
.ts-ptt-button {
|
||||
/* Holding it on a phone must not scroll, zoom or pop the long-press menu */
|
||||
touch-action: none;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
|
||||
.ts-ptt-key-listening {
|
||||
outline: 2px solid var(--accent);
|
||||
}
|
||||
|
||||
.ts-hotkeys-table td {
|
||||
padding: 0.2rem 1rem 0.2rem 0;
|
||||
}
|
||||
|
||||
.ts-hotkeys-table kbd {
|
||||
font-family: inherit;
|
||||
padding: 0.05rem 0.4rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-icon-slider,
|
||||
.ts-icon-select {
|
||||
display: flex;
|
||||
@@ -2004,6 +2040,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;
|
||||
@@ -2556,6 +2605,74 @@
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-news-ticker {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
background: var(--log-bg);
|
||||
color: var(--log-text);
|
||||
padding: 0.15rem 0.6rem;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-news-label {
|
||||
font-weight: 600;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-news-track {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-news-scroll {
|
||||
display: inline-block;
|
||||
/* Starts just off the right edge and runs until fully off the left one,
|
||||
so every message is on screen exactly once per pass. */
|
||||
padding-left: 100%;
|
||||
animation: ts-news-scroll linear infinite;
|
||||
}
|
||||
|
||||
.ts-news-ticker:hover .ts-news-scroll {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
|
||||
.ts-news-item {
|
||||
padding-right: 3rem;
|
||||
}
|
||||
|
||||
.ts-news-item a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.ts-news-close {
|
||||
flex-shrink: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
padding: 0 0.2rem;
|
||||
}
|
||||
|
||||
@keyframes ts-news-scroll {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
to {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ts-news-scroll {
|
||||
padding-left: 0;
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.ts-log-info {
|
||||
color: var(--log-text);
|
||||
}
|
||||
@@ -2626,6 +2743,33 @@
|
||||
width: 520px;
|
||||
}
|
||||
|
||||
.ts-about-dialog {
|
||||
width: 440px;
|
||||
}
|
||||
|
||||
.ts-about-memorial {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin: 16px 0 0;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-about-memorial img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-about-memorial figcaption {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.ts-client-log-dialog {
|
||||
width: 760px;
|
||||
}
|
||||
|
||||
+848
-83
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Lazy loader for Google WebRTC's AEC3 (compiled to WASM via
|
||||
// @ennuicastr/webrtcaec3.js), an opt-in, stronger alternative to the browser's
|
||||
// native echo cancellation for speaker+mic (no headset) setups where native
|
||||
// AEC often isn't enough (github.com/Moepchi/webspeak3 issue #2). Loaded as a
|
||||
// AEC often isn't enough (github.com/WebSpeak3/webspeak3 issue #2). Loaded as a
|
||||
// plain <script> tag rather than bundled: the module's own glue code resolves
|
||||
// its .wasm file next to its own <script src>, by a name it decides itself -
|
||||
// see scripts/sync-aec3-assets.mjs for how that file gets there.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,93 @@
|
||||
Copyright 2018 The Manrope Project Authors (https://github.com/googlefonts/manrope)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+146
-12
@@ -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/WebSpeak3/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
@@ -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) {
|
||||
|
||||
@@ -0,0 +1,703 @@
|
||||
{
|
||||
"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",
|
||||
"news.label": "Novinky",
|
||||
"news.release": "Vyšel WebSpeak3 {version}",
|
||||
"news.theme": "Nový vzhled v obchodě: „{name}“ od {author}",
|
||||
"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.bug.environment": "Prohlížeč a operační systém",
|
||||
"feedback.dialog.bug.server": "TeamSpeak server (volitelné – zůstává soukromé, nikdy se nezveřejní)",
|
||||
"feedback.dialog.bug.steps": "Co jste dělali těsně předtím? (volitelné)",
|
||||
"feedback.dialog.bug.stepsPlaceholder": "např. vstup do kanálu, změna výstupního zařízení… Pomohlo znovu načíst stránku?",
|
||||
"feedback.dialog.bug.diagnostics": "Odesílané technické údaje",
|
||||
"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",
|
||||
"toolbar.pushToTalk": "Držte pro mluvení",
|
||||
"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.idePixelFont": "Pixelové terminálové písmo",
|
||||
"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.duplicate": "Tento vzhled už v obchodě je. Před dalším zveřejněním ho trochu upravte.",
|
||||
"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.pttKey": "Klávesa Push-To-Talk:",
|
||||
"recording.pttKeyNone": "Nenastaveno",
|
||||
"recording.pttKeyPress": "Stiskněte klávesu nebo tlačítko myši…",
|
||||
"recording.pttHint": "Funguje jakákoli klávesa nebo tlačítko myši (prostřední či boční), ale jen když je WebSpeak3 aktivní okno. Prohlížeče nedovolí webovým stránkám vidět vstup z jiných programů, takže ve hře to nefunguje. Můžete také podržet tlačítko 🗣️ na panelu nástrojů.",
|
||||
"hotkeys.subtitle": "Klávesové a myší zkratky",
|
||||
"hotkeys.pttEnabled": "Použít Push-To-Talk (místo aktivace hlasem)",
|
||||
"hotkeys.shortcuts": "Zkratky",
|
||||
"hotkeys.shortcutsHint": "Nefungují, když píšete do textového pole.",
|
||||
"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.event.mute": "Přepnutí ztlumení",
|
||||
"sounds.event.micClickOn": "Kliknutí mikrofonu zap.",
|
||||
"sounds.event.micClickOff": "Kliknutí mikrofonu vyp.",
|
||||
"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",
|
||||
"about.text": "WebSpeak3 je TeamSpeak klient pro prohlížeč, open source a bez instalace.",
|
||||
"about.memorial.title": "Na památku Akima",
|
||||
"about.memorial.text": "Odešel přes duhový most 21. 10. 2026. 🌈🐾",
|
||||
"about.close": "Zavřít"
|
||||
}
|
||||
+30
-1
@@ -42,6 +42,9 @@
|
||||
"donate.title": "WebSpeak3 auf Ko-fi unterstützen",
|
||||
"pwa.updateAvailable": "Neue Version verfügbar",
|
||||
"pwa.reload": "Neu laden",
|
||||
"news.label": "News",
|
||||
"news.release": "WebSpeak3 {version} ist erschienen",
|
||||
"news.theme": "Neues Design im Store: „{name}“ von {author}",
|
||||
"feedback.dialog.title": "Feedback",
|
||||
"feedback.dialog.intro": "Melde einen Fehler oder teile eine Idee zur Weiterentwicklung von WebSpeak3 mit.",
|
||||
"feedback.dialog.category": "Kategorie",
|
||||
@@ -56,6 +59,11 @@
|
||||
"feedback.dialog.publishAsIssue": "Als öffentliches GitHub-Issue veröffentlichen",
|
||||
"feedback.dialog.publishAsIssueHint": "Ohne Haken bleibt dein Feedback privat und geht nur an den Betreiber.",
|
||||
"feedback.dialog.publishAsIssueHintBug": "Fehlermeldungen werden immer als öffentliches GitHub-Issue veröffentlicht.",
|
||||
"feedback.dialog.bug.environment": "Browser & Betriebssystem",
|
||||
"feedback.dialog.bug.server": "TeamSpeak-Server (optional – bleibt privat, wird nie veröffentlicht)",
|
||||
"feedback.dialog.bug.steps": "Was hast du direkt davor gemacht? (optional)",
|
||||
"feedback.dialog.bug.stepsPlaceholder": "z. B. Channel betreten, Ausgabegerät gewechselt… Hat Neuladen der Seite geholfen?",
|
||||
"feedback.dialog.bug.diagnostics": "Mitgesendete technische Details",
|
||||
"feedback.dialog.send": "Senden",
|
||||
"feedback.dialog.cancel": "Abbrechen",
|
||||
"restartNotice.title": "Kurze Unterbrechung",
|
||||
@@ -90,6 +98,7 @@
|
||||
"toolbar.micMute": "Mikrofon stummschalten",
|
||||
"toolbar.micUnmute": "Mikrofon aktivieren (unmute)",
|
||||
"toolbar.vadSensitivity": "Empfindlichkeit der Sprachaktivierung",
|
||||
"toolbar.pushToTalk": "Zum Sprechen gedrückt halten",
|
||||
"tabAudio.start": "Ton eines Tabs oder Fensters in den Sprachkanal geben (mit Kopfhörer kein Echo)",
|
||||
"tabAudio.stop": "Ton-Freigabe beenden",
|
||||
"tabAudio.noAudio": "Es wurde kein Ton freigegeben. Im Auswahldialog einen Tab oder ein Fenster wählen und den Ton einschalten.",
|
||||
@@ -276,6 +285,9 @@
|
||||
"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.idePixelFont": "Pixel-Terminal-Schrift",
|
||||
"design.status.connected": "Verbunden",
|
||||
"design.custom.new": "+ Neues Design",
|
||||
"design.custom.import": "Design importieren",
|
||||
@@ -320,6 +332,7 @@
|
||||
"design.store.publish.submit": "Im Store veröffentlichen",
|
||||
"design.store.publish.success": "Design wurde veröffentlicht!",
|
||||
"design.store.publish.pending": "Danke! Dein Design wurde eingereicht und erscheint im Store, sobald es geprüft wurde.",
|
||||
"design.store.publish.duplicate": "Dieses Design ist schon im Store. Ändere es etwas, bevor du es erneut veröffentlichst.",
|
||||
"design.store.publish.error": "Veröffentlichen fehlgeschlagen.",
|
||||
"options.section.erweiterungen": "Erweiterungen",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
@@ -338,6 +351,7 @@
|
||||
"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.",
|
||||
@@ -362,6 +376,14 @@
|
||||
"recording.device": "Aufnahmegerät:",
|
||||
"recording.activation": "Aktivierung",
|
||||
"recording.pushToTalk": "Push-To-Talk",
|
||||
"recording.pttKey": "Push-To-Talk-Taste:",
|
||||
"recording.pttKeyNone": "Nicht festgelegt",
|
||||
"recording.pttKeyPress": "Taste oder Maustaste drücken…",
|
||||
"recording.pttHint": "Jede Taste oder Maustaste (mittlere oder Seitentasten) geht, aber nur solange WebSpeak3 das aktive Fenster ist. Browser lassen Webseiten keine Eingaben aus anderen Programmen sehen, im Spiel klappt es also nicht. Alternativ den 🗣️-Knopf in der Toolbar gedrückt halten.",
|
||||
"hotkeys.subtitle": "Tastatur- und Maus-Kürzel",
|
||||
"hotkeys.pttEnabled": "Push-To-Talk verwenden (statt Sprachaktivierung)",
|
||||
"hotkeys.shortcuts": "Tastenkürzel",
|
||||
"hotkeys.shortcutsHint": "Greifen nicht, während du in ein Textfeld tippst.",
|
||||
"recording.continuous": "Dauersenden",
|
||||
"recording.voiceActivation": "Automatische Spracherkennung",
|
||||
"recording.testStart": "Test starten",
|
||||
@@ -644,6 +666,9 @@
|
||||
"sounds.event.clientLeave": "Client geht",
|
||||
"sounds.event.message": "Nachricht empfangen",
|
||||
"sounds.event.poke": "Anstupsen erhalten",
|
||||
"sounds.event.mute": "Stummschaltung umgeschaltet",
|
||||
"sounds.event.micClickOn": "Mikro Klick an",
|
||||
"sounds.event.micClickOff": "Mikro Klick aus",
|
||||
"sounds.default": "Standard",
|
||||
"sounds.custom": "Eigene Datei: {name}",
|
||||
"sounds.test": "▶ Testen",
|
||||
@@ -670,5 +695,9 @@
|
||||
"log.fileTransferInvalidAddress": "Dateiübertragung fehlgeschlagen (ungültige Adresse)",
|
||||
"sounds.importFailed": "Das Soundpack konnte nicht gelesen werden – ist es eine gültige .ts3soundpack-/ZIP-Datei?",
|
||||
"tabs.connections": "Server-Verbindungen",
|
||||
"shortcut.ctrl": "Strg"
|
||||
"shortcut.ctrl": "Strg",
|
||||
"about.text": "WebSpeak3 ist ein TeamSpeak-Client für den Browser, quelloffen und ohne Installation.",
|
||||
"about.memorial.title": "In Erinnerung an Akimo",
|
||||
"about.memorial.text": "Am 21.10.2026 über die Regenbogenbrücke gegangen. 🌈🐾",
|
||||
"about.close": "Schließen"
|
||||
}
|
||||
+30
-1
@@ -42,6 +42,9 @@
|
||||
"donate.title": "Support WebSpeak3 on Ko-fi",
|
||||
"pwa.updateAvailable": "New version available",
|
||||
"pwa.reload": "Reload",
|
||||
"news.label": "News",
|
||||
"news.release": "WebSpeak3 {version} is out",
|
||||
"news.theme": "New design in the store: \"{name}\" by {author}",
|
||||
"feedback.dialog.title": "Feedback",
|
||||
"feedback.dialog.intro": "Report a bug or share an idea to help improve WebSpeak3.",
|
||||
"feedback.dialog.category": "Category",
|
||||
@@ -56,6 +59,11 @@
|
||||
"feedback.dialog.publishAsIssue": "Publish as a public GitHub issue",
|
||||
"feedback.dialog.publishAsIssueHint": "Leave unchecked to keep your feedback private, visible only to the maintainer.",
|
||||
"feedback.dialog.publishAsIssueHintBug": "Bug reports are always published as a public GitHub issue.",
|
||||
"feedback.dialog.bug.environment": "Browser & operating system",
|
||||
"feedback.dialog.bug.server": "TeamSpeak server (optional – stays private, never published)",
|
||||
"feedback.dialog.bug.steps": "What did you do right before? (optional)",
|
||||
"feedback.dialog.bug.stepsPlaceholder": "e.g. joined a channel, switched output device… Did reloading the page help?",
|
||||
"feedback.dialog.bug.diagnostics": "Technical details sent along",
|
||||
"feedback.dialog.send": "Send",
|
||||
"restartNotice.title": "Brief interruption",
|
||||
"restartNotice.body": "The server is about to restart briefly. Your connection will drop for a moment.",
|
||||
@@ -90,6 +98,7 @@
|
||||
"toolbar.micMute": "Mute microphone",
|
||||
"toolbar.micUnmute": "Unmute microphone",
|
||||
"toolbar.vadSensitivity": "Voice activation sensitivity",
|
||||
"toolbar.pushToTalk": "Hold to talk",
|
||||
"tabAudio.start": "Share tab or window audio into the voice channel (headphones avoid an echo)",
|
||||
"tabAudio.stop": "Stop sharing audio",
|
||||
"tabAudio.noAudio": "No audio was shared. In the picker, choose a tab or window and turn on its audio.",
|
||||
@@ -276,6 +285,9 @@
|
||||
"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.idePixelFont": "Pixel terminal font",
|
||||
"design.status.connected": "Connected",
|
||||
"design.custom.new": "+ New design",
|
||||
"design.custom.import": "Import design",
|
||||
@@ -320,6 +332,7 @@
|
||||
"design.store.publish.submit": "Publish to the store",
|
||||
"design.store.publish.success": "Design published!",
|
||||
"design.store.publish.pending": "Thanks! Your design was submitted and will appear in the store once it has been reviewed.",
|
||||
"design.store.publish.duplicate": "This design is already in the store. Change it a little before publishing it again.",
|
||||
"design.store.publish.error": "Publishing failed.",
|
||||
"options.section.erweiterungen": "Addons",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
@@ -338,6 +351,7 @@
|
||||
"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.",
|
||||
@@ -362,6 +376,14 @@
|
||||
"recording.device": "Capture device:",
|
||||
"recording.activation": "Activation",
|
||||
"recording.pushToTalk": "Push-To-Talk",
|
||||
"recording.pttKey": "Push-to-talk key:",
|
||||
"recording.pttKeyNone": "Not set",
|
||||
"recording.pttKeyPress": "Press a key or mouse button…",
|
||||
"recording.pttHint": "Any key or mouse button (middle or side buttons) works, but only while WebSpeak3 is the active window. Browsers don't let websites see input in other programs, so it won't work while you're in a game. You can also hold the 🗣️ button in the toolbar.",
|
||||
"hotkeys.subtitle": "Keyboard and mouse shortcuts",
|
||||
"hotkeys.pttEnabled": "Use push-to-talk (instead of voice activation)",
|
||||
"hotkeys.shortcuts": "Shortcuts",
|
||||
"hotkeys.shortcutsHint": "These don't fire while you're typing in a text field.",
|
||||
"recording.continuous": "Continuous transmission",
|
||||
"recording.voiceActivation": "Voice activation detection",
|
||||
"recording.testStart": "Start test",
|
||||
@@ -644,6 +666,9 @@
|
||||
"sounds.event.clientLeave": "Client leaves",
|
||||
"sounds.event.message": "Message received",
|
||||
"sounds.event.poke": "Poke received",
|
||||
"sounds.event.mute": "Mute toggled",
|
||||
"sounds.event.micClickOn": "Mic click on",
|
||||
"sounds.event.micClickOff": "Mic click off",
|
||||
"sounds.default": "Default",
|
||||
"sounds.custom": "Custom file: {name}",
|
||||
"sounds.test": "▶ Test",
|
||||
@@ -670,5 +695,9 @@
|
||||
"log.fileTransferInvalidAddress": "File transfer failed (invalid address)",
|
||||
"sounds.importFailed": "Could not read this soundpack - is it a valid .ts3soundpack/ZIP file?",
|
||||
"tabs.connections": "Server connections",
|
||||
"shortcut.ctrl": "Ctrl"
|
||||
"shortcut.ctrl": "Ctrl",
|
||||
"about.text": "WebSpeak3 is a TeamSpeak client for the browser, open source and with nothing to install.",
|
||||
"about.memorial.title": "In memory of Akimo",
|
||||
"about.memorial.text": "Crossed the rainbow bridge on October 21, 2026. 🌈🐾",
|
||||
"about.close": "Close"
|
||||
}
|
||||
+30
-1
@@ -42,6 +42,9 @@
|
||||
"donate.title": "حمایت از WebSpeak3 در Ko-fi",
|
||||
"pwa.updateAvailable": "نسخه جدید موجود است",
|
||||
"pwa.reload": "بارگذاری مجدد",
|
||||
"news.label": "اخبار",
|
||||
"news.release": "WebSpeak3 {version} منتشر شد",
|
||||
"news.theme": "طرح جدید در فروشگاه: «{name}» از {author}",
|
||||
"feedback.dialog.title": "بازخورد",
|
||||
"feedback.dialog.intro": "یک اشکال گزارش بده یا ایدهای برای بهبود WebSpeak3 به اشتراک بگذار.",
|
||||
"feedback.dialog.category": "دسته",
|
||||
@@ -56,6 +59,11 @@
|
||||
"feedback.dialog.publishAsIssue": "بهصورت Issue عمومی در گیتهاب منتشر شود",
|
||||
"feedback.dialog.publishAsIssueHint": "اگر تیک نزنی، بازخوردت خصوصی میماند و فقط برای مدیر پروژه قابل مشاهده است.",
|
||||
"feedback.dialog.publishAsIssueHintBug": "گزارش اشکالها همیشه بهصورت Issue عمومی در گیتهاب منتشر میشوند.",
|
||||
"feedback.dialog.bug.environment": "مرورگر و سیستمعامل",
|
||||
"feedback.dialog.bug.server": "سرور TeamSpeak (اختیاری – خصوصی میماند و هرگز منتشر نمیشود)",
|
||||
"feedback.dialog.bug.steps": "درست قبل از آن چه کاری کردید؟ (اختیاری)",
|
||||
"feedback.dialog.bug.stepsPlaceholder": "مثلاً ورود به کانال، تغییر دستگاه خروجی… آیا بارگذاری مجدد صفحه کمک کرد؟",
|
||||
"feedback.dialog.bug.diagnostics": "جزئیات فنی ارسالشده",
|
||||
"feedback.dialog.send": "ارسال",
|
||||
"restartNotice.title": "وقفه کوتاه",
|
||||
"restartNotice.body": "سرور بهزودی برای مدت کوتاهی مجدداً راهاندازی میشود. اتصال شما لحظهای قطع خواهد شد.",
|
||||
@@ -90,6 +98,7 @@
|
||||
"toolbar.micMute": "بیصدا کردن میکروفون",
|
||||
"toolbar.micUnmute": "فعال کردن صدای میکروفون",
|
||||
"toolbar.vadSensitivity": "حساسیت فعالسازی صوتی",
|
||||
"toolbar.pushToTalk": "برای صحبت نگه دارید",
|
||||
"tabAudio.start": "صدای یک زبانه یا پنجره را در کانال صوتی پخش کن (با هدفون پژواک ایجاد نمیشود)",
|
||||
"tabAudio.stop": "توقف اشتراک صدا",
|
||||
"tabAudio.noAudio": "صدایی به اشتراک گذاشته نشد. در پنجره انتخاب، یک زبانه یا پنجره را انتخاب و صدای آن را روشن کنید.",
|
||||
@@ -276,6 +285,9 @@
|
||||
"design.theme.greenteaspeak.desc": "چیدمان کلاسیک کلاینت GreenTeaSpeak با پنلهای تیره و نوار منوی طلایی.",
|
||||
"design.theme.pulse": "Pulse",
|
||||
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "چیدمانی فنی و تخت به سبک IDE برای کاربران حرفهای.",
|
||||
"design.idePixelFont": "فونت پیکسلی ترمینال",
|
||||
"design.status.connected": "متصل",
|
||||
"design.custom.new": "+ طراحی جدید",
|
||||
"design.custom.import": "وارد کردن طراحی",
|
||||
@@ -320,6 +332,7 @@
|
||||
"design.store.publish.submit": "انتشار در فروشگاه",
|
||||
"design.store.publish.success": "طراحی منتشر شد!",
|
||||
"design.store.publish.pending": "ممنون! طراحی تو ارسال شد و پس از بررسی در فروشگاه نمایش داده میشود.",
|
||||
"design.store.publish.duplicate": "این طرح از قبل در فروشگاه وجود دارد. قبل از انتشار دوباره، کمی آن را تغییر دهید.",
|
||||
"design.store.publish.error": "انتشار ناموفق بود.",
|
||||
"options.section.erweiterungen": "افزونهها",
|
||||
"options.section.hotkeys": "کلیدهای میانبر",
|
||||
@@ -338,6 +351,7 @@
|
||||
"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 شما را میبیند.",
|
||||
@@ -362,6 +376,14 @@
|
||||
"recording.device": "دستگاه ضبط:",
|
||||
"recording.activation": "فعالسازی",
|
||||
"recording.pushToTalk": "فشار برای صحبت (Push-To-Talk)",
|
||||
"recording.pttKey": "کلید Push-To-Talk:",
|
||||
"recording.pttKeyNone": "تنظیم نشده",
|
||||
"recording.pttKeyPress": "یک کلید یا دکمه ماوس را فشار دهید…",
|
||||
"recording.pttHint": "هر کلید یا دکمه ماوس (دکمه وسط یا کناری) کار میکند، اما فقط وقتی WebSpeak3 پنجره فعال باشد. مرورگرها اجازه نمیدهند وبسایتها ورودی برنامههای دیگر را ببینند، پس داخل بازی کار نمیکند. میتوانید دکمه 🗣️ را در نوار ابزار نگه دارید.",
|
||||
"hotkeys.subtitle": "میانبرهای صفحهکلید و ماوس",
|
||||
"hotkeys.pttEnabled": "استفاده از Push-To-Talk (به جای فعالسازی صوتی)",
|
||||
"hotkeys.shortcuts": "میانبرها",
|
||||
"hotkeys.shortcutsHint": "هنگام تایپ در یک فیلد متنی کار نمیکنند.",
|
||||
"recording.continuous": "ارسال پیوسته",
|
||||
"recording.voiceActivation": "تشخیص فعالسازی صوتی",
|
||||
"recording.testStart": "شروع آزمایش",
|
||||
@@ -643,6 +665,9 @@
|
||||
"sounds.event.clientLeave": "خروج کاربر",
|
||||
"sounds.event.message": "پیام دریافت شد",
|
||||
"sounds.event.poke": "سقلمه دریافت شد",
|
||||
"sounds.event.mute": "تغییر حالت بیصدا",
|
||||
"sounds.event.micClickOn": "کلیک میکروفون روشن",
|
||||
"sounds.event.micClickOff": "کلیک میکروفون خاموش",
|
||||
"sounds.default": "پیشفرض",
|
||||
"sounds.custom": "فایل سفارشی: {name}",
|
||||
"sounds.test": "▶ آزمایش",
|
||||
@@ -669,5 +694,9 @@
|
||||
"log.fileTransferInvalidAddress": "انتقال فایل ناموفق بود (نشانی نامعتبر)",
|
||||
"sounds.importFailed": "این بسته صدا خوانده نشد - آیا یک فایل .ts3soundpack/ZIP معتبر است؟",
|
||||
"tabs.connections": "اتصالهای سرور",
|
||||
"shortcut.ctrl": "Ctrl"
|
||||
"shortcut.ctrl": "Ctrl",
|
||||
"about.text": "WebSpeak3 یک کلاینت TeamSpeak برای مرورگر است، متنباز و بدون نیاز به نصب.",
|
||||
"about.memorial.title": "به یاد Akimo",
|
||||
"about.memorial.text": "در ۲۱ اکتبر ۲۰۲۶ از پل رنگینکمان گذشت. 🌈🐾",
|
||||
"about.close": "بستن"
|
||||
}
|
||||
@@ -43,6 +43,7 @@
|
||||
"toolbar.micMute": "麦克风静音",
|
||||
"toolbar.micUnmute": "取消麦克风静音",
|
||||
"toolbar.vadSensitivity": "语音激活灵敏度",
|
||||
"toolbar.pushToTalk": "按住说话",
|
||||
"tabAudio.start": "将标签页或窗口的声音共享到语音频道(戴耳机可避免回声)",
|
||||
"tabAudio.stop": "停止共享声音",
|
||||
"tabAudio.noAudio": "没有共享声音。请在选择窗口中选择标签页或窗口,并开启其声音。",
|
||||
@@ -223,6 +224,9 @@
|
||||
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
|
||||
"design.theme.pulse": "Pulse",
|
||||
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "面向高级用户的扁平化 IDE 风格技术布局。",
|
||||
"design.idePixelFont": "像素终端字体",
|
||||
"design.status.connected": "已连接",
|
||||
"options.section.erweiterungen": "扩展",
|
||||
"options.section.hotkeys": "快捷键",
|
||||
@@ -241,6 +245,7 @@
|
||||
"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 地址。",
|
||||
@@ -265,6 +270,14 @@
|
||||
"recording.device": "录音设备:",
|
||||
"recording.activation": "激活方式",
|
||||
"recording.pushToTalk": "按键说话",
|
||||
"recording.pttKey": "按键说话键:",
|
||||
"recording.pttKeyNone": "未设置",
|
||||
"recording.pttKeyPress": "请按下按键或鼠标按键…",
|
||||
"recording.pttHint": "可使用任意按键或鼠标按键(中键或侧键),但仅在 WebSpeak3 为当前活动窗口时有效。浏览器不允许网站读取其他程序中的输入,因此在游戏中无法使用。也可以按住工具栏中的 🗣️ 按钮。",
|
||||
"hotkeys.subtitle": "键盘和鼠标快捷键",
|
||||
"hotkeys.pttEnabled": "使用按键说话(代替语音激活)",
|
||||
"hotkeys.shortcuts": "快捷键",
|
||||
"hotkeys.shortcutsHint": "在文本框中输入时不会触发。",
|
||||
"recording.continuous": "持续传输",
|
||||
"recording.voiceActivation": "语音激活检测",
|
||||
"recording.testStart": "开始测试",
|
||||
@@ -498,6 +511,9 @@
|
||||
"sounds.event.clientLeave": "用户离开",
|
||||
"sounds.event.message": "收到消息",
|
||||
"sounds.event.poke": "收到戳一戳",
|
||||
"sounds.event.mute": "切换静音",
|
||||
"sounds.event.micClickOn": "麦克风开启提示音",
|
||||
"sounds.event.micClickOff": "麦克风关闭提示音",
|
||||
"sounds.default": "默认",
|
||||
"sounds.custom": "自定义文件:{name}",
|
||||
"sounds.test": "▶ 测试",
|
||||
@@ -526,6 +542,9 @@
|
||||
"donate.title": "在 Ko-fi 上支持 WebSpeak3",
|
||||
"pwa.updateAvailable": "有新版本可用",
|
||||
"pwa.reload": "重新加载",
|
||||
"news.label": "新闻",
|
||||
"news.release": "WebSpeak3 {version} 已发布",
|
||||
"news.theme": "商店新设计:“{name}”,作者 {author}",
|
||||
"feedback.dialog.title": "反馈",
|
||||
"feedback.dialog.intro": "报告一个问题,或分享改进 WebSpeak3 的想法。",
|
||||
"feedback.dialog.category": "类别",
|
||||
@@ -540,6 +559,11 @@
|
||||
"feedback.dialog.publishAsIssue": "作为公开的 GitHub Issue 发布",
|
||||
"feedback.dialog.publishAsIssueHint": "不勾选则反馈保持私密,仅维护者可见。",
|
||||
"feedback.dialog.publishAsIssueHintBug": "错误报告将始终作为公开的 GitHub Issue 发布。",
|
||||
"feedback.dialog.bug.environment": "浏览器和操作系统",
|
||||
"feedback.dialog.bug.server": "TeamSpeak 服务器(可选——保密,绝不公开)",
|
||||
"feedback.dialog.bug.steps": "出问题前你做了什么?(可选)",
|
||||
"feedback.dialog.bug.stepsPlaceholder": "例如:进入频道、切换输出设备…… 刷新页面后是否恢复?",
|
||||
"feedback.dialog.bug.diagnostics": "一并发送的技术信息",
|
||||
"feedback.dialog.send": "发送",
|
||||
"feedback.dialog.cancel": "取消",
|
||||
"feedback.dialog.sending": "发送中…",
|
||||
@@ -612,6 +636,7 @@
|
||||
"design.store.publish.submit": "发布到商店",
|
||||
"design.store.publish.success": "设计已发布!",
|
||||
"design.store.publish.pending": "谢谢!你的设计已提交,审核通过后将显示在商店中。",
|
||||
"design.store.publish.duplicate": "该设计已在商店中。请稍作修改后再发布。",
|
||||
"design.store.publish.error": "发布失败。",
|
||||
"recording.autoGainControl": "自动增益控制",
|
||||
"tree.streaming": "正在直播",
|
||||
@@ -669,5 +694,9 @@
|
||||
"log.fileTransferInvalidAddress": "文件传输失败(地址无效)",
|
||||
"sounds.importFailed": "无法读取此音效包——它是有效的 .ts3soundpack/ZIP 文件吗?",
|
||||
"tabs.connections": "服务器连接",
|
||||
"shortcut.ctrl": "Ctrl"
|
||||
"shortcut.ctrl": "Ctrl",
|
||||
"about.text": "WebSpeak3 是一款浏览器 TeamSpeak 客户端,开源且无需安装。",
|
||||
"about.memorial.title": "纪念 Akimo",
|
||||
"about.memorial.text": "于 2026 年 10 月 21 日走过彩虹桥。🌈🐾",
|
||||
"about.close": "关闭"
|
||||
}
|
||||
@@ -23,6 +23,9 @@ const EVENT_KEYWORDS: Record<SoundEventId, string[]> = {
|
||||
clientLeave: ["userleftchannel", "userleftvisibility", "clientleftview", "userleave", "userleft", "leave"],
|
||||
message: ["textmessagereceived", "chatmessage", "newmessage", "message"],
|
||||
poke: ["gotpoked", "poke"],
|
||||
mute: ["micmuted", "microphonemuted", "micactivated", "microphoneactivated"],
|
||||
micClickOn: ["micclickon"],
|
||||
micClickOff: ["micclickoff"],
|
||||
};
|
||||
|
||||
function normalize(filename: string): string {
|
||||
|
||||
+89
-10
@@ -1,6 +1,33 @@
|
||||
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke";
|
||||
export type SoundEventId =
|
||||
| "connect"
|
||||
| "disconnect"
|
||||
| "clientJoin"
|
||||
| "clientLeave"
|
||||
| "message"
|
||||
| "poke"
|
||||
| "mute"
|
||||
| "micClickOn"
|
||||
| "micClickOff";
|
||||
|
||||
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke"];
|
||||
export const SOUND_EVENTS: SoundEventId[] = [
|
||||
"connect",
|
||||
"disconnect",
|
||||
"clientJoin",
|
||||
"clientLeave",
|
||||
"message",
|
||||
"poke",
|
||||
"mute",
|
||||
"micClickOn",
|
||||
"micClickOff",
|
||||
];
|
||||
|
||||
/** "ide" swaps the default chimes for synthetic terminal blips (Command Center layout). */
|
||||
type SoundStyle = "classic" | "ide";
|
||||
let soundStyle: SoundStyle = "classic";
|
||||
|
||||
export function setSoundStyle(style: SoundStyle): void {
|
||||
soundStyle = style;
|
||||
}
|
||||
|
||||
const ENABLED_KEY = "webspeak3:sounds-enabled";
|
||||
const VOLUME_KEY = "webspeak3:sounds-volume";
|
||||
@@ -141,8 +168,8 @@ class NotificationSoundPlayer {
|
||||
const { context, destination } = this.ensure();
|
||||
if (context.state === "suspended") context.resume().catch(() => {});
|
||||
const now = context.currentTime;
|
||||
for (const note of synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, note.freq, note.duration, volume * note.gain);
|
||||
for (const note of soundStyle === "ide" ? ideNotes(event) : synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, volume * note.gain, note);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,13 +177,13 @@ class NotificationSoundPlayer {
|
||||
context: AudioContext,
|
||||
destination: AudioNode,
|
||||
startTime: number,
|
||||
freq: number,
|
||||
duration: number,
|
||||
peakGain: number
|
||||
peakGain: number,
|
||||
{ freq, endFreq, duration, type = "sine" }: SynthNote
|
||||
): void {
|
||||
const osc = context.createOscillator();
|
||||
osc.type = "sine";
|
||||
osc.frequency.value = freq;
|
||||
osc.type = type;
|
||||
osc.frequency.setValueAtTime(freq, startTime);
|
||||
if (endFreq) osc.frequency.exponentialRampToValueAtTime(endFreq, startTime + duration);
|
||||
const gain = context.createGain();
|
||||
gain.gain.setValueAtTime(0, startTime);
|
||||
gain.gain.linearRampToValueAtTime(peakGain, startTime + 0.02);
|
||||
@@ -169,7 +196,17 @@ class NotificationSoundPlayer {
|
||||
|
||||
/** Soft, modern two/three-note chimes - a sine-wave, quick-attack/exponential-decay
|
||||
* shape reads as gentle rather than the harsh square/saw beeps of classic UI sounds. */
|
||||
function synthNotes(event: SoundEventId): { delay: number; freq: number; duration: number; gain: number }[] {
|
||||
interface SynthNote {
|
||||
delay: number;
|
||||
freq: number;
|
||||
/** Glide to this frequency over the note's duration. */
|
||||
endFreq?: number;
|
||||
duration: number;
|
||||
gain: number;
|
||||
type?: OscillatorType;
|
||||
}
|
||||
|
||||
function synthNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
@@ -195,6 +232,48 @@ function synthNotes(event: SoundEventId): { delay: number; freq: number; duratio
|
||||
{ delay: 0, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
{ delay: 0.12, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 660, duration: 0.06, gain: 0.3 }];
|
||||
case "micClickOn":
|
||||
return [{ delay: 0, freq: 1400, duration: 0.03, gain: 0.15 }];
|
||||
case "micClickOff":
|
||||
return [{ delay: 0, freq: 900, duration: 0.03, gain: 0.15 }];
|
||||
}
|
||||
}
|
||||
|
||||
/** Command Center: short, dry, synthetic blips - square/triangle clicks and
|
||||
* quick arpeggios instead of soft chimes. Square waves are loud, so lower gains. */
|
||||
function ideNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
{ delay: 0, freq: 440, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.1, freq: 554.37, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.2, freq: 659.25, duration: 0.14, gain: 0.3 },
|
||||
];
|
||||
case "disconnect":
|
||||
return [{ delay: 0, freq: 200, endFreq: 50, duration: 0.2, gain: 0.45, type: "triangle" }];
|
||||
case "clientJoin":
|
||||
return [
|
||||
{ delay: 0, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
{ delay: 0.1, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
];
|
||||
case "clientLeave":
|
||||
return [{ delay: 0, freq: 600, endFreq: 400, duration: 0.09, gain: 0.18 }];
|
||||
case "message":
|
||||
return [{ delay: 0, freq: 1200, duration: 0.04, gain: 0.12, type: "square" }];
|
||||
case "poke":
|
||||
return [
|
||||
{ delay: 0, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.08, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.16, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 300, endFreq: 50, duration: 0.04, gain: 0.15, type: "square" }];
|
||||
case "micClickOn":
|
||||
return [{ delay: 0, freq: 1600, duration: 0.02, gain: 0.08, type: "square" }];
|
||||
case "micClickOff":
|
||||
return [{ delay: 0, freq: 1000, duration: 0.02, gain: 0.08, type: "square" }];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,717 @@
|
||||
/* 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. */
|
||||
|
||||
/* Pixel terminal font, self-hosted (OFL) so no visitor IP goes to Google Fonts.
|
||||
The file only downloads once an element actually uses it. */
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin-ext.woff2") format("woff2");
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
:where(.ts-app.ts-design-ide) {
|
||||
/* VT323 has no bold cut; faux-bold smears the pixels. */
|
||||
font-synthesis-weight: none;
|
||||
--ide-mono: VT323, "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: var(--ide-mono);
|
||||
--ide-panel: #18181b;
|
||||
--ide-faint: #71717a;
|
||||
--ide-accent-bg: rgba(16, 185, 129, 0.1);
|
||||
|
||||
font-family: var(--ide-font);
|
||||
/* VT323 has a tiny x-height and narrow glyphs: scale it up and space it out. */
|
||||
font-size-adjust: 0.55;
|
||||
letter-spacing: 0.05em;
|
||||
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;
|
||||
}
|
||||
|
||||
/* Terminal font everywhere, beating base rules that pick their own family */
|
||||
.ts-app.ts-design-ide:not(.ts-ide-plain-font) :is(*, *::before, *::after) {
|
||||
font-family: var(--ide-font);
|
||||
}
|
||||
|
||||
/* Pixel font switched off in the design options: sans UI, regular mono for the terminal bits */
|
||||
.ts-app.ts-design-ide.ts-ide-plain-font {
|
||||
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
font-size-adjust: none;
|
||||
letter-spacing: normal;
|
||||
font-synthesis-weight: auto;
|
||||
}
|
||||
|
||||
/* Form controls reset size adjust and spacing in the UA sheet instead of inheriting them */
|
||||
.ts-app.ts-design-ide :is(button, input, select, textarea) {
|
||||
font-size-adjust: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
/* ---------- 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 {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--border);
|
||||
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 {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 1;
|
||||
overflow-x: hidden;
|
||||
min-width: 16rem;
|
||||
padding: 0 0 0.5rem;
|
||||
border-right: 1px solid var(--border);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-side-panel {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 3;
|
||||
border-left: 1px solid var(--border);
|
||||
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 {
|
||||
font-family: var(--ide-mono);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
height: 2rem;
|
||||
padding: 0 1rem;
|
||||
margin-bottom: 0.4rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
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 {
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* ---------- Center: breadcrumb, voice grid, terminal ---------- */
|
||||
|
||||
.ts-app.ts-design-ide .ts-ide-breadcrumb {
|
||||
font-family: var(--ide-mono);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.3rem;
|
||||
height: 2rem;
|
||||
padding: 0 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
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 {
|
||||
font-family: var(--ide-mono);
|
||||
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-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 {
|
||||
font-family: var(--ide-mono);
|
||||
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-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 {
|
||||
font-family: var(--ide-mono);
|
||||
margin-top: 0.375rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
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 {
|
||||
font-family: var(--ide-mono);
|
||||
order: 2;
|
||||
padding: 1rem;
|
||||
background: var(--ide-panel);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-tab {
|
||||
font-family: var(--ide-mono);
|
||||
padding: 0 0 0.5rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
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 {
|
||||
font-family: var(--ide-mono);
|
||||
order: 3;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.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 {
|
||||
font-family: var(--ide-mono);
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
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) {
|
||||
letter-spacing: 0.05em;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: none;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Client log strip at the very bottom */
|
||||
.ts-app.ts-design-ide > .ts-log {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
+73
-12
@@ -54,7 +54,8 @@ export interface MicCaptureOptions {
|
||||
*
|
||||
* Uses voice activation (like TeamSpeak's own "Sprachaktivierung"): frames are
|
||||
* only sent while the input level is above `threshold`, plus a short hangover
|
||||
* so the tail of a word isn't cut off. `onActivity` reports transitions so the
|
||||
* so the tail of a word isn't cut off. With `pushToTalk` set, only while
|
||||
* `pttPressed` is. `onActivity` reports transitions so the
|
||||
* UI can show a local "currently transmitting" indicator.
|
||||
*/
|
||||
export class MicCapture {
|
||||
@@ -83,6 +84,15 @@ export class MicCapture {
|
||||
private context: AudioContext;
|
||||
threshold: number;
|
||||
hangoverSeconds: number;
|
||||
/** Push-to-talk: send while `pttPressed` instead of voice activation. */
|
||||
pushToTalk = false;
|
||||
pttPressed = false;
|
||||
/** Send all the time, no voice activation (ignored while pushToTalk). */
|
||||
continuous = false;
|
||||
/** Damp the mic right after a keystroke, so typing doesn't trigger
|
||||
* voice activation and is quieter while talking. See noteTyping(). */
|
||||
typingAttenuation = false;
|
||||
private typingUntil = 0;
|
||||
|
||||
constructor(context: AudioContext, options: MicCaptureOptions) {
|
||||
this.context = context;
|
||||
@@ -135,6 +145,10 @@ export class MicCapture {
|
||||
this.aec3.process(this.aec3Out, captureIn);
|
||||
input = this.aec3Out[0];
|
||||
}
|
||||
if (this.typingAttenuation && this.context.currentTime < this.typingUntil) {
|
||||
// Copy first: `raw` is the input buffer, not ours to change.
|
||||
input = input.map((v) => v * 0.1);
|
||||
}
|
||||
// Mirrors the (possibly AEC3-cancelled) signal to the output buffer, so
|
||||
// setMonitoring() below can tap what's actually being sent rather than
|
||||
// the raw pre-cancellation mic feed - a self-test through the raw feed
|
||||
@@ -148,8 +162,9 @@ export class MicCapture {
|
||||
|
||||
const now = this.context.currentTime;
|
||||
if (rms >= this.threshold) this.activeUntil = now + this.hangoverSeconds;
|
||||
const talking = this.pushToTalk ? this.pttPressed : this.continuous || now < this.activeUntil;
|
||||
// Shared audio (music, a video) has its own pauses; keep sending throughout.
|
||||
const shouldBeActive = this.extra !== null || now < this.activeUntil;
|
||||
const shouldBeActive = this.extra !== null || talking;
|
||||
if (shouldBeActive !== this.active) {
|
||||
this.active = shouldBeActive;
|
||||
this.onActivity?.(this.active);
|
||||
@@ -196,6 +211,11 @@ export class MicCapture {
|
||||
this.silence.connect(this.context.destination);
|
||||
}
|
||||
|
||||
/** Call on every keystroke; with typingAttenuation on, the next ~0.2 s are damped. */
|
||||
noteTyping(): void {
|
||||
this.typingUntil = this.context.currentTime + 0.2;
|
||||
}
|
||||
|
||||
/** Mixes a second stream (e.g. a shared tab's audio) into what is sent, or
|
||||
* removes it with null. The caller keeps ownership of the stream. */
|
||||
setExtraAudio(stream: MediaStream | null): void {
|
||||
@@ -342,21 +362,44 @@ type SinkableContext = AudioContext & { setSinkId?: (id: string) => Promise<void
|
||||
* `AudioContext.setSinkId` (Chrome 110+) only retargets the context itself,
|
||||
* while `HTMLMediaElement.setSinkId` (Chrome, and Firefox 130+) only works on
|
||||
* a media element. Routing through the element lets `setOutputDevice` use
|
||||
* whichever one the browser actually supports.
|
||||
* whichever one the browser actually supports. Browsers without
|
||||
* `HTMLMediaElement.setSinkId` (mobile ones) play straight to the context.
|
||||
*/
|
||||
export class AudioPlayer {
|
||||
private nextTime = 0;
|
||||
private destination: MediaStreamAudioDestinationNode;
|
||||
private element: SinkableElement;
|
||||
// null where media elements can't switch devices (Android Chrome/Firefox):
|
||||
// there the detour buys nothing and its <audio> element stays silent.
|
||||
private destination: MediaStreamAudioDestinationNode | null = null;
|
||||
private element: SinkableElement | null = null;
|
||||
private gain: GainNode;
|
||||
// Voice frames only (not test tone, clicks or mic monitoring), so the
|
||||
// leveler can sit between them and the volume gain.
|
||||
private voice: GainNode;
|
||||
private leveler: DynamicsCompressorNode;
|
||||
private context: AudioContext;
|
||||
private aecTap: ScriptProcessorNode | null = null;
|
||||
private aecSink: GainNode | null = null;
|
||||
|
||||
constructor(context: AudioContext) {
|
||||
this.context = context;
|
||||
this.destination = context.createMediaStreamDestination();
|
||||
this.gain = context.createGain();
|
||||
this.voice = context.createGain();
|
||||
// "Automatic volume leveling": evens out loud and quiet speakers. Browsers
|
||||
// add their own makeup gain, so quiet voices come up too.
|
||||
// ponytail: one compressor for the whole mix, not per speaker like TS3.
|
||||
this.leveler = context.createDynamicsCompressor();
|
||||
this.leveler.threshold.value = -30;
|
||||
this.leveler.knee.value = 10;
|
||||
this.leveler.ratio.value = 4;
|
||||
this.leveler.attack.value = 0.005;
|
||||
this.leveler.release.value = 0.3;
|
||||
this.leveler.connect(this.gain);
|
||||
this.voice.connect(this.gain);
|
||||
if (!("setSinkId" in HTMLMediaElement.prototype)) {
|
||||
this.gain.connect(context.destination);
|
||||
return;
|
||||
}
|
||||
this.destination = context.createMediaStreamDestination();
|
||||
this.gain.connect(this.destination);
|
||||
this.element = document.createElement("audio") as SinkableElement;
|
||||
this.element.autoplay = true;
|
||||
@@ -365,6 +408,12 @@ export class AudioPlayer {
|
||||
document.body.appendChild(this.element);
|
||||
}
|
||||
|
||||
/** Mobile browsers ignore `autoplay` for audible media, so the hidden
|
||||
* element stays paused (silent) until play() runs inside a user gesture. */
|
||||
unlock(): void {
|
||||
if (this.element?.paused) this.element.play().catch(() => {});
|
||||
}
|
||||
|
||||
playFrame(base64Pcm: string): void {
|
||||
const int16 = base64ToInt16(base64Pcm);
|
||||
const frames = int16.length / 2;
|
||||
@@ -380,7 +429,7 @@ export class AudioPlayer {
|
||||
|
||||
const source = this.context.createBufferSource();
|
||||
source.buffer = buffer;
|
||||
source.connect(this.gain);
|
||||
source.connect(this.voice);
|
||||
|
||||
const now = this.context.currentTime;
|
||||
if (this.nextTime < now + 0.02) {
|
||||
@@ -401,6 +450,11 @@ export class AudioPlayer {
|
||||
this.gain.gain.value = gain;
|
||||
}
|
||||
|
||||
setAutoVolume(enabled: boolean): void {
|
||||
this.voice.disconnect();
|
||||
this.voice.connect(enabled ? this.leveler : this.gain);
|
||||
}
|
||||
|
||||
/** The node all voice/test audio ultimately reaches - use as a mic-monitoring target so it also respects volume/output device. */
|
||||
getInputNode(): AudioNode {
|
||||
return this.gain;
|
||||
@@ -412,12 +466,15 @@ export class AudioPlayer {
|
||||
osc.type = "sine";
|
||||
osc.frequency.value = 440;
|
||||
const toneGain = this.context.createGain();
|
||||
toneGain.gain.value = 0.3;
|
||||
const now = this.context.currentTime;
|
||||
// Soft fade in and decay instead of a flat, hard-edged beep.
|
||||
toneGain.gain.setValueAtTime(0, now);
|
||||
toneGain.gain.linearRampToValueAtTime(0.15, now + 0.03);
|
||||
toneGain.gain.exponentialRampToValueAtTime(0.0001, now + 0.8);
|
||||
osc.connect(toneGain);
|
||||
toneGain.connect(this.gain);
|
||||
const now = this.context.currentTime;
|
||||
osc.start(now);
|
||||
osc.stop(now + 0.6);
|
||||
osc.stop(now + 0.85);
|
||||
osc.onended = () => {
|
||||
osc.disconnect();
|
||||
toneGain.disconnect();
|
||||
@@ -456,7 +513,7 @@ export class AudioPlayer {
|
||||
|
||||
/** Routes playback to a specific device (empty string = system default). */
|
||||
async setOutputDevice(deviceId: string): Promise<void> {
|
||||
if (typeof this.element.setSinkId === "function") {
|
||||
if (typeof this.element?.setSinkId === "function") {
|
||||
await this.element.setSinkId(deviceId);
|
||||
return;
|
||||
}
|
||||
@@ -469,9 +526,13 @@ export class AudioPlayer {
|
||||
|
||||
dispose(): void {
|
||||
this.detachAecRenderTap();
|
||||
this.voice.disconnect();
|
||||
this.leveler.disconnect();
|
||||
this.gain.disconnect();
|
||||
if (!this.element) return;
|
||||
this.element.pause();
|
||||
this.element.srcObject = null;
|
||||
this.element.remove();
|
||||
this.destination.stream.getTracks().forEach((t) => t.stop());
|
||||
this.destination?.stream.getTracks().forEach((t) => t.stop());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user