mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
563bca2a4b | ||
|
|
b14292a95d | ||
|
|
a6e2130d29 | ||
|
|
f490ca5776 | ||
|
|
24f070ce67 | ||
|
|
8c954f9540 | ||
|
|
3ad086aedd | ||
|
|
8e78ae98c9 | ||
|
|
e2c67ef23c | ||
|
|
34fdd04c1c | ||
|
|
b0eda9a22c | ||
|
|
bdfc0bcc10 | ||
|
|
6bdd0fa171 | ||
|
|
ccceacba07 | ||
|
|
f56990f033 | ||
|
|
a58a649818 | ||
|
|
a26b7e02ec | ||
|
|
386c6ad49b | ||
|
|
a8cf46f2da | ||
|
|
c5635102f0 | ||
|
|
27fbd3cd10 | ||
|
|
dfae1b53d2 | ||
|
|
e221c9d73d | ||
|
|
8ff35abdf1 | ||
|
|
bb152a9bda | ||
|
|
0b76f2e354 | ||
|
|
0ad64fd4f8 | ||
|
|
c6fbc04236 | ||
|
|
7deee1a8c3 | ||
|
|
69efb64db6 |
No files matched your search
@@ -0,0 +1,52 @@
|
|||||||
|
name: Build and publish Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: docker-publish-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
name: Build and push moepchi/webspeak3
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Determine image tags
|
||||||
|
id: tags
|
||||||
|
run: |
|
||||||
|
TAGS="moepchi/webspeak3:latest"
|
||||||
|
if [ "${{ github.event_name }}" = "release" ]; then
|
||||||
|
TAGS="$TAGS,moepchi/webspeak3:${{ github.event.release.tag_name }}"
|
||||||
|
fi
|
||||||
|
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.tags.outputs.tags }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
name: Safari WebSpeak3 client check
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- "web/src/**"
|
||||||
|
- "web/index.html"
|
||||||
|
- "web/public/**"
|
||||||
|
- ".github/workflows/safari-check.yml"
|
||||||
|
- "tests/safari_smoke.py"
|
||||||
|
schedule:
|
||||||
|
- cron: "17 5 * * 1"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: safari-client-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
safari:
|
||||||
|
name: Safari on macOS
|
||||||
|
runs-on: macos-15
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v5
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: web/package-lock.json
|
||||||
|
|
||||||
|
- name: Install and build WebSpeak3 client
|
||||||
|
working-directory: web
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Start local preview
|
||||||
|
working-directory: web
|
||||||
|
run: |
|
||||||
|
npm run preview -- --host 127.0.0.1 --port 4173 > /tmp/webspeak3-preview.log 2>&1 &
|
||||||
|
for attempt in {1..30}; do
|
||||||
|
curl --fail --silent http://127.0.0.1:4173/ > /dev/null && exit 0
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
cat /tmp/webspeak3-preview.log
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Prepare Safari automation
|
||||||
|
run: |
|
||||||
|
sudo safaridriver --enable
|
||||||
|
python3 -m venv .venv-safari
|
||||||
|
.venv-safari/bin/python -m pip install selenium
|
||||||
|
|
||||||
|
- name: Test WebSpeak3 client in Safari
|
||||||
|
env:
|
||||||
|
BASE_URL: http://127.0.0.1:4173/
|
||||||
|
run: .venv-safari/bin/python tests/safari_smoke.py
|
||||||
|
|
||||||
|
- name: Upload Safari screenshots
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v5
|
||||||
|
with:
|
||||||
|
name: safari-client-screenshots
|
||||||
|
path: test-results/safari-client-*.png
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 14
|
||||||
@@ -9,3 +9,4 @@ dist-ssr/
|
|||||||
docker-compose.override.yml
|
docker-compose.override.yml
|
||||||
.claude/
|
.claude/
|
||||||
CLAUDE.md
|
CLAUDE.md
|
||||||
|
.serena/
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/cache
|
|
||||||
/project.local.yml
|
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
# the name by which the project can be referenced within Serena/when chatting with the LLM.
|
|
||||||
project_name: "ts-web-client"
|
|
||||||
|
|
||||||
# list of language servers to start when using the LSP backend; choose from:
|
|
||||||
# ada al angular ansible bash
|
|
||||||
# bsl clojure cpp cpp_ccls crystal
|
|
||||||
# csharp csharp_omnisharp cue dart deno
|
|
||||||
# elixir elm erlang fortran fsharp
|
|
||||||
# gdscript gleam go groovy haskell
|
|
||||||
# haxe hlsl html java json
|
|
||||||
# julia kotlin latex lean4 lua
|
|
||||||
# luau markdown matlab msl nextflow
|
|
||||||
# nix ocaml pascal perl php
|
|
||||||
# php_phpactor php_phpantom powershell python python_basedpyright
|
|
||||||
# python_jedi python_pyrefly python_ty qml r
|
|
||||||
# rego ruby ruby_solargraph rust scala
|
|
||||||
# scss solidity svelte swift systemverilog
|
|
||||||
# terraform toml typescript typescript_vts vue
|
|
||||||
# wolfram yaml zig
|
|
||||||
# (This list may be outdated; generated with scripts/print_language_list.py;
|
|
||||||
# For the current list, see values of the LanguageServerId enum here:
|
|
||||||
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py)
|
|
||||||
# For some languages, there are several alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
|
|
||||||
# Note:
|
|
||||||
# - For C, use cpp
|
|
||||||
# - For JavaScript, use typescript
|
|
||||||
# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root)
|
|
||||||
# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm)
|
|
||||||
# - For Deno projects, use deno (serves the same .ts/.js files as typescript; requires the deno CLI on PATH)
|
|
||||||
# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three)
|
|
||||||
# - For Free Pascal/Lazarus, use pascal
|
|
||||||
# Special requirements:
|
|
||||||
# Some language servers require additional setup/installations.
|
|
||||||
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
|
|
||||||
# When using multiple language servers, the first language server that supports a given file will be used for that file.
|
|
||||||
# The first language server is the default language and the respective language server will be used as a fallback.
|
|
||||||
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
||||||
language_servers:
|
|
||||||
- rust
|
|
||||||
- typescript
|
|
||||||
|
|
||||||
# the encoding used by text files in the project
|
|
||||||
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
||||||
encoding: "utf-8"
|
|
||||||
|
|
||||||
# optional shell command to run before the language backend (LSP or JetBrains) is initialised.
|
|
||||||
# the command runs in the project root directory and is only executed if the project is trusted
|
|
||||||
# (see trusted_project_path_patterns in the global configuration).
|
|
||||||
# serena waits for the command to exit: a non-zero exit code is logged as an error but does not
|
|
||||||
# abort activation. a per-project timeout (activation_command_timeout, default 180s) is the safety
|
|
||||||
# backstop for non-terminating commands; on expiry the process is killed and activation continues.
|
|
||||||
# example: activation_command: "npx nx run-many -t build"
|
|
||||||
activation_command:
|
|
||||||
|
|
||||||
# maximum time in seconds to wait for activation_command to complete before killing it (default 180s).
|
|
||||||
# must be a positive number.
|
|
||||||
activation_command_timeout: 180.0
|
|
||||||
|
|
||||||
# line ending convention to use when writing source files.
|
|
||||||
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
|
|
||||||
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
|
|
||||||
line_ending:
|
|
||||||
|
|
||||||
# The language backend to use for this project.
|
|
||||||
# If not set, the global setting from serena_config.yml is used.
|
|
||||||
# Valid values: LSP, JetBrains
|
|
||||||
# Note: the backend is fixed at startup. If a project with a different backend
|
|
||||||
# is activated post-init, an error will be returned.
|
|
||||||
language_backend:
|
|
||||||
|
|
||||||
# whether to use project's .gitignore files to ignore files
|
|
||||||
ignore_all_files_in_gitignore: true
|
|
||||||
|
|
||||||
# advanced configuration option allowing to configure language server-specific options.
|
|
||||||
# Maps the language key to the options.
|
|
||||||
# The settings are considered only if the project is trusted (see global configuration to define trusted projects).
|
|
||||||
# See https://oraios.github.io/serena/02-usage/050_configuration.html#language-server-specific-settings
|
|
||||||
ls_specific_settings: {}
|
|
||||||
|
|
||||||
# list of workspace folder paths (LSP backend only).
|
|
||||||
# These folders will be used to build up Serena's symbol index.
|
|
||||||
# Paths must be within the project root and should thus be relative to the project root.
|
|
||||||
# Furthermore, the paths should not be filtered by ignore settings.
|
|
||||||
# Default setting: The entire project root folder (".") is considered.
|
|
||||||
# In (large) monorepos, this can be used to index only subfolders of the project root, e.g.
|
|
||||||
# ls_workspace_folders:
|
|
||||||
# - "./subproject1"
|
|
||||||
# - "./subproject2"
|
|
||||||
ls_workspace_folders:
|
|
||||||
- "."
|
|
||||||
|
|
||||||
# list of additional workspace folder paths for cross-package reference support.
|
|
||||||
# Paths can be absolute or relative to the project root.
|
|
||||||
# Each folder is registered as an LSP workspace folder, enabling language servers to discover
|
|
||||||
# symbols and references across package boundaries, but these folders are not indexed by Serena,
|
|
||||||
# i.e. the respective symbols will not be found using Serena's symbol search tools.
|
|
||||||
# Example:
|
|
||||||
# additional_workspace_folders:
|
|
||||||
# - ../sibling-package
|
|
||||||
# - ../shared-lib
|
|
||||||
ls_additional_workspace_folders: []
|
|
||||||
|
|
||||||
# list of additional paths to ignore in this project.
|
|
||||||
# Same syntax as gitignore, so you can use * and **.
|
|
||||||
# Important: quote patterns that start with `*`, otherwise YAML treats them as aliases.
|
|
||||||
# Example:
|
|
||||||
# ignored_paths:
|
|
||||||
# - "examples/**"
|
|
||||||
# - ".worktrees/**"
|
|
||||||
# - "**/bin/**"
|
|
||||||
# - "**/obj/**"
|
|
||||||
# Note: global ignored_paths from serena_config.yml are also applied additively.
|
|
||||||
ignored_paths: []
|
|
||||||
|
|
||||||
# whether the project is in read-only mode
|
|
||||||
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
||||||
# Added on 2025-04-18
|
|
||||||
read_only: false
|
|
||||||
|
|
||||||
# list of tool names to exclude.
|
|
||||||
# This extends the existing exclusions (e.g. from the global configuration)
|
|
||||||
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
||||||
excluded_tools: []
|
|
||||||
|
|
||||||
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
|
|
||||||
# This extends the existing inclusions (e.g. from the global configuration).
|
|
||||||
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
||||||
included_optional_tools: []
|
|
||||||
|
|
||||||
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
|
||||||
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
|
|
||||||
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
||||||
fixed_tools: []
|
|
||||||
|
|
||||||
# list of mode names that are to be activated by default, overriding the setting in the global configuration.
|
|
||||||
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
|
|
||||||
# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply.
|
|
||||||
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
|
|
||||||
# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply
|
|
||||||
# for this project.
|
|
||||||
# This setting can, in turn, be overridden by CLI parameters (--mode).
|
|
||||||
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
|
|
||||||
default_modes:
|
|
||||||
|
|
||||||
# list of mode names to be activated additionally for this project, e.g. ["query-projects"]
|
|
||||||
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
|
|
||||||
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
|
|
||||||
added_modes:
|
|
||||||
|
|
||||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
||||||
# (contrary to the memories, which are loaded on demand).
|
|
||||||
initial_prompt: ""
|
|
||||||
|
|
||||||
# time budget (seconds) per tool call for the retrieval of additional symbol information
|
|
||||||
# such as docstrings or parameter information.
|
|
||||||
# This overrides the corresponding setting in the global configuration; see the documentation there.
|
|
||||||
# If null or missing, use the setting from the global configuration.
|
|
||||||
symbol_info_budget:
|
|
||||||
|
|
||||||
# list of regex patterns which, when matched, mark a memory entry as read‑only.
|
|
||||||
# Extends the list from the global configuration, merging the two lists.
|
|
||||||
read_only_memory_patterns: []
|
|
||||||
|
|
||||||
# list of regex patterns for memories to completely ignore.
|
|
||||||
# Matching memories will not appear in list_memories or activate_project output
|
|
||||||
# and cannot be accessed via read_memory or write_memory.
|
|
||||||
# To access ignored memory files, use the read_file tool on the raw file path.
|
|
||||||
# Extends the list from the global configuration, merging the two lists.
|
|
||||||
# Example: ["_archive/.*", "_episodes/.*"]
|
|
||||||
ignored_memory_patterns: []
|
|
||||||
+21
-1
@@ -13,6 +13,15 @@ FROM node:22-bookworm-slim AS web-builder
|
|||||||
WORKDIR /src/web
|
WORKDIR /src/web
|
||||||
COPY web/package*.json ./
|
COPY web/package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
# Vite 8 pulls in Rolldown, which ships its bundler as a platform-specific
|
||||||
|
# optional dependency (@rolldown/binding-linux-x64-gnu here). `npm ci`
|
||||||
|
# intermittently fails to install it due to a long-standing npm bug
|
||||||
|
# (https://github.com/npm/cli/issues/4828) without raising a non-zero exit
|
||||||
|
# code, so `vite build` only fails later with a confusing MODULE_NOT_FOUND.
|
||||||
|
# Verify the binding actually loaded and self-heal via the workaround from
|
||||||
|
# npm's own error message before wasting a full build on a broken install.
|
||||||
|
RUN node -e "require('@rolldown/binding-linux-x64-gnu')" \
|
||||||
|
|| (rm -rf node_modules package-lock.json && npm install)
|
||||||
COPY web/ ./
|
COPY web/ ./
|
||||||
# tsc -b currently fails on pre-existing type errors unrelated to this build;
|
# tsc -b currently fails on pre-existing type errors unrelated to this build;
|
||||||
# vite build alone is enough to produce the production bundle.
|
# vite build alone is enough to produce the production bundle.
|
||||||
@@ -32,7 +41,15 @@ LABEL org.opencontainers.image.title="WebSpeak3"
|
|||||||
LABEL org.opencontainers.image.description="Self-hosted web client for TeamSpeak 3 servers"
|
LABEL org.opencontainers.image.description="Self-hosted web client for TeamSpeak 3 servers"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY gateway/package*.json ./
|
COPY gateway/package*.json ./
|
||||||
RUN npm ci --omit=dev
|
# npm/npx are only needed to install the gateway's runtime deps; the
|
||||||
|
# container never runs either afterwards, so strip them (plus npm's own
|
||||||
|
# cache/package tree) to shrink the image and drop npm's own CVEs from the
|
||||||
|
# final attack surface. This does mean `docker exec ... npm ...` won't work
|
||||||
|
# for ad-hoc debugging in a running container anymore.
|
||||||
|
RUN npm ci --omit=dev \
|
||||||
|
&& npm cache clean --force \
|
||||||
|
&& rm -rf /root/.npm /usr/local/lib/node_modules/npm \
|
||||||
|
&& rm -f /usr/local/bin/npm /usr/local/bin/npx
|
||||||
COPY --from=gateway-builder /src/gateway/dist ./dist
|
COPY --from=gateway-builder /src/gateway/dist ./dist
|
||||||
COPY --from=connector-builder /src/connector/target/release/ts-connector /app/connector-bin/ts-connector
|
COPY --from=connector-builder /src/connector/target/release/ts-connector /app/connector-bin/ts-connector
|
||||||
COPY --from=web-builder /src/web/dist /app/web/dist
|
COPY --from=web-builder /src/web/dist /app/web/dist
|
||||||
@@ -42,4 +59,7 @@ ENV WEB_DIST=/app/web/dist
|
|||||||
ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
|
CMD ["node", "-e", "fetch('http://127.0.0.1:8080/').then(r => { if (!r.ok) process.exit(1) }).catch(() => process.exit(1))"]
|
||||||
|
|
||||||
CMD ["node", "dist/index.js"]
|
CMD ["node", "dist/index.js"]
|
||||||
@@ -9,7 +9,8 @@
|
|||||||
<a href="Dockerfile"><img src="https://img.shields.io/badge/docker-build%20passing-2496ED?logo=docker&logoColor=white" alt="Docker Build"></a>
|
<a href="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="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="connector/Cargo.toml"><img src="https://img.shields.io/badge/rust-2021-000000?logo=rust&logoColor=white" alt="Rust Version"></a>
|
||||||
<img src="https://img.shields.io/badge/status-beta%20%2F%20prototype-yellow" alt="Project Status">
|
<a href="https://github.com/Moepchi/webspeak3/releases"><img src="https://img.shields.io/github/v/release/Moepchi/webspeak3?include_prereleases&label=release" alt="Latest Release"></a>
|
||||||
|
<img src="https://img.shields.io/badge/status-public%20beta-f0b429" alt="Project Status">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -20,8 +21,9 @@
|
|||||||
<a href="https://webspeak3.de">🌐 Website</a> ·
|
<a href="https://webspeak3.de">🌐 Website</a> ·
|
||||||
<a href="https://client.webspeak3.de">💬 Open Client</a> ·
|
<a href="https://client.webspeak3.de">💬 Open Client</a> ·
|
||||||
<a href="https://demo.webspeak3.de">🕹️ Live Demo</a> ·
|
<a href="https://demo.webspeak3.de">🕹️ Live Demo</a> ·
|
||||||
<a href="#-installation">🚀 Quick Start</a> ·
|
<a href="#-quick-start">🚀 Quick Start</a> ·
|
||||||
<a href="#-installation">📖 Installation</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/Moepchi/webspeak3/issues">🐛 Report Bug</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -33,15 +35,30 @@
|
|||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Dark Mode</th>
|
<th>Desktop</th>
|
||||||
<th>Light Mode</th>
|
<th>Mobile</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="docs/screenshots/webspeak_dark.png" width="100%" alt="Dark mode screenshot"></td>
|
<td width="72%"><img src="docs/screenshots/webspeak_current.png" width="100%" alt="WebSpeak3 desktop client connected to a TeamSpeak server"></td>
|
||||||
<td><img src="docs/screenshots/webspeak_light.png" width="100%" alt="Light mode screenshot"></td>
|
<td width="28%" align="center"><img src="docs/screenshots/webspeak_mobile.png" width="260" alt="WebSpeak3 mobile client connected to a TeamSpeak server"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
## 🚀 Quick Start
|
||||||
|
|
||||||
|
Run the ready-made container and open **http://localhost:8080**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name webspeak3 --restart unless-stopped -p 8080:8080 moepchi/webspeak3:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Enter the address and port of **any reachable TeamSpeak 3 or TeamSpeak 6
|
||||||
|
server** in the connection dialog. The TeamSpeak server does not need to be
|
||||||
|
installed on the same machine, modified, or operated by you.
|
||||||
|
|
||||||
|
> Voice requires a secure context. Microphone access works on `localhost`; for
|
||||||
|
> access from other devices, place WebSpeak3 behind an HTTPS reverse proxy.
|
||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
@@ -59,7 +76,7 @@
|
|||||||
| 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status |
|
| 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status |
|
||||||
| ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab |
|
| ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab |
|
||||||
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
||||||
| 🌍 **Localized UI** | Interface available in German and English, detected automatically or switchable in Options |
|
| 🌍 **Localized UI** | Interface available in German, English, and Simplified Chinese, detected automatically or switchable in Options |
|
||||||
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
||||||
| 🔁 **Seamless reconnect** | Switch connections mid-session — old state tears down cleanly, no leaks or duplicates |
|
| 🔁 **Seamless reconnect** | Switch connections mid-session — old state tears down cleanly, no leaks or duplicates |
|
||||||
|
|
||||||
@@ -100,6 +117,19 @@ Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Ru
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 🌐 Browser Support
|
||||||
|
|
||||||
|
| Browser | Status | Notes |
|
||||||
|
|---|---|---|
|
||||||
|
| Chrome / Edge / Chromium | ✅ Primary target | Recommended for the most complete audio and device support |
|
||||||
|
| Firefox | ✅ Supported | Core client and voice functionality are supported |
|
||||||
|
| Safari | 🧪 Experimental | Audio and microphone behavior still needs broader real-device testing |
|
||||||
|
| Mobile Chromium | ✅ Supported | Responsive client with microphone support over HTTPS |
|
||||||
|
| Mobile Safari | 🧪 Experimental | UI is responsive; audio behavior remains under active validation |
|
||||||
|
|
||||||
|
WebSpeak3 is a public beta. See the [beta roadmap](ROADMAP.md) for the current
|
||||||
|
scope, known limitations, and the next milestones.
|
||||||
|
|
||||||
## 🚀 Installation
|
## 🚀 Installation
|
||||||
|
|
||||||
### 🐳 Docker (recommended)
|
### 🐳 Docker (recommended)
|
||||||
|
|||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
# WebSpeak3 Beta Roadmap
|
||||||
|
|
||||||
|
WebSpeak3 is a public beta: it already connects to real TeamSpeak 3 and
|
||||||
|
TeamSpeak 6 servers, but some browser-specific behavior and less common server
|
||||||
|
features still need wider testing.
|
||||||
|
|
||||||
|
This roadmap is intentionally outcome-focused. It does not promise fixed dates.
|
||||||
|
|
||||||
|
## Available today
|
||||||
|
|
||||||
|
- Connect to any reachable TS3 or TS6 server through the WebSpeak3 gateway
|
||||||
|
- Low-latency Opus voice, voice activation, whisper, and audio-device selection
|
||||||
|
- Live channel/client tree with status updates and context actions
|
||||||
|
- Server, channel, and private text chat
|
||||||
|
- Favorites, identities, contacts, pokes, away state, and reconnect
|
||||||
|
- File transfers, local session recording, sound packs, and administration tools
|
||||||
|
- Responsive desktop and mobile interfaces in German and English
|
||||||
|
- Docker image and Compose-based self-hosting
|
||||||
|
|
||||||
|
## Experimental or still being validated
|
||||||
|
|
||||||
|
- Safari and Mobile Safari audio/microphone behavior
|
||||||
|
- Uncommon TeamSpeak permission combinations and large permission sets
|
||||||
|
- Very large servers and long-running browser sessions
|
||||||
|
- Mobile browser behavior across a wider range of devices
|
||||||
|
- Reverse-proxy and hosting configurations beyond the documented examples
|
||||||
|
|
||||||
|
## Next milestones
|
||||||
|
|
||||||
|
### Beta hardening
|
||||||
|
|
||||||
|
- Expand real-browser audio testing, especially Safari
|
||||||
|
- Improve reconnect and recovery behavior under unstable networks
|
||||||
|
- Continue accessibility, keyboard-navigation, and mobile usability work
|
||||||
|
- Turn recurring deployment and compatibility reports into documentation
|
||||||
|
|
||||||
|
### Deployment experience
|
||||||
|
|
||||||
|
- Keep the one-command Docker path reliable
|
||||||
|
- Add clearer HTTPS and reverse-proxy examples
|
||||||
|
- Document backup and upgrade expectations for persistent browser identities
|
||||||
|
- Improve release notes and migration guidance when configuration changes
|
||||||
|
|
||||||
|
### Toward a stable release
|
||||||
|
|
||||||
|
- Define and complete a repeatable browser compatibility checklist
|
||||||
|
- Resolve confirmed high-impact beta issues
|
||||||
|
- Stabilize configuration and deployment contracts
|
||||||
|
- Publish a support matrix based on verified devices and browsers
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Please use [GitHub Issues](https://github.com/Moepchi/webspeak3/issues) for
|
||||||
|
reproducible bugs and feature requests. Include the browser and version,
|
||||||
|
operating system, deployment method, and whether the issue affects voice,
|
||||||
|
microphone access, or only the interface.
|
||||||
|
|
||||||
|
WebSpeak3 is independent and is not affiliated with or endorsed by TeamSpeak
|
||||||
|
Systems GmbH.
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 421 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -0,0 +1,70 @@
|
|||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from selenium import webdriver
|
||||||
|
from selenium.webdriver.common.by import By
|
||||||
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
|
|
||||||
|
|
||||||
|
BASE_URL = os.environ.get("BASE_URL", "https://client.webspeak3.de/")
|
||||||
|
RESULTS = Path("test-results")
|
||||||
|
RESULTS.mkdir(exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
|
def wait_for_text(driver: webdriver.Safari, selector: str, text: str) -> None:
|
||||||
|
WebDriverWait(driver, 15).until(
|
||||||
|
lambda current: text in current.find_element(By.CSS_SELECTOR, selector).text
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def check_page(driver: webdriver.Safari, width: int, height: int, label: str) -> None:
|
||||||
|
driver.set_window_size(width, height)
|
||||||
|
driver.get(BASE_URL)
|
||||||
|
|
||||||
|
wait_for_text(driver, ".ts-app-title", "WebSpeak3")
|
||||||
|
assert "WebSpeak3" in driver.title
|
||||||
|
|
||||||
|
capabilities = driver.execute_script(
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
secureContext: window.isSecureContext,
|
||||||
|
mediaDevices: Boolean(navigator.mediaDevices),
|
||||||
|
getUserMedia: typeof navigator.mediaDevices?.getUserMedia === 'function',
|
||||||
|
audioContext: typeof (window.AudioContext || window.webkitAudioContext) === 'function',
|
||||||
|
webSocket: typeof window.WebSocket === 'function'
|
||||||
|
};
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
assert capabilities["secureContext"]
|
||||||
|
assert capabilities["mediaDevices"]
|
||||||
|
assert capabilities["getUserMedia"]
|
||||||
|
assert capabilities["audioContext"]
|
||||||
|
assert capabilities["webSocket"]
|
||||||
|
|
||||||
|
connections_menu = driver.find_element(By.CSS_SELECTOR, ".ts-menubar-dropdown .ts-menubar-item")
|
||||||
|
driver.execute_script("arguments[0].click()", connections_menu)
|
||||||
|
connect_item = WebDriverWait(driver, 10).until(
|
||||||
|
lambda current: current.find_element(By.CSS_SELECTOR, ".ts-menu .ts-menu-item")
|
||||||
|
)
|
||||||
|
driver.execute_script("arguments[0].click()", connect_item)
|
||||||
|
dialog = WebDriverWait(driver, 10).until(
|
||||||
|
lambda current: current.find_element(By.CSS_SELECTOR, ".ts-connect-dialog")
|
||||||
|
)
|
||||||
|
assert dialog.is_displayed()
|
||||||
|
assert len(dialog.find_elements(By.CSS_SELECTOR, "input")) >= 3
|
||||||
|
|
||||||
|
driver.save_screenshot(str(RESULTS / f"safari-client-{label}.png"))
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
options = webdriver.SafariOptions()
|
||||||
|
driver = webdriver.Safari(options=options)
|
||||||
|
try:
|
||||||
|
check_page(driver, 1440, 1000, "desktop")
|
||||||
|
check_page(driver, 390, 844, "mobile")
|
||||||
|
finally:
|
||||||
|
driver.quit()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 379 KiB |
+865
-2
@@ -1,4 +1,11 @@
|
|||||||
.ts-app {
|
/* Wrapped in :where() so these three variable-defining rules carry ZERO
|
||||||
|
specificity. That's deliberate: a user-authored custom theme (injected
|
||||||
|
later as a plain `.ts-app { --accent: ... }` rule) has real specificity
|
||||||
|
and must always win here, regardless of which of these three blocks would
|
||||||
|
otherwise apply. Every other selector in this file is untouched, so the
|
||||||
|
normal cascade elsewhere (including .ts-app.ts-design-nova's non-variable
|
||||||
|
rules further down) still works exactly as before. */
|
||||||
|
:where(.ts-app) {
|
||||||
--bg: #ffffff;
|
--bg: #ffffff;
|
||||||
--bg-toolbar-1: #f5f6f8;
|
--bg-toolbar-1: #f5f6f8;
|
||||||
--bg-toolbar-2: #dfe2e6;
|
--bg-toolbar-2: #dfe2e6;
|
||||||
@@ -40,7 +47,7 @@
|
|||||||
0 0 40px rgba(0, 0, 0, 0.5);
|
0 0 40px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-app.ts-theme-dark {
|
:where(.ts-app.ts-theme-dark) {
|
||||||
--bg: #1e1f22;
|
--bg: #1e1f22;
|
||||||
--bg-toolbar-1: #2b2d31;
|
--bg-toolbar-1: #2b2d31;
|
||||||
--bg-toolbar-2: #232428;
|
--bg-toolbar-2: #232428;
|
||||||
@@ -64,6 +71,731 @@
|
|||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 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");
|
||||||
|
|
||||||
|
:where(.ts-app.ts-design-nova) {
|
||||||
|
--success: oklch(0.75 0.15 150);
|
||||||
|
--bg: oklch(0.17 0.014 258);
|
||||||
|
--bg-toolbar-1: oklch(0.205 0.015 258);
|
||||||
|
--bg-toolbar-2: oklch(0.245 0.016 258);
|
||||||
|
--border: oklch(0.32 0.015 258);
|
||||||
|
--border-soft: oklch(0.27 0.014 258);
|
||||||
|
--text: oklch(0.94 0.006 258);
|
||||||
|
--text-muted: oklch(0.62 0.014 258);
|
||||||
|
--text-faint: oklch(0.46 0.012 258);
|
||||||
|
--accent: #7fb0e8;
|
||||||
|
--input-bg: oklch(0.205 0.015 258);
|
||||||
|
--input-text: oklch(0.94 0.006 258);
|
||||||
|
--button-bg-1: oklch(0.245 0.016 258);
|
||||||
|
--button-bg-2: oklch(0.205 0.015 258);
|
||||||
|
--button-bg-hover-1: oklch(0.28 0.017 258);
|
||||||
|
--button-bg-hover-2: oklch(0.245 0.016 258);
|
||||||
|
--row-hover: oklch(0.28 0.017 258);
|
||||||
|
--client-text: oklch(0.94 0.006 258);
|
||||||
|
--self-text: #7fb0e8;
|
||||||
|
--log-bg: oklch(0.17 0.014 258);
|
||||||
|
--log-text: oklch(0.62 0.014 258);
|
||||||
|
--log-error: oklch(0.68 0.16 25);
|
||||||
|
color-scheme: dark;
|
||||||
|
font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova button,
|
||||||
|
.ts-app.ts-design-nova select,
|
||||||
|
.ts-app.ts-design-nova input[type="text"],
|
||||||
|
.ts-app.ts-design-nova input[type="password"],
|
||||||
|
.ts-app.ts-design-nova input[type="search"],
|
||||||
|
.ts-app.ts-design-nova .ts-dialog {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nova structural reskin: beyond palette/font, give panels, rows, tabs and
|
||||||
|
chat their own rounded "card" language instead of the Standard theme's
|
||||||
|
flush, hard-edged panes. Standard's layout isn't sacred here - Nova also
|
||||||
|
reorders the top-level app sections (all flex siblings of .ts-app) so the
|
||||||
|
mic/volume/output controls read as a bottom "voice control bar" like the
|
||||||
|
redesign, instead of a top toolbar. */
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-menubar {
|
||||||
|
order: 0;
|
||||||
|
padding: 0.5rem 1.1rem;
|
||||||
|
gap: 1.1rem;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-menubar .ts-nova-menu-dropdown {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nova-theme-only: collapses Verbindungen/Favoriten/.../Hilfe behind a single
|
||||||
|
hamburger button, opening them as a dropdown panel instead of a bare row. */
|
||||||
|
|
||||||
|
.ts-nova-menu-dropdown {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-menu-toggle {
|
||||||
|
font-size: 15px;
|
||||||
|
padding: 0.3rem 0.55rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
right: 0;
|
||||||
|
margin-top: 6px;
|
||||||
|
gap: 2px;
|
||||||
|
padding: 6px;
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||||
|
z-index: 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-dropdown {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The panel itself docks flush against the right viewport edge, so its nested
|
||||||
|
submenus must open leftward instead of the default rightward - opening right
|
||||||
|
here would run straight off-screen. */
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel-open .ts-menu {
|
||||||
|
left: auto;
|
||||||
|
right: 100%;
|
||||||
|
top: -6px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item,
|
||||||
|
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item-active {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nova splash: while disconnected, the connect dialog IS the app - the whole
|
||||||
|
chrome (menu, toolbar, tree/chat/log) stays mounted but hidden behind it,
|
||||||
|
and reappears the instant a connection exists (see the useEffect forcing
|
||||||
|
connectDialogOpen and the ts-nova-splash class in App.tsx). */
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash > .ts-menubar,
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash > .ts-toolbar,
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash > .ts-body,
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash > .ts-log {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash .ts-dialog-backdrop {
|
||||||
|
background: var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Connect screen, ported from the TS6 redesign's Connect.dc.html: a centered
|
||||||
|
hero (logo/title/subtitle) above an elevated card, instead of a plain
|
||||||
|
titled dialog box floating on a dim backdrop. */
|
||||||
|
|
||||||
|
.ts-connect-nova-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 22px;
|
||||||
|
width: min(520px, 92vw);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-hero {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 56px;
|
||||||
|
height: 56px;
|
||||||
|
border-radius: 16px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 26px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-title {
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-subtitle {
|
||||||
|
font-size: 12.5px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog {
|
||||||
|
width: auto;
|
||||||
|
background: var(--button-bg-1);
|
||||||
|
border-color: var(--border-soft);
|
||||||
|
border-radius: 18px;
|
||||||
|
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-body {
|
||||||
|
padding: 22px;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-muted);
|
||||||
|
gap: 6px;
|
||||||
|
/* Flex items default to min-width:auto, i.e. their content's intrinsic width -
|
||||||
|
for an <input> that's the browser's default control size, which is wider than
|
||||||
|
the space left in a two-up .ts-dialog-row once padding grows this much. Without
|
||||||
|
this the password/select field refuses to shrink and overflows the card. */
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The password field doesn't grow, so once the row's available width is split
|
||||||
|
fairly it should still keep a usable minimum instead of shrinking to a sliver -
|
||||||
|
flex-shrink can still take it below this only if the row itself is too narrow. */
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-row > .ts-dialog-field:not(.ts-dialog-field-grow) {
|
||||||
|
flex: 0 0 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field input,
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field select {
|
||||||
|
border-radius: 11px;
|
||||||
|
padding: 11px 14px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
border-color: var(--border-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-expand {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
align-self: flex-start;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--accent);
|
||||||
|
font-size: 12.5px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: inherit;
|
||||||
|
padding: 2px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-chevron {
|
||||||
|
transition: transform 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-chevron-open {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-grid {
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 0 22px 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-buttons button {
|
||||||
|
border-radius: 12px;
|
||||||
|
font-family: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-cancel,
|
||||||
|
.ts-connect-nova-buttons button[disabled] {
|
||||||
|
background: transparent;
|
||||||
|
color: var(--text-muted);
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
padding: 12px 18px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-primary {
|
||||||
|
flex: 1;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
border: none;
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-size: 13.5px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-primary:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-settings {
|
||||||
|
position: fixed;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--button-bg-1);
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-connect-nova-settings:hover {
|
||||||
|
background: var(--row-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Splash mode hides the cancel button specifically - with nothing connected
|
||||||
|
yet there is no "back" to cancel to. */
|
||||||
|
.ts-app.ts-design-nova.ts-nova-splash .ts-connect-cancel {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item {
|
||||||
|
padding: 0.3rem 0.65rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item-active {
|
||||||
|
padding: 0.3rem 0.65rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item-active:hover {
|
||||||
|
background: var(--row-hover);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-body {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-log {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-toolbar {
|
||||||
|
order: 3;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
border-bottom: none;
|
||||||
|
border-top: 1px solid var(--border-soft);
|
||||||
|
padding: 0.6rem 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-toolbar .ts-toolbar-icons {
|
||||||
|
flex: 1;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-toolbar .ts-icon-button {
|
||||||
|
width: 42px;
|
||||||
|
height: 42px;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-toolbar .ts-toolbar-sep {
|
||||||
|
height: 26px;
|
||||||
|
align-self: center;
|
||||||
|
margin: 0 0.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova > .ts-toolbar .ts-app-logo {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* New Nova-only status strip: server name + connection pill, folded into the
|
||||||
|
menubar row (right of the menu items) as the app's visual anchor. */
|
||||||
|
|
||||||
|
.ts-nova-topbar-server {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-topbar-logo {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 13px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-topbar-name {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-topbar-status {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-topbar-status-on {
|
||||||
|
background: color-mix(in srgb, var(--success) 18%, transparent);
|
||||||
|
color: var(--success);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-topbar-dot {
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: currentColor;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Self card in the bottom voice bar: avatar + name + status, mirroring the
|
||||||
|
mockup's left-hand cluster (Standard's toolbar has no equivalent). */
|
||||||
|
|
||||||
|
.ts-nova-toolbar-self {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
padding-right: 0.9rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
border-right: 1px solid var(--border-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-toolbar-avatar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
border-radius: 11px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 14px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-toolbar-self-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-toolbar-self-name {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-nova-toolbar-self-status {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--success);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-icon-button,
|
||||||
|
.ts-app.ts-design-nova .ts-toolbar-fields button,
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: var(--button-bg-1);
|
||||||
|
padding: 0.35rem 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-icon-button:hover,
|
||||||
|
.ts-app.ts-design-nova .ts-toolbar-fields button:hover,
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button:hover {
|
||||||
|
background: var(--button-bg-hover-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-icon-caret {
|
||||||
|
border-radius: 0 10px 10px 0;
|
||||||
|
background: var(--button-bg-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-toolbar-away .ts-icon-button {
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-upper {
|
||||||
|
gap: 0.6rem;
|
||||||
|
padding: 0.6rem 0.6rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-tree-panel,
|
||||||
|
.ts-app.ts-design-nova .ts-info-panel {
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-resize-handle-vertical,
|
||||||
|
.ts-app.ts-design-nova .ts-resize-handle-horizontal {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-banner-panel {
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
margin: 0 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-panel {
|
||||||
|
background: var(--bg-toolbar-1);
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-row {
|
||||||
|
padding: 4px 6px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-client-row {
|
||||||
|
padding-left: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-row-selected {
|
||||||
|
border-radius: 8px;
|
||||||
|
outline-color: var(--accent);
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-tabs {
|
||||||
|
order: -1;
|
||||||
|
border-top: none;
|
||||||
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
padding: 0.5rem 0.6rem 0;
|
||||||
|
gap: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-tab {
|
||||||
|
border: none;
|
||||||
|
border-bottom: 2.5px solid transparent;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--text-muted);
|
||||||
|
padding: 0.45rem 0.7rem;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-tab:hover:not(.ts-chat-tab-active) {
|
||||||
|
background: var(--row-hover);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-tab-active {
|
||||||
|
background: transparent;
|
||||||
|
color: var(--accent);
|
||||||
|
border-bottom-color: var(--accent);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Bubble-style chat messages, matching the TS6 mockup: own messages align
|
||||||
|
right in an accent-filled bubble, others align left in a muted-surface
|
||||||
|
bubble; system/log lines render as a centered pill. */
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-messages {
|
||||||
|
padding: 0.9rem 1rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-line {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 2px;
|
||||||
|
max-width: 70%;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-line-self {
|
||||||
|
align-self: flex-end;
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-from {
|
||||||
|
font-size: 11.5px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-line-self .ts-chat-from {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-bubble {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
border-radius: 4px 14px 14px 14px;
|
||||||
|
line-height: 1.45;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-line-self .ts-chat-bubble {
|
||||||
|
background: var(--accent);
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
border-radius: 14px 4px 14px 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-line-log {
|
||||||
|
align-self: center;
|
||||||
|
align-items: center;
|
||||||
|
max-width: none;
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
color: var(--text-faint);
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 11.5px;
|
||||||
|
padding: 0.25rem 0.75rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row {
|
||||||
|
border-top: 1px solid var(--border-soft);
|
||||||
|
padding: 0.6rem 0.8rem;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row textarea {
|
||||||
|
border-radius: 14px;
|
||||||
|
border-color: var(--border-soft);
|
||||||
|
background: var(--bg-toolbar-2);
|
||||||
|
padding: 0.55rem 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Round, icon-only accent send button, matching the mockup's composer. */
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: var(--accent);
|
||||||
|
color: transparent;
|
||||||
|
font-size: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button:hover {
|
||||||
|
background: var(--accent);
|
||||||
|
filter: brightness(1.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-chat-input-row button::before {
|
||||||
|
content: "➤";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 15px;
|
||||||
|
color: var(--bg-toolbar-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Client avatar chips: colored initial squares, Nova-only (Standard theme
|
||||||
|
keeps its plain icon + name row). */
|
||||||
|
.ts-client-avatar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-client-avatar {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
border-radius: 6px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 800;
|
||||||
|
color: oklch(0.18 0.02 258);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-log {
|
||||||
|
border-top: 1px solid var(--border-soft);
|
||||||
|
margin: 0 0.6rem 0.6rem;
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-dialog {
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-menu {
|
||||||
|
border-radius: 8px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova .ts-menu-item:hover:not(:disabled) {
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova ::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova ::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-app.ts-design-nova ::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--border);
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 2px solid var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
/* Demo mode banner */
|
/* Demo mode banner */
|
||||||
|
|
||||||
.ts-demo-banner {
|
.ts-demo-banner {
|
||||||
@@ -102,6 +834,12 @@
|
|||||||
|
|
||||||
/* Toolbar */
|
/* Toolbar */
|
||||||
|
|
||||||
|
.ts-menubar-items {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-menubar {
|
.ts-menubar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1631,6 +2369,131 @@
|
|||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0.75rem;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
color: var(--text);
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card:hover {
|
||||||
|
border-color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-active {
|
||||||
|
border-color: var(--accent);
|
||||||
|
box-shadow: 0 0 0 1px var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-swatch {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-swatch-standard {
|
||||||
|
background: linear-gradient(135deg, #eef1f4 0%, #d7dce2 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-swatch-nova {
|
||||||
|
background: linear-gradient(135deg, oklch(0.245 0.016 258) 0%, oklch(0.17 0.014 258) 100%);
|
||||||
|
box-shadow: inset 0 0 0 1px #7fb0e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-name {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-desc {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Custom-theme cards are a <div> (built-ins are a plain <button>) so the select
|
||||||
|
area and the edit/duplicate/export/delete row can sit side by side without
|
||||||
|
nesting a button inside a button. */
|
||||||
|
.ts-design-theme-card-custom {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-select {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 0.4rem;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-swatch-custom {
|
||||||
|
background: conic-gradient(from 180deg, #7fb0e8, #ff8fab, #ffd166, #7fb0e8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.3rem;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-actions button {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
border-radius: 3px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
color: var(--text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-theme-card-actions button:hover {
|
||||||
|
color: var(--text);
|
||||||
|
border-color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-design-custom-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-custom-theme-css {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 220px;
|
||||||
|
font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--input-bg);
|
||||||
|
color: var(--input-text);
|
||||||
|
resize: vertical;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-options-columns {
|
.ts-options-columns {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
|||||||
+552
-46
@@ -136,7 +136,58 @@ const INPUT_DEVICE_KEY = "webspeak3:input-device";
|
|||||||
const PLAYBACK_VOLUME_KEY = "webspeak3:playback-volume";
|
const PLAYBACK_VOLUME_KEY = "webspeak3:playback-volume";
|
||||||
const NOISE_SUPPRESSION_KEY = "webspeak3:noise-suppression";
|
const NOISE_SUPPRESSION_KEY = "webspeak3:noise-suppression";
|
||||||
const ECHO_CANCELLATION_KEY = "webspeak3:echo-cancellation";
|
const ECHO_CANCELLATION_KEY = "webspeak3:echo-cancellation";
|
||||||
|
const AUTO_GAIN_CONTROL_KEY = "webspeak3:auto-gain-control";
|
||||||
const VAD_HANGOVER_KEY = "webspeak3:vad-hangover";
|
const VAD_HANGOVER_KEY = "webspeak3:vad-hangover";
|
||||||
|
const DESIGN_THEME_KEY = "webspeak3:design-theme";
|
||||||
|
// The user's actual pick - "standard" | "nova" | "custom:<id>". DESIGN_THEME_KEY above
|
||||||
|
// keeps tracking just the resolved structural base, since a couple of early call sites
|
||||||
|
// (e.g. the host-field default below) need that cheaply, before customThemes is loaded.
|
||||||
|
const DESIGN_SELECTION_KEY = "webspeak3:design-selection";
|
||||||
|
const CUSTOM_THEMES_KEY = "webspeak3:custom-themes";
|
||||||
|
|
||||||
|
type DesignTheme = "standard" | "nova";
|
||||||
|
|
||||||
|
/** A user-authored theme package: a name, which built-in layout it behaves like
|
||||||
|
* (Standard's plain chrome vs Nova's collapsed menu/splash behavior), and raw CSS
|
||||||
|
* that gets injected while it's active - free-form, so it can restyle or even
|
||||||
|
* reflow the existing markup (e.g. via flex `order`, `display:none`, overlays). */
|
||||||
|
type CustomTheme = {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
baseTheme: DesignTheme;
|
||||||
|
css: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function loadDesignTheme(): DesignTheme {
|
||||||
|
return localStorage.getItem(DESIGN_THEME_KEY) === "nova" ? "nova" : "standard";
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadCustomThemes(): CustomTheme[] {
|
||||||
|
try {
|
||||||
|
const raw = localStorage.getItem(CUSTOM_THEMES_KEY);
|
||||||
|
if (!raw) return [];
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
if (!Array.isArray(parsed)) return [];
|
||||||
|
return parsed.filter(
|
||||||
|
(v): v is CustomTheme =>
|
||||||
|
v &&
|
||||||
|
typeof v.id === "string" &&
|
||||||
|
typeof v.name === "string" &&
|
||||||
|
(v.baseTheme === "standard" || v.baseTheme === "nova") &&
|
||||||
|
typeof v.css === "string"
|
||||||
|
);
|
||||||
|
} catch {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveCustomThemes(list: CustomTheme[]) {
|
||||||
|
localStorage.setItem(CUSTOM_THEMES_KEY, JSON.stringify(list));
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadDesignSelection(): string {
|
||||||
|
return localStorage.getItem(DESIGN_SELECTION_KEY) ?? loadDesignTheme();
|
||||||
|
}
|
||||||
|
|
||||||
function loadBoolPref(key: string, fallback: boolean): boolean {
|
function loadBoolPref(key: string, fallback: boolean): boolean {
|
||||||
const raw = localStorage.getItem(key);
|
const raw = localStorage.getItem(key);
|
||||||
@@ -567,6 +618,12 @@ function ChannelTree({
|
|||||||
title={c.id === ownClientId ? undefined : `${t("tree.privateChatWith")} ${c.name}`}
|
title={c.id === ownClientId ? undefined : `${t("tree.privateChatWith")} ${c.name}`}
|
||||||
>
|
>
|
||||||
<ClientIcon />
|
<ClientIcon />
|
||||||
|
<span
|
||||||
|
className="ts-client-avatar"
|
||||||
|
style={{ background: c.id === ownClientId ? "var(--accent)" : clientAvatarColor(c.name) }}
|
||||||
|
>
|
||||||
|
{c.name.trim().charAt(0).toUpperCase() || "?"}
|
||||||
|
</span>
|
||||||
{countryFlag(c.country) && <span title={c.country}>{countryFlag(c.country)}</span>}
|
{countryFlag(c.country) && <span title={c.country}>{countryFlag(c.country)}</span>}
|
||||||
<span>{c.name}</span>
|
<span>{c.name}</span>
|
||||||
{c.away && c.awayMessage && (
|
{c.away && c.awayMessage && (
|
||||||
@@ -758,6 +815,8 @@ function ConnectDialog({
|
|||||||
onToggleExpanded,
|
onToggleExpanded,
|
||||||
onConnect,
|
onConnect,
|
||||||
onCancel,
|
onCancel,
|
||||||
|
nova,
|
||||||
|
onOpenOptions,
|
||||||
}: {
|
}: {
|
||||||
host: string;
|
host: string;
|
||||||
nickname: string;
|
nickname: string;
|
||||||
@@ -777,39 +836,76 @@ function ConnectDialog({
|
|||||||
onToggleExpanded: () => void;
|
onToggleExpanded: () => void;
|
||||||
onConnect: () => void;
|
onConnect: () => void;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
|
/** Nova-theme-only: renders the TS6-redesign "connect hero" (logo, title,
|
||||||
|
* subtitle, settings shortcut) around the same form instead of the
|
||||||
|
* Standard theme's plain titled dialog box. */
|
||||||
|
nova: boolean;
|
||||||
|
onOpenOptions: () => void;
|
||||||
}) {
|
}) {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
const backdrop = useBackdropDismiss(onCancel);
|
const backdrop = useBackdropDismiss(onCancel);
|
||||||
return (
|
|
||||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
// Nova-theme-only: the "Erweiterte Optionen" toggle moves from the footer
|
||||||
<div className="ts-dialog ts-connect-dialog" onClick={(e) => e.stopPropagation()}>
|
// (Standard) to right under the nickname field, with a rotating chevron -
|
||||||
|
// matching the TS6 redesign's Connect screen instead of a plain button.
|
||||||
|
const expandToggle = nova ? (
|
||||||
|
<button className="ts-connect-nova-expand" onClick={onToggleExpanded}>
|
||||||
|
<svg
|
||||||
|
className={`ts-connect-nova-chevron${expanded ? " ts-connect-nova-chevron-open" : ""}`}
|
||||||
|
width="13"
|
||||||
|
height="13"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2.6"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
>
|
||||||
|
<path d="M9 6l6 6-6 6" />
|
||||||
|
</svg>
|
||||||
|
{expanded ? t("connect.less") : t("connect.more")}
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
|
<button onClick={onToggleExpanded}>{expanded ? t("connect.less") : t("connect.more")}</button>
|
||||||
|
);
|
||||||
|
|
||||||
|
const dialogBody = (
|
||||||
|
<div className="ts-dialog ts-connect-dialog" onClick={(e) => e.stopPropagation()}>
|
||||||
|
{nova ? (
|
||||||
|
<button className="ts-connect-nova-settings" onClick={onOpenOptions} title={t("menu.extras.options")}>
|
||||||
|
⚙️
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
<div className="ts-dialog-titlebar">
|
<div className="ts-dialog-titlebar">
|
||||||
<span>{t("connect.title")}</span>
|
<span>{t("connect.title")}</span>
|
||||||
<button onClick={onCancel} title={t("dialog.close")}>
|
<button onClick={onCancel} title={t("dialog.close")}>
|
||||||
✕
|
✕
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-dialog-body">
|
)}
|
||||||
<div className="ts-dialog-row">
|
<div className="ts-dialog-body">
|
||||||
<label className="ts-dialog-field ts-dialog-field-grow">
|
<div className="ts-dialog-row">
|
||||||
{t("connect.serverAddress")}
|
<label className="ts-dialog-field ts-dialog-field-grow">
|
||||||
<input autoFocus value={host} onChange={(e) => onHostChange(e.target.value)} />
|
{t("connect.serverAddress")}
|
||||||
</label>
|
<input autoFocus value={host} onChange={(e) => onHostChange(e.target.value)} />
|
||||||
<label className="ts-dialog-field">
|
|
||||||
{t("connect.serverPassword")}
|
|
||||||
<input
|
|
||||||
type="password"
|
|
||||||
value={serverPassword}
|
|
||||||
onChange={(e) => onServerPasswordChange(e.target.value)}
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<label className="ts-dialog-field">
|
|
||||||
{t("connect.nickname")}
|
|
||||||
<input value={nickname} onChange={(e) => onNicknameChange(e.target.value)} />
|
|
||||||
</label>
|
</label>
|
||||||
|
<label className="ts-dialog-field">
|
||||||
|
{t("connect.serverPassword")}
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
value={serverPassword}
|
||||||
|
onChange={(e) => onServerPasswordChange(e.target.value)}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<label className="ts-dialog-field">
|
||||||
|
{t("connect.nickname")}
|
||||||
|
<input value={nickname} onChange={(e) => onNicknameChange(e.target.value)} />
|
||||||
|
</label>
|
||||||
|
|
||||||
{expanded && (
|
{nova && expandToggle}
|
||||||
|
|
||||||
|
{expanded && (
|
||||||
<div className="ts-dialog-grid">
|
<div className="ts-dialog-grid">
|
||||||
<label className="ts-dialog-field">
|
<label className="ts-dialog-field">
|
||||||
{t("connect.phoneticNickname")}
|
{t("connect.phoneticNickname")}
|
||||||
@@ -859,10 +955,6 @@ function ConnectDialog({
|
|||||||
<option>Standard</option>
|
<option>Standard</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label className="ts-dialog-checkbox">
|
|
||||||
<input type="checkbox" disabled title="Not supported yet" />
|
|
||||||
{t("connect.sendMyTeamSpeakId")}
|
|
||||||
</label>
|
|
||||||
<label className="ts-dialog-field">
|
<label className="ts-dialog-field">
|
||||||
{t("connect.soundPack")}
|
{t("connect.soundPack")}
|
||||||
<select disabled defaultValue="Standard">
|
<select disabled defaultValue="Standard">
|
||||||
@@ -872,19 +964,57 @@ function ConnectDialog({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-dialog-buttons">
|
<div className={nova ? "ts-connect-nova-buttons" : "ts-dialog-buttons"}>
|
||||||
<button onClick={onToggleExpanded}>{expanded ? t("connect.less") : t("connect.more")}</button>
|
{!nova && expandToggle}
|
||||||
<div className="ts-dialog-buttons-right">
|
<div className={nova ? undefined : "ts-dialog-buttons-right"}>
|
||||||
<button onClick={onConnect} disabled={connecting || !host || !nickname}>
|
{nova && (
|
||||||
{connecting ? t("connect.connecting") : t("connect.connect")}
|
<button className="ts-connect-cancel" onClick={onCancel}>
|
||||||
</button>
|
{t("connect.cancel")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{!nova && (
|
||||||
|
<button onClick={onConnect} disabled={connecting || !host || !nickname}>
|
||||||
|
{connecting ? t("connect.connecting") : t("connect.connect")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
<button disabled title="Not supported in the web client">
|
<button disabled title="Not supported in the web client">
|
||||||
{t("connect.newTab")}
|
{t("connect.newTab")}
|
||||||
</button>
|
</button>
|
||||||
<button onClick={onCancel}>{t("connect.cancel")}</button>
|
{nova ? (
|
||||||
|
<button
|
||||||
|
className="ts-connect-nova-primary"
|
||||||
|
onClick={onConnect}
|
||||||
|
disabled={connecting || !host || !nickname}
|
||||||
|
>
|
||||||
|
{connecting ? t("connect.connecting") : t("connect.connect")}
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
|
<button onClick={onCancel}>{t("connect.cancel")}</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!nova)
|
||||||
|
return (
|
||||||
|
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||||
|
{dialogBody}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||||
|
<div className="ts-connect-nova-wrap">
|
||||||
|
<div className="ts-connect-nova-hero">
|
||||||
|
<span className="ts-connect-nova-logo">W</span>
|
||||||
|
<div className="ts-connect-nova-heading">
|
||||||
|
<div className="ts-connect-nova-title">{t("connect.title")}</div>
|
||||||
|
<div className="ts-connect-nova-subtitle">{t("connect.novaSubtitle")}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{dialogBody}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1068,10 +1198,6 @@ function FavoritesDialog({
|
|||||||
<input type="checkbox" disabled title="Not supported yet" />
|
<input type="checkbox" disabled title="Not supported yet" />
|
||||||
{t("favorites.connectOnStartup")}
|
{t("favorites.connectOnStartup")}
|
||||||
</label>
|
</label>
|
||||||
<label className="ts-dialog-checkbox">
|
|
||||||
<input type="checkbox" disabled title="Not supported yet" />
|
|
||||||
{t("favorites.enableMyTeamSpeak")}
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-dialog-buttons">
|
<div className="ts-dialog-buttons">
|
||||||
@@ -1941,6 +2067,15 @@ function groupBadgeColor(iconId: number): string {
|
|||||||
return `hsl(${hue}, 55%, 45%)`;
|
return `hsl(${hue}, 55%, 45%)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Nova-theme-only: a stable per-name color for the client avatar chips,
|
||||||
|
* hashed from the name so the same person always gets the same color. */
|
||||||
|
function clientAvatarColor(name: string): string {
|
||||||
|
let hash = 0;
|
||||||
|
for (let i = 0; i < name.length; i++) hash = (hash * 31 + name.charCodeAt(i)) >>> 0;
|
||||||
|
const hue = hash % 360;
|
||||||
|
return `oklch(0.6 0.13 ${hue})`;
|
||||||
|
}
|
||||||
|
|
||||||
/** The icon repository lives under TS3's special "channel 0" - not a real,
|
/** The icon repository lives under TS3's special "channel 0" - not a real,
|
||||||
* selectable channel, just the server-wide filebase icons are stored in.
|
* selectable channel, just the server-wide filebase icons are stored in.
|
||||||
* Icon files are always named "icon_<id>", where <id> is what a server/
|
* Icon files are always named "icon_<id>", where <id> is what a server/
|
||||||
@@ -3263,6 +3398,8 @@ interface AudioSettings {
|
|||||||
onToggleNoiseSuppression: () => void;
|
onToggleNoiseSuppression: () => void;
|
||||||
echoCancellationEnabled: boolean;
|
echoCancellationEnabled: boolean;
|
||||||
onToggleEchoCancellation: () => void;
|
onToggleEchoCancellation: () => void;
|
||||||
|
autoGainControlEnabled: boolean;
|
||||||
|
onToggleAutoGainControl: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
function MicLevelBar({ levelRef, active }: { levelRef: React.MutableRefObject<number>; active: boolean }) {
|
function MicLevelBar({ levelRef, active }: { levelRef: React.MutableRefObject<number>; active: boolean }) {
|
||||||
@@ -3453,6 +3590,14 @@ function AufnahmePanel({ audio }: { audio: AudioSettings }) {
|
|||||||
/>
|
/>
|
||||||
{t("recording.noiseSuppression")}
|
{t("recording.noiseSuppression")}
|
||||||
</label>
|
</label>
|
||||||
|
<label className="ts-options-checkbox">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={audio.autoGainControlEnabled}
|
||||||
|
onChange={audio.onToggleAutoGainControl}
|
||||||
|
/>
|
||||||
|
{t("recording.autoGainControl")}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -3474,12 +3619,197 @@ function AnwendungPanel() {
|
|||||||
<option value="auto">{t("app.language.auto")}</option>
|
<option value="auto">{t("app.language.auto")}</option>
|
||||||
<option value="de">{t("app.language.de")}</option>
|
<option value="de">{t("app.language.de")}</option>
|
||||||
<option value="en">{t("app.language.en")}</option>
|
<option value="en">{t("app.language.en")}</option>
|
||||||
|
<option value="zh-CN">{t("app.language.zh-CN")}</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CustomThemeDraft = { id: string | null; name: string; baseTheme: DesignTheme; css: string };
|
||||||
|
|
||||||
|
function DesignPanel({
|
||||||
|
designSelection,
|
||||||
|
onSelectionChange,
|
||||||
|
customThemes,
|
||||||
|
onSaveCustomTheme,
|
||||||
|
onDeleteCustomTheme,
|
||||||
|
}: {
|
||||||
|
designSelection: string;
|
||||||
|
onSelectionChange: (next: string) => void;
|
||||||
|
customThemes: CustomTheme[];
|
||||||
|
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||||
|
onDeleteCustomTheme: (id: string) => void;
|
||||||
|
}) {
|
||||||
|
const t = useT();
|
||||||
|
const [editing, setEditing] = useState<CustomThemeDraft | null>(null);
|
||||||
|
const importInputRef = useRef<HTMLInputElement | null>(null);
|
||||||
|
|
||||||
|
const builtins: { id: DesignTheme; name: string; desc: string }[] = [
|
||||||
|
{ id: "standard", name: t("design.theme.standard"), desc: t("design.theme.standard.desc") },
|
||||||
|
{ id: "nova", name: t("design.theme.nova"), desc: t("design.theme.nova.desc") },
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleSaveEditing = () => {
|
||||||
|
if (!editing || !editing.name.trim()) return;
|
||||||
|
const id = editing.id ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
||||||
|
onSaveCustomTheme({ id, name: editing.name.trim(), baseTheme: editing.baseTheme, css: editing.css });
|
||||||
|
onSelectionChange(`custom:${id}`);
|
||||||
|
setEditing(null);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleExport = (theme: CustomTheme) => {
|
||||||
|
const blob = new Blob(
|
||||||
|
[JSON.stringify({ name: theme.name, baseTheme: theme.baseTheme, css: theme.css }, null, 2)],
|
||||||
|
{ type: "application/json" }
|
||||||
|
);
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = `${theme.name.replace(/[^a-z0-9-_]+/gi, "_") || "theme"}.webspeak3theme.json`;
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleImportSelected = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
const file = e.target.files?.[0];
|
||||||
|
e.target.value = "";
|
||||||
|
if (!file) return;
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(await file.text());
|
||||||
|
if (
|
||||||
|
!parsed ||
|
||||||
|
typeof parsed.name !== "string" ||
|
||||||
|
(parsed.baseTheme !== "standard" && parsed.baseTheme !== "nova") ||
|
||||||
|
typeof parsed.css !== "string"
|
||||||
|
) {
|
||||||
|
window.alert(t("design.custom.importError"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const id = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
||||||
|
onSaveCustomTheme({ id, name: parsed.name, baseTheme: parsed.baseTheme, css: parsed.css });
|
||||||
|
onSelectionChange(`custom:${id}`);
|
||||||
|
} catch {
|
||||||
|
window.alert(t("design.custom.importError"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (editing) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h3>{editing.id ? t("design.custom.editTitle") : t("design.custom.newTitle")}</h3>
|
||||||
|
<label className="ts-options-field">
|
||||||
|
{t("design.custom.name")}
|
||||||
|
<input value={editing.name} onChange={(e) => setEditing({ ...editing, name: e.target.value })} autoFocus />
|
||||||
|
</label>
|
||||||
|
<label className="ts-options-field">
|
||||||
|
{t("design.custom.base")}
|
||||||
|
<select
|
||||||
|
value={editing.baseTheme}
|
||||||
|
onChange={(e) => setEditing({ ...editing, baseTheme: e.target.value as DesignTheme })}
|
||||||
|
>
|
||||||
|
<option value="standard">{t("design.theme.standard")}</option>
|
||||||
|
<option value="nova">{t("design.theme.nova")}</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label className="ts-options-field">
|
||||||
|
{t("design.custom.css")}
|
||||||
|
<textarea
|
||||||
|
className="ts-custom-theme-css"
|
||||||
|
spellCheck={false}
|
||||||
|
value={editing.css}
|
||||||
|
onChange={(e) => setEditing({ ...editing, css: e.target.value })}
|
||||||
|
placeholder={".ts-app {\n --accent: #ff6b6b;\n}"}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<p className="ts-options-subtitle">{t("design.custom.hint")}</p>
|
||||||
|
<div className="ts-dialog-buttons-right">
|
||||||
|
<button onClick={() => setEditing(null)}>{t("connect.cancel")}</button>
|
||||||
|
<button onClick={handleSaveEditing} disabled={!editing.name.trim()}>
|
||||||
|
{t("design.custom.save")}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<h3>{t("options.section.design")}</h3>
|
||||||
|
<p className="ts-options-subtitle">{t("design.subtitle")}</p>
|
||||||
|
<div className="ts-design-theme-grid">
|
||||||
|
{builtins.map((th) => (
|
||||||
|
<button
|
||||||
|
key={th.id}
|
||||||
|
className={`ts-design-theme-card${th.id === designSelection ? " ts-design-theme-card-active" : ""}`}
|
||||||
|
onClick={() => onSelectionChange(th.id)}
|
||||||
|
>
|
||||||
|
<span className={`ts-design-theme-swatch ts-design-theme-swatch-${th.id}`} />
|
||||||
|
<span className="ts-design-theme-card-name">{th.name}</span>
|
||||||
|
<span className="ts-design-theme-card-desc">{th.desc}</span>
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
{customThemes.map((theme) => (
|
||||||
|
<div
|
||||||
|
key={theme.id}
|
||||||
|
className={`ts-design-theme-card ts-design-theme-card-custom${
|
||||||
|
designSelection === `custom:${theme.id}` ? " ts-design-theme-card-active" : ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<button className="ts-design-theme-card-select" onClick={() => onSelectionChange(`custom:${theme.id}`)}>
|
||||||
|
<span className="ts-design-theme-swatch ts-design-theme-swatch-custom" />
|
||||||
|
<span className="ts-design-theme-card-name">{theme.name}</span>
|
||||||
|
<span className="ts-design-theme-card-desc">
|
||||||
|
{theme.baseTheme === "nova" ? t("design.theme.nova") : t("design.theme.standard")}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<div className="ts-design-theme-card-actions">
|
||||||
|
<button
|
||||||
|
onClick={() => setEditing({ id: theme.id, name: theme.name, baseTheme: theme.baseTheme, css: theme.css })}
|
||||||
|
title={t("design.custom.edit")}
|
||||||
|
>
|
||||||
|
✎
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() =>
|
||||||
|
setEditing({ id: null, name: t("design.custom.copyOf", { name: theme.name }), baseTheme: theme.baseTheme, css: theme.css })
|
||||||
|
}
|
||||||
|
title={t("design.custom.duplicate")}
|
||||||
|
>
|
||||||
|
⧉
|
||||||
|
</button>
|
||||||
|
<button onClick={() => handleExport(theme)} title={t("design.custom.export")}>
|
||||||
|
⭳
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
if (window.confirm(t("design.custom.deleteConfirm"))) onDeleteCustomTheme(theme.id);
|
||||||
|
}}
|
||||||
|
title={t("design.custom.delete")}
|
||||||
|
>
|
||||||
|
🗑
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div className="ts-design-custom-actions">
|
||||||
|
<button onClick={() => setEditing({ id: null, name: "", baseTheme: "standard", css: "" })}>
|
||||||
|
{t("design.custom.new")}
|
||||||
|
</button>
|
||||||
|
<button onClick={() => importInputRef.current?.click()}>{t("design.custom.import")}</button>
|
||||||
|
<input
|
||||||
|
ref={importInputRef}
|
||||||
|
type="file"
|
||||||
|
accept="application/json,.json"
|
||||||
|
style={{ display: "none" }}
|
||||||
|
onChange={handleImportSelected}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function SoundsPanel() {
|
function SoundsPanel() {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
const [enabled, setEnabled] = useState(() => loadSoundsEnabled());
|
const [enabled, setEnabled] = useState(() => loadSoundsEnabled());
|
||||||
@@ -3747,11 +4077,21 @@ function OptionsDialog({
|
|||||||
onSectionChange,
|
onSectionChange,
|
||||||
onClose,
|
onClose,
|
||||||
audio,
|
audio,
|
||||||
|
designSelection,
|
||||||
|
onDesignSelectionChange,
|
||||||
|
customThemes,
|
||||||
|
onSaveCustomTheme,
|
||||||
|
onDeleteCustomTheme,
|
||||||
}: {
|
}: {
|
||||||
section: string;
|
section: string;
|
||||||
onSectionChange: (id: string) => void;
|
onSectionChange: (id: string) => void;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
audio: AudioSettings;
|
audio: AudioSettings;
|
||||||
|
designSelection: string;
|
||||||
|
onDesignSelectionChange: (next: string) => void;
|
||||||
|
customThemes: CustomTheme[];
|
||||||
|
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||||
|
onDeleteCustomTheme: (id: string) => void;
|
||||||
}) {
|
}) {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0];
|
const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0];
|
||||||
@@ -3787,6 +4127,14 @@ function OptionsDialog({
|
|||||||
<AufnahmePanel audio={audio} />
|
<AufnahmePanel audio={audio} />
|
||||||
) : active.id === "sounds" ? (
|
) : active.id === "sounds" ? (
|
||||||
<SoundsPanel />
|
<SoundsPanel />
|
||||||
|
) : active.id === "design" ? (
|
||||||
|
<DesignPanel
|
||||||
|
designSelection={designSelection}
|
||||||
|
onSelectionChange={onDesignSelectionChange}
|
||||||
|
customThemes={customThemes}
|
||||||
|
onSaveCustomTheme={onSaveCustomTheme}
|
||||||
|
onDeleteCustomTheme={onDeleteCustomTheme}
|
||||||
|
/>
|
||||||
) : active.id === "nachrichten" ? (
|
) : active.id === "nachrichten" ? (
|
||||||
<NachrichtenPanel />
|
<NachrichtenPanel />
|
||||||
) : (
|
) : (
|
||||||
@@ -4045,7 +4393,11 @@ function ServerEditDialog({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function AppInner() {
|
function AppInner() {
|
||||||
const [host, setHost] = useState(() => localStorage.getItem(LAST_HOST_KEY) ?? (DEMO_MODE ? DEMO_HOST : "localhost"));
|
const [host, setHost] = useState(
|
||||||
|
() =>
|
||||||
|
localStorage.getItem(LAST_HOST_KEY) ??
|
||||||
|
(DEMO_MODE ? DEMO_HOST : loadDesignTheme() === "nova" ? "" : "localhost")
|
||||||
|
);
|
||||||
const [nickname, setNickname] = useState(
|
const [nickname, setNickname] = useState(
|
||||||
() => localStorage.getItem(LAST_NICKNAME_KEY) ?? (DEMO_MODE ? "Guest" : "")
|
() => localStorage.getItem(LAST_NICKNAME_KEY) ?? (DEMO_MODE ? "Guest" : "")
|
||||||
);
|
);
|
||||||
@@ -4150,6 +4502,55 @@ function AppInner() {
|
|||||||
const [theme, setTheme] = useState<"light" | "dark">(() =>
|
const [theme, setTheme] = useState<"light" | "dark">(() =>
|
||||||
window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
||||||
);
|
);
|
||||||
|
const [customThemes, setCustomThemes] = useState<CustomTheme[]>(() => loadCustomThemes());
|
||||||
|
const [designSelection, setDesignSelection] = useState<string>(() => loadDesignSelection());
|
||||||
|
const activeCustomTheme = designSelection.startsWith("custom:")
|
||||||
|
? customThemes.find((th) => `custom:${th.id}` === designSelection) ?? null
|
||||||
|
: null;
|
||||||
|
// Structural base - everywhere else in the app that branches on "nova" behavior
|
||||||
|
// (splash, hamburger menu, ...) keeps working unchanged, whether that behavior
|
||||||
|
// came from picking Nova directly or from a custom theme built on top of it.
|
||||||
|
const designTheme: DesignTheme = activeCustomTheme ? activeCustomTheme.baseTheme : designSelection === "nova" ? "nova" : "standard";
|
||||||
|
const handleDesignSelectionChange = (next: string) => {
|
||||||
|
setDesignSelection(next);
|
||||||
|
localStorage.setItem(DESIGN_SELECTION_KEY, next);
|
||||||
|
const base = next.startsWith("custom:")
|
||||||
|
? customThemes.find((th) => `custom:${th.id}` === next)?.baseTheme ?? "standard"
|
||||||
|
: next === "nova"
|
||||||
|
? "nova"
|
||||||
|
: "standard";
|
||||||
|
localStorage.setItem(DESIGN_THEME_KEY, base);
|
||||||
|
};
|
||||||
|
const handleSaveCustomTheme = (nextTheme: CustomTheme) => {
|
||||||
|
setCustomThemes((prev) => {
|
||||||
|
const idx = prev.findIndex((th) => th.id === nextTheme.id);
|
||||||
|
const next = idx === -1 ? [...prev, nextTheme] : prev.map((th, i) => (i === idx ? nextTheme : th));
|
||||||
|
saveCustomThemes(next);
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleDeleteCustomTheme = (id: string) => {
|
||||||
|
setCustomThemes((prev) => {
|
||||||
|
const next = prev.filter((th) => th.id !== id);
|
||||||
|
saveCustomThemes(next);
|
||||||
|
return next;
|
||||||
|
});
|
||||||
|
if (designSelection === `custom:${id}`) handleDesignSelectionChange("standard");
|
||||||
|
};
|
||||||
|
// Custom themes ship as free-form CSS - inject/replace it in a dedicated <style>
|
||||||
|
// tag while active, and drop it the moment no custom theme is selected.
|
||||||
|
useEffect(() => {
|
||||||
|
const css = activeCustomTheme?.css ?? "";
|
||||||
|
const existing = document.getElementById("ts-custom-theme-style") as HTMLStyleElement | null;
|
||||||
|
if (!css) {
|
||||||
|
existing?.remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const el = existing ?? document.createElement("style");
|
||||||
|
el.id = "ts-custom-theme-style";
|
||||||
|
el.textContent = css;
|
||||||
|
if (!existing) document.head.appendChild(el);
|
||||||
|
}, [activeCustomTheme?.id, activeCustomTheme?.css]);
|
||||||
const [micOn, setMicOn] = useState(false);
|
const [micOn, setMicOn] = useState(false);
|
||||||
const [talkers, setTalkers] = useState<Set<number>>(new Set());
|
const [talkers, setTalkers] = useState<Set<number>>(new Set());
|
||||||
const [selfActive, setSelfActive] = useState(false);
|
const [selfActive, setSelfActive] = useState(false);
|
||||||
@@ -4166,8 +4567,14 @@ function AppInner() {
|
|||||||
const [echoCancellationEnabled, setEchoCancellationEnabled] = useState(() =>
|
const [echoCancellationEnabled, setEchoCancellationEnabled] = useState(() =>
|
||||||
loadBoolPref(ECHO_CANCELLATION_KEY, true)
|
loadBoolPref(ECHO_CANCELLATION_KEY, true)
|
||||||
);
|
);
|
||||||
|
const [autoGainControlEnabled, setAutoGainControlEnabled] = useState(() =>
|
||||||
|
loadBoolPref(AUTO_GAIN_CONTROL_KEY, true)
|
||||||
|
);
|
||||||
const [micTestOn, setMicTestOn] = useState(false);
|
const [micTestOn, setMicTestOn] = useState(false);
|
||||||
const [connectionsMenuOpen, setConnectionsMenuOpen] = useState(false);
|
const [connectionsMenuOpen, setConnectionsMenuOpen] = useState(false);
|
||||||
|
// Nova-theme-only: collapses the classic menu items behind a hamburger button.
|
||||||
|
const [novaMenuOpen, setNovaMenuOpen] = useState(false);
|
||||||
|
const novaMenuRef = useRef<HTMLDivElement | null>(null);
|
||||||
const [favorites, setFavorites] = useState<Favorite[]>(() => loadFavorites());
|
const [favorites, setFavorites] = useState<Favorite[]>(() => loadFavorites());
|
||||||
const [favoritesMenuOpen, setFavoritesMenuOpen] = useState(false);
|
const [favoritesMenuOpen, setFavoritesMenuOpen] = useState(false);
|
||||||
const [favoritesDialogMode, setFavoritesDialogMode] = useState<
|
const [favoritesDialogMode, setFavoritesDialogMode] = useState<
|
||||||
@@ -4322,6 +4729,10 @@ function AppInner() {
|
|||||||
localStorage.setItem(ECHO_CANCELLATION_KEY, echoCancellationEnabled ? "1" : "0");
|
localStorage.setItem(ECHO_CANCELLATION_KEY, echoCancellationEnabled ? "1" : "0");
|
||||||
}, [echoCancellationEnabled]);
|
}, [echoCancellationEnabled]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
localStorage.setItem(AUTO_GAIN_CONTROL_KEY, autoGainControlEnabled ? "1" : "0");
|
||||||
|
}, [autoGainControlEnabled]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (inputDeviceId) localStorage.setItem(INPUT_DEVICE_KEY, inputDeviceId);
|
if (inputDeviceId) localStorage.setItem(INPUT_DEVICE_KEY, inputDeviceId);
|
||||||
}, [inputDeviceId]);
|
}, [inputDeviceId]);
|
||||||
@@ -4844,6 +5255,22 @@ function AppInner() {
|
|||||||
setAwayDialogOpen(false);
|
setAwayDialogOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!novaMenuOpen) return;
|
||||||
|
const onPointerDown = (e: MouseEvent) => {
|
||||||
|
if (!novaMenuRef.current?.contains(e.target as Node)) setNovaMenuOpen(false);
|
||||||
|
};
|
||||||
|
const onKeyDown = (e: KeyboardEvent) => {
|
||||||
|
if (e.key === "Escape") setNovaMenuOpen(false);
|
||||||
|
};
|
||||||
|
window.addEventListener("mousedown", onPointerDown);
|
||||||
|
window.addEventListener("keydown", onKeyDown);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("mousedown", onPointerDown);
|
||||||
|
window.removeEventListener("keydown", onKeyDown);
|
||||||
|
};
|
||||||
|
}, [novaMenuOpen]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!connectionsMenuOpen) return;
|
if (!connectionsMenuOpen) return;
|
||||||
const onPointerDown = (e: MouseEvent) => {
|
const onPointerDown = (e: MouseEvent) => {
|
||||||
@@ -5105,12 +5532,20 @@ function AppInner() {
|
|||||||
return () => window.removeEventListener("keydown", onKeyDown);
|
return () => window.removeEventListener("keydown", onKeyDown);
|
||||||
}, [connected, connecting, host, nickname, serverPassword, defaultChannel, channelPassword]);
|
}, [connected, connecting, host, nickname, serverPassword, defaultChannel, channelPassword]);
|
||||||
|
|
||||||
|
// Nova-theme-only: the connect dialog IS the app until a connection exists -
|
||||||
|
// it's forced open on load and after every disconnect, and closes itself the
|
||||||
|
// moment a connection succeeds.
|
||||||
|
useEffect(() => {
|
||||||
|
if (designTheme === "nova" && !connected) setConnectDialogOpen(true);
|
||||||
|
}, [designTheme, connected]);
|
||||||
|
|
||||||
// Overrides let a device/DSP-setting change take effect immediately, without
|
// Overrides let a device/DSP-setting change take effect immediately, without
|
||||||
// waiting for the next render's (possibly still-stale) state closure.
|
// waiting for the next render's (possibly still-stale) state closure.
|
||||||
const startMic = async (overrides?: {
|
const startMic = async (overrides?: {
|
||||||
deviceId?: string;
|
deviceId?: string;
|
||||||
echoCancellation?: boolean;
|
echoCancellation?: boolean;
|
||||||
noiseSuppression?: boolean;
|
noiseSuppression?: boolean;
|
||||||
|
autoGainControl?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const audioContext = ensureAudioContext();
|
const audioContext = ensureAudioContext();
|
||||||
try {
|
try {
|
||||||
@@ -5127,6 +5562,7 @@ function AppInner() {
|
|||||||
deviceId: overrides?.deviceId ?? (inputDeviceId || undefined),
|
deviceId: overrides?.deviceId ?? (inputDeviceId || undefined),
|
||||||
echoCancellation: overrides?.echoCancellation ?? echoCancellationEnabled,
|
echoCancellation: overrides?.echoCancellation ?? echoCancellationEnabled,
|
||||||
noiseSuppression: overrides?.noiseSuppression ?? noiseSuppressionEnabled,
|
noiseSuppression: overrides?.noiseSuppression ?? noiseSuppressionEnabled,
|
||||||
|
autoGainControl: overrides?.autoGainControl ?? autoGainControlEnabled,
|
||||||
});
|
});
|
||||||
await mic.start();
|
await mic.start();
|
||||||
micCaptureRef.current = mic;
|
micCaptureRef.current = mic;
|
||||||
@@ -5143,6 +5579,7 @@ function AppInner() {
|
|||||||
deviceId?: string;
|
deviceId?: string;
|
||||||
echoCancellation?: boolean;
|
echoCancellation?: boolean;
|
||||||
noiseSuppression?: boolean;
|
noiseSuppression?: boolean;
|
||||||
|
autoGainControl?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
micCaptureRef.current?.stop();
|
micCaptureRef.current?.stop();
|
||||||
micCaptureRef.current = null;
|
micCaptureRef.current = null;
|
||||||
@@ -5184,6 +5621,12 @@ function AppInner() {
|
|||||||
if (micCaptureRef.current) void restartMic({ echoCancellation: next });
|
if (micCaptureRef.current) void restartMic({ echoCancellation: next });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleToggleAutoGainControl = () => {
|
||||||
|
const next = !autoGainControlEnabled;
|
||||||
|
setAutoGainControlEnabled(next);
|
||||||
|
if (micCaptureRef.current) void restartMic({ autoGainControl: next });
|
||||||
|
};
|
||||||
|
|
||||||
const handleToggleMicTest = () => {
|
const handleToggleMicTest = () => {
|
||||||
const next = !micTestOn;
|
const next = !micTestOn;
|
||||||
setMicTestOn(next);
|
setMicTestOn(next);
|
||||||
@@ -5926,9 +6369,15 @@ function AppInner() {
|
|||||||
? new Set(talkers).add(ownClient.id)
|
? new Set(talkers).add(ownClient.id)
|
||||||
: talkers;
|
: talkers;
|
||||||
const t = useT();
|
const t = useT();
|
||||||
|
const novaSplash = designTheme === "nova" && !connected;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`ts-app ts-theme-${theme}${demoForceMobile ? " ts-force-mobile" : ""}`}>
|
<div
|
||||||
|
className={`ts-app ts-theme-${theme}${designTheme === "nova" ? " ts-design-nova" : ""}${
|
||||||
|
activeCustomTheme ? " ts-design-custom" : ""
|
||||||
|
}${demoForceMobile ? " ts-force-mobile" : ""}${novaSplash ? " ts-nova-splash" : ""}`}
|
||||||
|
data-custom-theme={activeCustomTheme?.id}
|
||||||
|
>
|
||||||
{DEMO_MODE && (
|
{DEMO_MODE && (
|
||||||
<div className="ts-demo-banner">
|
<div className="ts-demo-banner">
|
||||||
Demo mode — simulated data only, no real TeamSpeak server involved.{" "}
|
Demo mode — simulated data only, no real TeamSpeak server involved.{" "}
|
||||||
@@ -5941,6 +6390,21 @@ function AppInner() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="ts-menubar">
|
<div className="ts-menubar">
|
||||||
|
<div className={designTheme === "nova" ? "ts-nova-menu-dropdown" : undefined} ref={novaMenuRef}>
|
||||||
|
{designTheme === "nova" && (
|
||||||
|
<button
|
||||||
|
className="ts-icon-button ts-nova-menu-toggle"
|
||||||
|
onClick={() => setNovaMenuOpen((v) => !v)}
|
||||||
|
aria-label={t("menu.connections")}
|
||||||
|
>
|
||||||
|
☰
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
<div
|
||||||
|
className={`ts-menubar-items${designTheme === "nova" ? " ts-nova-menu-panel" : ""}${
|
||||||
|
novaMenuOpen ? " ts-nova-menu-panel-open" : ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
||||||
<span
|
<span
|
||||||
className="ts-menubar-item ts-menubar-item-active"
|
className="ts-menubar-item ts-menubar-item-active"
|
||||||
@@ -6384,9 +6848,34 @@ function AppInner() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<span className="ts-menubar-item">{t("menu.help")}</span>
|
<span className="ts-menubar-item">{t("menu.help")}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{designTheme === "nova" && (
|
||||||
|
<div className="ts-nova-topbar-server">
|
||||||
|
<span className="ts-nova-topbar-logo">W</span>
|
||||||
|
<span className="ts-nova-topbar-name">{connected ? serverName || host : "WebSpeak3"}</span>
|
||||||
|
<span className={`ts-nova-topbar-status${connected ? " ts-nova-topbar-status-on" : ""}`}>
|
||||||
|
<span className="ts-nova-topbar-dot" />
|
||||||
|
{connected ? t("design.status.connected") : t("tree.notConnected")}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="ts-toolbar">
|
<div className="ts-toolbar">
|
||||||
|
{designTheme === "nova" && connected && ownClient && (
|
||||||
|
<div className="ts-nova-toolbar-self">
|
||||||
|
<span className="ts-nova-toolbar-avatar">
|
||||||
|
{ownClient.name.trim().charAt(0).toUpperCase() || "?"}
|
||||||
|
</span>
|
||||||
|
<span className="ts-nova-toolbar-self-info">
|
||||||
|
<span className="ts-nova-toolbar-self-name">{ownClient.name}</span>
|
||||||
|
<span className="ts-nova-toolbar-self-status">
|
||||||
|
{isAway ? t("tree.away") : t("design.status.connected")}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="ts-toolbar-icons">
|
<div className="ts-toolbar-icons">
|
||||||
<div className="ts-toolbar-away" ref={awayMenuRef}>
|
<div className="ts-toolbar-away" ref={awayMenuRef}>
|
||||||
<button
|
<button
|
||||||
@@ -6588,7 +7077,9 @@ function AppInner() {
|
|||||||
onActiveIdentityChange={handleActiveIdentityChange}
|
onActiveIdentityChange={handleActiveIdentityChange}
|
||||||
onToggleExpanded={() => setConnectDialogExpanded((v) => !v)}
|
onToggleExpanded={() => setConnectDialogExpanded((v) => !v)}
|
||||||
onConnect={handleConnect}
|
onConnect={handleConnect}
|
||||||
onCancel={() => setConnectDialogOpen(false)}
|
onCancel={novaSplash ? () => {} : () => setConnectDialogOpen(false)}
|
||||||
|
nova={designTheme === "nova"}
|
||||||
|
onOpenOptions={() => setOptionsDialogOpen(true)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -6817,6 +7308,11 @@ function AppInner() {
|
|||||||
section={optionsSection}
|
section={optionsSection}
|
||||||
onSectionChange={setOptionsSection}
|
onSectionChange={setOptionsSection}
|
||||||
onClose={() => setOptionsDialogOpen(false)}
|
onClose={() => setOptionsDialogOpen(false)}
|
||||||
|
designSelection={designSelection}
|
||||||
|
onDesignSelectionChange={handleDesignSelectionChange}
|
||||||
|
customThemes={customThemes}
|
||||||
|
onSaveCustomTheme={handleSaveCustomTheme}
|
||||||
|
onDeleteCustomTheme={handleDeleteCustomTheme}
|
||||||
audio={{
|
audio={{
|
||||||
outputDevices,
|
outputDevices,
|
||||||
outputDeviceId,
|
outputDeviceId,
|
||||||
@@ -6841,6 +7337,8 @@ function AppInner() {
|
|||||||
onToggleNoiseSuppression: handleToggleNoiseSuppression,
|
onToggleNoiseSuppression: handleToggleNoiseSuppression,
|
||||||
echoCancellationEnabled,
|
echoCancellationEnabled,
|
||||||
onToggleEchoCancellation: handleToggleEchoCancellation,
|
onToggleEchoCancellation: handleToggleEchoCancellation,
|
||||||
|
autoGainControlEnabled,
|
||||||
|
onToggleAutoGainControl: handleToggleAutoGainControl,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -7328,8 +7826,12 @@ function AppInner() {
|
|||||||
<div className="ts-chat-messages">
|
<div className="ts-chat-messages">
|
||||||
{activeTab === "channel"
|
{activeTab === "channel"
|
||||||
? chat.map((entry, i) => (
|
? chat.map((entry, i) => (
|
||||||
<div key={i} className="ts-chat-line">
|
<div
|
||||||
<span className="ts-chat-from">{entry.from}:</span> <span>{entry.message}</span>
|
key={i}
|
||||||
|
className={`ts-chat-line${entry.from === ownClient?.name ? " ts-chat-line-self" : ""}`}
|
||||||
|
>
|
||||||
|
<span className="ts-chat-from">{entry.from}:</span>{" "}
|
||||||
|
<span className="ts-chat-bubble">{entry.message}</span>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
: activeTab === "server"
|
: activeTab === "server"
|
||||||
@@ -7339,17 +7841,21 @@ function AppInner() {
|
|||||||
<span>{entry.message}</span>
|
<span>{entry.message}</span>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div key={i} className="ts-chat-line">
|
<div
|
||||||
<span className="ts-chat-from">{entry.from}:</span> <span>{entry.message}</span>
|
key={i}
|
||||||
|
className={`ts-chat-line${entry.from === ownClient?.name ? " ts-chat-line-self" : ""}`}
|
||||||
|
>
|
||||||
|
<span className="ts-chat-from">{entry.from}:</span>{" "}
|
||||||
|
<span className="ts-chat-bubble">{entry.message}</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: pmThreads[activeTab]?.messages.map((entry, i) => (
|
: pmThreads[activeTab]?.messages.map((entry, i) => (
|
||||||
<div key={i} className="ts-chat-line">
|
<div key={i} className={`ts-chat-line${entry.fromSelf ? " ts-chat-line-self" : ""}`}>
|
||||||
<span className="ts-chat-from">
|
<span className="ts-chat-from">
|
||||||
{entry.fromSelf ? t("chat.you") : pmThreads[activeTab].partnerName}:
|
{entry.fromSelf ? t("chat.you") : pmThreads[activeTab].partnerName}:
|
||||||
</span>{" "}
|
</span>{" "}
|
||||||
<span>{entry.message}</span>
|
<span className="ts-chat-bubble">{entry.message}</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div ref={chatEndRef} />
|
<div ref={chatEndRef} />
|
||||||
|
|||||||
+61
-7
@@ -1,6 +1,7 @@
|
|||||||
import { createContext, useContext, useEffect, useState, type ReactNode } from "react";
|
import { createContext, useContext, useEffect, useState, type ReactNode } from "react";
|
||||||
|
import { zhCN } from "./locales/zh-CN";
|
||||||
|
|
||||||
export type Lang = "de" | "en";
|
export type Lang = "de" | "en" | "zh-CN";
|
||||||
export type LangPref = "auto" | Lang;
|
export type LangPref = "auto" | Lang;
|
||||||
|
|
||||||
const LANGUAGE_KEY = "webspeak3:language";
|
const LANGUAGE_KEY = "webspeak3:language";
|
||||||
@@ -65,6 +66,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"away.setGlobalStatus": "Abwesenheit-Status global setzen",
|
"away.setGlobalStatus": "Abwesenheit-Status global setzen",
|
||||||
|
|
||||||
"connect.title": "Verbinden",
|
"connect.title": "Verbinden",
|
||||||
|
"connect.novaSubtitle": "WebSpeak3 läuft komplett im Browser — kein Download nötig",
|
||||||
"connect.serverAddress": "Server Nickname oder Adresse:",
|
"connect.serverAddress": "Server Nickname oder Adresse:",
|
||||||
"connect.serverPassword": "Server Passwort:",
|
"connect.serverPassword": "Server Passwort:",
|
||||||
"connect.nickname": "Nickname:",
|
"connect.nickname": "Nickname:",
|
||||||
@@ -76,7 +78,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"connect.playbackProfile": "Wiedergabeprofil:",
|
"connect.playbackProfile": "Wiedergabeprofil:",
|
||||||
"connect.onetimeGrant": "Einmalige Berechtigung:",
|
"connect.onetimeGrant": "Einmalige Berechtigung:",
|
||||||
"connect.hotkeyProfile": "Hotkeyprofil:",
|
"connect.hotkeyProfile": "Hotkeyprofil:",
|
||||||
"connect.sendMyTeamSpeakId": "myTeamSpeak ID senden",
|
|
||||||
"connect.soundPack": "Sound Pack:",
|
"connect.soundPack": "Sound Pack:",
|
||||||
"connect.more": "Mehr",
|
"connect.more": "Mehr",
|
||||||
"connect.less": "Weniger",
|
"connect.less": "Weniger",
|
||||||
@@ -199,7 +200,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"favorites.newFavoriteName": "Neuer Favorit",
|
"favorites.newFavoriteName": "Neuer Favorit",
|
||||||
"favorites.showServerQueryClients": "ServerQuery Clients anzeigen",
|
"favorites.showServerQueryClients": "ServerQuery Clients anzeigen",
|
||||||
"favorites.connectOnStartup": "Beim Start verbinden",
|
"favorites.connectOnStartup": "Beim Start verbinden",
|
||||||
"favorites.enableMyTeamSpeak": "Aktiviere myTeamSpeak Funktionen",
|
|
||||||
"favorites.new": "Neuer Favorit",
|
"favorites.new": "Neuer Favorit",
|
||||||
"favorites.newFolder": "Neuer Ordner",
|
"favorites.newFolder": "Neuer Ordner",
|
||||||
"favorites.remove": "Entfernen",
|
"favorites.remove": "Entfernen",
|
||||||
@@ -223,6 +223,28 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"options.section.wiedergabe": "Wiedergabe",
|
"options.section.wiedergabe": "Wiedergabe",
|
||||||
"options.section.aufnahme": "Aufnahme",
|
"options.section.aufnahme": "Aufnahme",
|
||||||
"options.section.design": "Design",
|
"options.section.design": "Design",
|
||||||
|
"design.subtitle": "Wähle das Erscheinungsbild der Anwendung.",
|
||||||
|
"design.theme.standard": "Standard",
|
||||||
|
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
|
||||||
|
"design.theme.nova": "Nova",
|
||||||
|
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
|
||||||
|
"design.status.connected": "Verbunden",
|
||||||
|
"design.custom.new": "+ Neues Design",
|
||||||
|
"design.custom.import": "Design importieren",
|
||||||
|
"design.custom.edit": "Bearbeiten",
|
||||||
|
"design.custom.duplicate": "Duplizieren",
|
||||||
|
"design.custom.export": "Exportieren",
|
||||||
|
"design.custom.delete": "Löschen",
|
||||||
|
"design.custom.deleteConfirm": "Dieses Design wirklich löschen?",
|
||||||
|
"design.custom.newTitle": "Neues Design erstellen",
|
||||||
|
"design.custom.editTitle": "Design bearbeiten",
|
||||||
|
"design.custom.name": "Name",
|
||||||
|
"design.custom.base": "Basis-Layout",
|
||||||
|
"design.custom.css": "CSS",
|
||||||
|
"design.custom.hint": "Dieses CSS wird geladen, solange das Design aktiv ist. Nutze .ts-app { ... } und die vorhandenen CSS-Variablen (--accent, --bg, --text, --border, ...), um Farben, Radien und Abstände anzupassen - mit .ts-app .irgendeine-klasse { display: none } oder order lässt sich auch das Layout verändern.",
|
||||||
|
"design.custom.save": "Speichern",
|
||||||
|
"design.custom.copyOf": "Kopie von {name}",
|
||||||
|
"design.custom.importError": "Diese Datei konnte nicht als WebSpeak3-Design gelesen werden.",
|
||||||
"options.section.erweiterungen": "Erweiterungen",
|
"options.section.erweiterungen": "Erweiterungen",
|
||||||
"options.section.hotkeys": "Hotkeys",
|
"options.section.hotkeys": "Hotkeys",
|
||||||
"options.section.whispern": "Whispern",
|
"options.section.whispern": "Whispern",
|
||||||
@@ -239,6 +261,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"app.language.auto": "Systemvorgabe",
|
"app.language.auto": "Systemvorgabe",
|
||||||
"app.language.de": "Deutsch",
|
"app.language.de": "Deutsch",
|
||||||
"app.language.en": "English",
|
"app.language.en": "English",
|
||||||
|
"app.language.zh-CN": "简体中文",
|
||||||
|
|
||||||
"playback.title": "Wiedergabe",
|
"playback.title": "Wiedergabe",
|
||||||
"playback.subtitle": "Ändern der Wiedergabeeinstellungen",
|
"playback.subtitle": "Ändern der Wiedergabeeinstellungen",
|
||||||
@@ -270,6 +293,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"recording.typingAttenuation": "Typing attenuation",
|
"recording.typingAttenuation": "Typing attenuation",
|
||||||
"recording.echoCancellation": "Echo Dämpfung",
|
"recording.echoCancellation": "Echo Dämpfung",
|
||||||
"recording.noiseSuppression": "Hintergrundgeräusche entfernen",
|
"recording.noiseSuppression": "Hintergrundgeräusche entfernen",
|
||||||
|
"recording.autoGainControl": "Automatische Verstärkung",
|
||||||
|
|
||||||
"info.address": "Adresse:",
|
"info.address": "Adresse:",
|
||||||
"info.version": "Version:",
|
"info.version": "Version:",
|
||||||
@@ -566,6 +590,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"away.setGlobalStatus": "Set global away status",
|
"away.setGlobalStatus": "Set global away status",
|
||||||
|
|
||||||
"connect.title": "Connect",
|
"connect.title": "Connect",
|
||||||
|
"connect.novaSubtitle": "WebSpeak3 runs entirely in the browser — no download needed",
|
||||||
"connect.serverAddress": "Server nickname or address:",
|
"connect.serverAddress": "Server nickname or address:",
|
||||||
"connect.serverPassword": "Server password:",
|
"connect.serverPassword": "Server password:",
|
||||||
"connect.nickname": "Nickname:",
|
"connect.nickname": "Nickname:",
|
||||||
@@ -577,7 +602,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"connect.playbackProfile": "Playback profile:",
|
"connect.playbackProfile": "Playback profile:",
|
||||||
"connect.onetimeGrant": "One-time privilege key:",
|
"connect.onetimeGrant": "One-time privilege key:",
|
||||||
"connect.hotkeyProfile": "Hotkey profile:",
|
"connect.hotkeyProfile": "Hotkey profile:",
|
||||||
"connect.sendMyTeamSpeakId": "Send myTeamSpeak ID",
|
|
||||||
"connect.soundPack": "Sound pack:",
|
"connect.soundPack": "Sound pack:",
|
||||||
"connect.more": "More",
|
"connect.more": "More",
|
||||||
"connect.less": "Less",
|
"connect.less": "Less",
|
||||||
@@ -700,7 +724,6 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"favorites.newFavoriteName": "New bookmark",
|
"favorites.newFavoriteName": "New bookmark",
|
||||||
"favorites.showServerQueryClients": "Show ServerQuery clients",
|
"favorites.showServerQueryClients": "Show ServerQuery clients",
|
||||||
"favorites.connectOnStartup": "Connect on startup",
|
"favorites.connectOnStartup": "Connect on startup",
|
||||||
"favorites.enableMyTeamSpeak": "Enable myTeamSpeak features",
|
|
||||||
"favorites.new": "New bookmark",
|
"favorites.new": "New bookmark",
|
||||||
"favorites.newFolder": "New folder",
|
"favorites.newFolder": "New folder",
|
||||||
"favorites.remove": "Remove",
|
"favorites.remove": "Remove",
|
||||||
@@ -724,6 +747,28 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"options.section.wiedergabe": "Playback",
|
"options.section.wiedergabe": "Playback",
|
||||||
"options.section.aufnahme": "Capture",
|
"options.section.aufnahme": "Capture",
|
||||||
"options.section.design": "Appearance",
|
"options.section.design": "Appearance",
|
||||||
|
"design.subtitle": "Choose the application's look.",
|
||||||
|
"design.theme.standard": "Standard",
|
||||||
|
"design.theme.standard.desc": "The original WebSpeak3 design.",
|
||||||
|
"design.theme.nova": "Nova",
|
||||||
|
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
|
||||||
|
"design.status.connected": "Connected",
|
||||||
|
"design.custom.new": "+ New design",
|
||||||
|
"design.custom.import": "Import design",
|
||||||
|
"design.custom.edit": "Edit",
|
||||||
|
"design.custom.duplicate": "Duplicate",
|
||||||
|
"design.custom.export": "Export",
|
||||||
|
"design.custom.delete": "Delete",
|
||||||
|
"design.custom.deleteConfirm": "Really delete this design?",
|
||||||
|
"design.custom.newTitle": "Create a new design",
|
||||||
|
"design.custom.editTitle": "Edit design",
|
||||||
|
"design.custom.name": "Name",
|
||||||
|
"design.custom.base": "Base layout",
|
||||||
|
"design.custom.css": "CSS",
|
||||||
|
"design.custom.hint": "This CSS loads while the design is active. Use .ts-app { ... } and the existing CSS variables (--accent, --bg, --text, --border, ...) to adjust colors, radii and spacing - with .ts-app .some-class { display: none } or order you can even change the layout.",
|
||||||
|
"design.custom.save": "Save",
|
||||||
|
"design.custom.copyOf": "Copy of {name}",
|
||||||
|
"design.custom.importError": "This file couldn't be read as a WebSpeak3 design.",
|
||||||
"options.section.erweiterungen": "Addons",
|
"options.section.erweiterungen": "Addons",
|
||||||
"options.section.hotkeys": "Hotkeys",
|
"options.section.hotkeys": "Hotkeys",
|
||||||
"options.section.whispern": "Whisper",
|
"options.section.whispern": "Whisper",
|
||||||
@@ -740,6 +785,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"app.language.auto": "System default",
|
"app.language.auto": "System default",
|
||||||
"app.language.de": "Deutsch",
|
"app.language.de": "Deutsch",
|
||||||
"app.language.en": "English",
|
"app.language.en": "English",
|
||||||
|
"app.language.zh-CN": "简体中文",
|
||||||
|
|
||||||
"playback.title": "Playback",
|
"playback.title": "Playback",
|
||||||
"playback.subtitle": "Change your playback settings",
|
"playback.subtitle": "Change your playback settings",
|
||||||
@@ -771,6 +817,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"recording.typingAttenuation": "Typing attenuation",
|
"recording.typingAttenuation": "Typing attenuation",
|
||||||
"recording.echoCancellation": "Echo cancellation",
|
"recording.echoCancellation": "Echo cancellation",
|
||||||
"recording.noiseSuppression": "Remove background noise",
|
"recording.noiseSuppression": "Remove background noise",
|
||||||
|
"recording.autoGainControl": "Automatic gain control",
|
||||||
|
|
||||||
"info.address": "Address:",
|
"info.address": "Address:",
|
||||||
"info.version": "Version:",
|
"info.version": "Version:",
|
||||||
@@ -1012,11 +1059,14 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"nachrichten.add": "Add",
|
"nachrichten.add": "Add",
|
||||||
"nachrichten.delete": "Delete",
|
"nachrichten.delete": "Delete",
|
||||||
},
|
},
|
||||||
|
"zh-CN": zhCN,
|
||||||
};
|
};
|
||||||
|
|
||||||
function detectSystemLang(): Lang {
|
function detectSystemLang(): Lang {
|
||||||
const nav = typeof navigator !== "undefined" ? navigator.language : "en";
|
const nav = typeof navigator !== "undefined" ? navigator.language : "en";
|
||||||
return nav?.toLowerCase().startsWith("de") ? "de" : "en";
|
const normalized = nav?.toLowerCase() ?? "en";
|
||||||
|
if (normalized.startsWith("zh")) return "zh-CN";
|
||||||
|
return normalized.startsWith("de") ? "de" : "en";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resolveLang(pref: LangPref): Lang {
|
export function resolveLang(pref: LangPref): Lang {
|
||||||
@@ -1025,7 +1075,7 @@ export function resolveLang(pref: LangPref): Lang {
|
|||||||
|
|
||||||
export function loadLangPref(): LangPref {
|
export function loadLangPref(): LangPref {
|
||||||
const raw = localStorage.getItem(LANGUAGE_KEY);
|
const raw = localStorage.getItem(LANGUAGE_KEY);
|
||||||
return raw === "de" || raw === "en" || raw === "auto" ? raw : "auto";
|
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "auto" ? raw : "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function saveLangPref(pref: LangPref) {
|
export function saveLangPref(pref: LangPref) {
|
||||||
@@ -1054,6 +1104,10 @@ export function LanguageProvider({ children }: { children: ReactNode }) {
|
|||||||
saveLangPref(langPref);
|
saveLangPref(langPref);
|
||||||
}, [langPref]);
|
}, [langPref]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.documentElement.lang = lang;
|
||||||
|
}, [lang]);
|
||||||
|
|
||||||
const t: TranslateFn = (key, vars) =>
|
const t: TranslateFn = (key, vars) =>
|
||||||
interpolate(translations[lang][key] ?? translations.en[key] ?? key, vars);
|
interpolate(translations[lang][key] ?? translations.en[key] ?? key, vars);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,502 @@
|
|||||||
|
export const zhCN: Record<string, string> = {
|
||||||
|
"menu.connections": "连接",
|
||||||
|
"menu.connections.connect": "连接",
|
||||||
|
"menu.connections.disconnectCurrent": "断开当前服务器",
|
||||||
|
"menu.connections.disconnectAll": "断开所有服务器",
|
||||||
|
"menu.favorites": "收藏夹",
|
||||||
|
"menu.favorites.add": "添加到收藏夹",
|
||||||
|
"menu.favorites.manage": "管理收藏夹",
|
||||||
|
"menu.self": "自己",
|
||||||
|
"menu.rights": "权限",
|
||||||
|
"menu.rights.serverGroups": "编辑服务器组...",
|
||||||
|
"menu.rights.channelGroups": "编辑频道组...",
|
||||||
|
"menu.rights.serverPermissions": "编辑服务器权限...",
|
||||||
|
"menu.rights.channelPermissions": "编辑频道权限...",
|
||||||
|
"menu.rights.overview": "权限概览...",
|
||||||
|
"menu.rights.myRights": "查看我的权限",
|
||||||
|
"menu.extras": "工具",
|
||||||
|
"menu.help": "帮助",
|
||||||
|
"menu.extras.identities": "身份",
|
||||||
|
"menu.extras.contacts": "联系人",
|
||||||
|
"menu.extras.collectedUrls": "收集的链接",
|
||||||
|
"menu.extras.inviteFriend": "邀请好友",
|
||||||
|
"menu.extras.whisperLists": "悄悄话列表",
|
||||||
|
"menu.extras.whisperHistory": "悄悄话历史",
|
||||||
|
"menu.extras.clientLog": "客户端日志",
|
||||||
|
"menu.extras.banList": "封禁列表",
|
||||||
|
"menu.extras.complaintList": "投诉列表",
|
||||||
|
"menu.extras.offlineMessages": "离线消息",
|
||||||
|
"menu.extras.serverQueryLogin": "ServerQuery 登录",
|
||||||
|
"menu.extras.serverLog": "服务器日志",
|
||||||
|
"menu.extras.startRecording": "开始录音",
|
||||||
|
"menu.extras.startMultitrackRecording": "开始多轨录音",
|
||||||
|
"menu.extras.stopRecording": "停止录音",
|
||||||
|
"menu.extras.options": "选项",
|
||||||
|
|
||||||
|
"toolbar.setAway": "设为离开",
|
||||||
|
"toolbar.backOnline": "恢复在线",
|
||||||
|
"toolbar.awayOptions": "离开选项",
|
||||||
|
"toolbar.whisper": "悄悄话目标",
|
||||||
|
"whisper.channels": "频道",
|
||||||
|
"whisper.clients": "用户",
|
||||||
|
"whisper.clearAll": "清除所有悄悄话目标",
|
||||||
|
"toolbar.micEnable": "启用麦克风",
|
||||||
|
"toolbar.micMute": "麦克风静音",
|
||||||
|
"toolbar.micUnmute": "取消麦克风静音",
|
||||||
|
"toolbar.vadSensitivity": "语音激活灵敏度",
|
||||||
|
"toolbar.muteSound": "关闭声音(拒听)",
|
||||||
|
"toolbar.unmuteSound": "开启声音(取消拒听)",
|
||||||
|
"toolbar.chooseOutputDevice": "选择输出设备",
|
||||||
|
"toolbar.toggleTheme": "切换主题",
|
||||||
|
|
||||||
|
"away.setGlobal": "全局设为离开",
|
||||||
|
"away.setGlobalStatus": "设置全局离开状态",
|
||||||
|
|
||||||
|
"connect.title": "连接",
|
||||||
|
"connect.serverAddress": "服务器昵称或地址:",
|
||||||
|
"connect.serverPassword": "服务器密码:",
|
||||||
|
"connect.nickname": "昵称:",
|
||||||
|
"connect.phoneticNickname": "昵称读音:",
|
||||||
|
"connect.identity": "身份:",
|
||||||
|
"connect.defaultChannel": "默认频道:",
|
||||||
|
"connect.recordingProfile": "录音配置:",
|
||||||
|
"connect.channelPassword": "频道密码:",
|
||||||
|
"connect.playbackProfile": "播放配置:",
|
||||||
|
"connect.onetimeGrant": "一次性权限密钥:",
|
||||||
|
"connect.hotkeyProfile": "快捷键配置:",
|
||||||
|
"connect.sendMyTeamSpeakId": "发送 myTeamSpeak ID",
|
||||||
|
"connect.soundPack": "声音包:",
|
||||||
|
"connect.more": "更多",
|
||||||
|
"connect.less": "收起",
|
||||||
|
"connect.connect": "连接",
|
||||||
|
"connect.connecting": "正在连接…",
|
||||||
|
"connect.newTab": "在新标签页中打开",
|
||||||
|
"connect.cancel": "取消",
|
||||||
|
|
||||||
|
"collectedUrls.title": "收集的链接",
|
||||||
|
"collectedUrls.search": "搜索:",
|
||||||
|
"collectedUrls.url": "链接",
|
||||||
|
"collectedUrls.count": "次数",
|
||||||
|
"collectedUrls.lastSeen": "最后提及",
|
||||||
|
"collectedUrls.mentionedBy": "提及者",
|
||||||
|
"collectedUrls.clearList": "清空列表",
|
||||||
|
|
||||||
|
"inviteFriend.title": "邀请好友",
|
||||||
|
"inviteFriend.type": "邀请类型",
|
||||||
|
"inviteFriend.includeChannel": "包含当前频道",
|
||||||
|
"inviteFriend.link": "链接",
|
||||||
|
"inviteFriend.addPermissionKey": "添加权限密钥",
|
||||||
|
"inviteFriend.copyToClipboard": "复制到剪贴板",
|
||||||
|
"inviteFriend.copied": "已复制!",
|
||||||
|
|
||||||
|
"clientLog.title": "客户端日志",
|
||||||
|
"clientLog.level.critical": "严重",
|
||||||
|
"clientLog.level.error": "错误",
|
||||||
|
"clientLog.level.warning": "警告",
|
||||||
|
"clientLog.level.info": "信息",
|
||||||
|
"clientLog.level.debug": "调试",
|
||||||
|
"clientLog.search": "搜索:",
|
||||||
|
"clientLog.filter": "筛选:",
|
||||||
|
"clientLog.caseSensitive": "区分大小写",
|
||||||
|
"clientLog.mark": "标记",
|
||||||
|
|
||||||
|
"whisperHistory.title": "悄悄话历史 - {server}",
|
||||||
|
"whisperHistory.empty": "暂无悄悄话历史。",
|
||||||
|
"whisperHistory.started": "正在向以下目标发送悄悄话:{targets}",
|
||||||
|
"whisperHistory.stopped": "已停止悄悄话",
|
||||||
|
"whisperHistory.clear": "清除",
|
||||||
|
"whisperHistory.options": "选项",
|
||||||
|
|
||||||
|
"whisperLists.title": "悄悄话列表",
|
||||||
|
"whisperLists.namePlaceholder": "列表名称",
|
||||||
|
"whisperLists.saveCurrent": "保存当前选择",
|
||||||
|
"whisperLists.itemDetail": "{channels} 个频道,{clients} 个用户",
|
||||||
|
"whisperLists.activate": "启用",
|
||||||
|
"whisperLists.delete": "删除",
|
||||||
|
"whisperLists.empty": "尚未保存悄悄话列表。请选择悄悄话目标并在此保存为列表。",
|
||||||
|
|
||||||
|
"identities.title": "身份",
|
||||||
|
"identities.activate": "启用",
|
||||||
|
"identities.add": "新建身份",
|
||||||
|
"identities.delete": "删除",
|
||||||
|
"identities.newName": "新身份",
|
||||||
|
"identities.generated": "已生成",
|
||||||
|
"identities.pending": "将在下次连接时生成",
|
||||||
|
"identities.listLabel": "本地身份",
|
||||||
|
"identities.name": "身份名称:",
|
||||||
|
"identities.phoneticNickname": "昵称读音:",
|
||||||
|
"identities.uniqueId": "唯一 ID:",
|
||||||
|
"identities.unknown": "未知",
|
||||||
|
"identities.setDefault": "设为默认",
|
||||||
|
"identities.isDefault": "当前用作默认身份",
|
||||||
|
"identities.export": "导出",
|
||||||
|
"identities.import": "导入",
|
||||||
|
|
||||||
|
"connectionInfo.clientTitle": "连接信息 - {name}",
|
||||||
|
"connectionInfo.serverTitle": "服务器连接信息",
|
||||||
|
"connectionInfo.loading": "正在加载…",
|
||||||
|
"connectionInfo.unavailable": "服务器无响应(可能缺少权限)。",
|
||||||
|
"connectionInfo.ping": "延迟:",
|
||||||
|
"connectionInfo.connectedSince": "连接时间:",
|
||||||
|
"connectionInfo.ip": "IP 地址:",
|
||||||
|
"connectionInfo.packetLoss": "丢包率:",
|
||||||
|
"connectionInfo.packetsSent": "已发送数据包:",
|
||||||
|
"connectionInfo.packetsReceived": "已接收数据包:",
|
||||||
|
"connectionInfo.bytesSent": "已发送数据:",
|
||||||
|
"connectionInfo.bytesReceived": "已接收数据:",
|
||||||
|
"connectionInfo.bandwidthSent": "发送带宽:",
|
||||||
|
"connectionInfo.bandwidthReceived": "接收带宽:",
|
||||||
|
|
||||||
|
"menu.self.recordingProfile": "录音配置",
|
||||||
|
"menu.self.playbackProfile": "播放配置",
|
||||||
|
"menu.self.hotkeyProfile": "快捷键配置",
|
||||||
|
"menu.self.soundPack": "声音包",
|
||||||
|
"menu.self.setAway": "设为离开",
|
||||||
|
"menu.self.enableMic": "启用麦克风",
|
||||||
|
"menu.self.disableMic": "禁用麦克风",
|
||||||
|
"menu.self.muteOutput": "关闭扬声器/耳机",
|
||||||
|
"menu.self.unmuteOutput": "开启扬声器/耳机",
|
||||||
|
"menu.self.changeNickname": "更改昵称",
|
||||||
|
"menu.self.requestTalkPower": "申请发言权限",
|
||||||
|
"menu.self.setAvatar": "设置头像",
|
||||||
|
"menu.self.setPhoneticNickname": "设置昵称读音",
|
||||||
|
"menu.self.connectionInfo": "连接信息",
|
||||||
|
|
||||||
|
"contacts.title": "联系人",
|
||||||
|
"contacts.addOnlineClient": "选择在线用户...",
|
||||||
|
"contacts.add": "添加",
|
||||||
|
"contacts.remove": "移除",
|
||||||
|
"contacts.empty": "暂无联系人。",
|
||||||
|
"contacts.customName": "自定义名称:",
|
||||||
|
"contacts.category.acquaintance": "熟人",
|
||||||
|
"contacts.category.blocked": "已屏蔽",
|
||||||
|
"contacts.category.friend": "好友",
|
||||||
|
"contacts.phoneticName": "名称读音:",
|
||||||
|
"contacts.show": "显示",
|
||||||
|
"contacts.ignore": "忽略",
|
||||||
|
"contacts.unignore": "取消忽略",
|
||||||
|
"contacts.whisper": "悄悄话",
|
||||||
|
"contacts.preferences": "偏好设置",
|
||||||
|
|
||||||
|
"favorites.title": "🔖 myTeamSpeak 收藏夹",
|
||||||
|
"favorites.synced": "已同步的收藏",
|
||||||
|
"favorites.notLoggedIn": "未登录",
|
||||||
|
"favorites.local": "本地收藏",
|
||||||
|
"favorites.unnamed": "(未命名)",
|
||||||
|
"favorites.bookmarkName": "收藏名称:",
|
||||||
|
"favorites.newFavoriteName": "新收藏",
|
||||||
|
"favorites.showServerQueryClients": "显示 ServerQuery 用户",
|
||||||
|
"favorites.connectOnStartup": "启动时连接",
|
||||||
|
"favorites.enableMyTeamSpeak": "启用 myTeamSpeak 功能",
|
||||||
|
"favorites.new": "新建收藏",
|
||||||
|
"favorites.newFolder": "新建文件夹",
|
||||||
|
"favorites.remove": "移除",
|
||||||
|
"favorites.ok": "确定",
|
||||||
|
"favorites.cancel": "取消",
|
||||||
|
"favorites.apply": "应用",
|
||||||
|
|
||||||
|
"away.dialog.title": "设置离开消息",
|
||||||
|
"away.dialog.message": "消息:",
|
||||||
|
"away.dialog.template": "模板:",
|
||||||
|
"away.dialog.none": "<无>",
|
||||||
|
"away.dialog.ok": "确定",
|
||||||
|
"away.dialog.save": "保存",
|
||||||
|
"away.dialog.cancel": "取消",
|
||||||
|
|
||||||
|
"options.title": "选项",
|
||||||
|
"options.ok": "确定",
|
||||||
|
"options.cancel": "取消",
|
||||||
|
"options.notImplemented": "此设置尚未实现。",
|
||||||
|
"options.section.anwendung": "应用",
|
||||||
|
"options.section.wiedergabe": "播放",
|
||||||
|
"options.section.aufnahme": "录音",
|
||||||
|
"options.section.design": "外观",
|
||||||
|
"options.section.erweiterungen": "扩展",
|
||||||
|
"options.section.hotkeys": "快捷键",
|
||||||
|
"options.section.whispern": "悄悄话",
|
||||||
|
"options.section.downloads": "下载",
|
||||||
|
"options.section.chat": "聊天",
|
||||||
|
"options.section.sicherheit": "安全",
|
||||||
|
"options.section.nachrichten": "消息",
|
||||||
|
"options.section.meldungen": "通知",
|
||||||
|
"options.section.sounds": "声音",
|
||||||
|
|
||||||
|
"app.title": "应用",
|
||||||
|
"app.subtitle": "常规应用设置",
|
||||||
|
"app.language": "语言",
|
||||||
|
"app.language.auto": "跟随系统",
|
||||||
|
"app.language.de": "Deutsch",
|
||||||
|
"app.language.en": "English",
|
||||||
|
"app.language.zh-CN": "简体中文",
|
||||||
|
|
||||||
|
"playback.title": "播放",
|
||||||
|
"playback.subtitle": "更改播放设置",
|
||||||
|
"playback.profile": "配置",
|
||||||
|
"playback.default": "默认",
|
||||||
|
"playback.device": "播放设备:",
|
||||||
|
"playback.systemDefault": "系统默认",
|
||||||
|
"playback.quiet": "安静",
|
||||||
|
"playback.loud": "响亮",
|
||||||
|
"playback.voiceVolume": "语音音量",
|
||||||
|
"playback.playTestTone": "▶ 播放测试音",
|
||||||
|
"playback.options": "选项",
|
||||||
|
"playback.autoVolume": "自动调节音量",
|
||||||
|
"playback.ownMicClicks": "播放自己的麦克风按键音",
|
||||||
|
"playback.otherMicClicks": "播放其他用户的麦克风按键音",
|
||||||
|
|
||||||
|
"recording.title": "录音",
|
||||||
|
"recording.subtitle": "更改录音设置",
|
||||||
|
"recording.device": "录音设备:",
|
||||||
|
"recording.activation": "激活方式",
|
||||||
|
"recording.pushToTalk": "按键说话",
|
||||||
|
"recording.continuous": "持续传输",
|
||||||
|
"recording.voiceActivation": "语音激活检测",
|
||||||
|
"recording.testStart": "开始测试",
|
||||||
|
"recording.testStop": "停止测试",
|
||||||
|
"recording.hangoverDelay": "停止前延迟:",
|
||||||
|
"recording.secondsUnit": "秒",
|
||||||
|
"recording.dsp": "数字信号处理",
|
||||||
|
"recording.typingAttenuation": "键盘声衰减",
|
||||||
|
"recording.echoCancellation": "回声消除",
|
||||||
|
"recording.noiseSuppression": "消除背景噪声",
|
||||||
|
|
||||||
|
"info.address": "地址:",
|
||||||
|
"info.version": "版本:",
|
||||||
|
"info.license": "许可证:",
|
||||||
|
"info.currentClients": "当前用户:",
|
||||||
|
"info.currentChannels": "当前频道:",
|
||||||
|
"info.topic": "主题:",
|
||||||
|
"info.audioCodec": "音频编解码器:",
|
||||||
|
"info.passwordProtected": "密码保护:",
|
||||||
|
"info.clients": "用户:",
|
||||||
|
"info.yes": "是",
|
||||||
|
"info.no": "否",
|
||||||
|
|
||||||
|
"tree.notConnected": "未连接",
|
||||||
|
"tree.clickToSelect": "单击选择,双击加入",
|
||||||
|
"tree.passwordProtected": "受密码保护",
|
||||||
|
"tree.privateChatWith": "与其私聊",
|
||||||
|
"tree.poke": "戳一戳",
|
||||||
|
"tree.channelCommander": "频道指挥官",
|
||||||
|
"tree.away": "离开",
|
||||||
|
"tree.micMuted": "麦克风已静音",
|
||||||
|
"tree.noTalkPower": "在此频道中没有发言权限",
|
||||||
|
"tree.soundMuted": "声音已关闭(拒听)",
|
||||||
|
|
||||||
|
"chat.server": "服务器",
|
||||||
|
"chat.channel": "频道",
|
||||||
|
"chat.notConnected": "未连接",
|
||||||
|
"chat.messageChannel": "向频道发送消息...",
|
||||||
|
"chat.messageServer": "向服务器发送消息...",
|
||||||
|
"chat.messagePartner": "向 {name} 发送消息...",
|
||||||
|
"chat.send": "发送",
|
||||||
|
"chat.you": "你",
|
||||||
|
|
||||||
|
"serverLog.clientJoin": "{client} 进入了频道“{channel}”",
|
||||||
|
"serverLog.clientLeave": "{client} 已断开连接(离开)",
|
||||||
|
"serverLog.clientChannelSwitch": "{client} 从频道“{fromChannel}”移动到“{toChannel}”",
|
||||||
|
"serverLog.clientChannelGroupAssigned": "已将频道组“{group}”分配给 {client}",
|
||||||
|
"serverLog.channelCreated": "频道“{channel}”已创建",
|
||||||
|
"serverLog.channelDeleted": "频道“{channel}”已删除",
|
||||||
|
"serverLog.channelEdited": "频道“{channel}”已编辑",
|
||||||
|
"serverLog.serverEdited": "服务器设置已更改",
|
||||||
|
"serverLog.permissionError": "缺少权限:{action}",
|
||||||
|
|
||||||
|
"poke.title": "戳一戳",
|
||||||
|
"poke.optionalMessage": "可选消息...",
|
||||||
|
"poke.send": "发送",
|
||||||
|
"poke.cancel": "取消",
|
||||||
|
"poke.pokedYou": "戳了你一下",
|
||||||
|
"poke.dismiss": "关闭",
|
||||||
|
|
||||||
|
"kick.title": "踢出:",
|
||||||
|
"kick.reasonPlaceholder": "原因(可选)...",
|
||||||
|
"kick.confirm": "踢出",
|
||||||
|
"kick.cancel": "取消",
|
||||||
|
|
||||||
|
"ban.title": "封禁:",
|
||||||
|
"ban.reasonPlaceholder": "原因(可选)...",
|
||||||
|
"ban.duration": "时长:",
|
||||||
|
"ban.durationPermanent": "永久",
|
||||||
|
"ban.duration1h": "1 小时",
|
||||||
|
"ban.duration1d": "1 天",
|
||||||
|
"ban.duration1w": "1 周",
|
||||||
|
"ban.confirm": "封禁",
|
||||||
|
"ban.cancel": "取消",
|
||||||
|
|
||||||
|
"serverEdit.title": "编辑虚拟服务器",
|
||||||
|
"serverEdit.tab.host": "主机",
|
||||||
|
"serverEdit.tab.misc": "其他",
|
||||||
|
"serverEdit.tab.transmission": "传输",
|
||||||
|
"serverEdit.tab.antiflood": "防刷屏",
|
||||||
|
"serverEdit.tab.security": "安全",
|
||||||
|
"serverEdit.tab.log": "日志",
|
||||||
|
"serverEdit.name": "服务器名称:",
|
||||||
|
"serverEdit.welcomeMessage": "欢迎消息:",
|
||||||
|
"serverEdit.clearPassword": "移除服务器密码",
|
||||||
|
"serverEdit.newPassword": "新服务器密码:",
|
||||||
|
"serverEdit.hostmessage": "主机消息:",
|
||||||
|
"serverEdit.hostmessageMode": "显示模式:",
|
||||||
|
"serverEdit.hostmessageMode.none": "不显示",
|
||||||
|
"serverEdit.hostmessageMode.log": "在日志中显示",
|
||||||
|
"serverEdit.hostmessageMode.modal": "以对话框显示",
|
||||||
|
"serverEdit.hostmessageMode.modalquit": "以对话框显示并断开连接",
|
||||||
|
"serverEdit.hostbannerUrl": "主机横幅链接:",
|
||||||
|
"serverEdit.hostbannerGfxUrl": "主机横幅图片链接:",
|
||||||
|
"serverEdit.hostbannerGfxInterval": "横幅刷新间隔(秒):",
|
||||||
|
"serverEdit.hostbannerMode": "横幅缩放:",
|
||||||
|
"serverEdit.hostbannerMode.noadjust": "不调整",
|
||||||
|
"serverEdit.hostbannerMode.adjustignoreaspect": "调整(忽略宽高比)",
|
||||||
|
"serverEdit.hostbannerMode.adjustkeepaspect": "调整(保持宽高比)",
|
||||||
|
"serverEdit.hostbuttonTooltip": "主机按钮提示:",
|
||||||
|
"serverEdit.hostbuttonUrl": "主机按钮链接:",
|
||||||
|
"serverEdit.hostbuttonGfxUrl": "主机按钮图片链接:",
|
||||||
|
"serverEdit.maxClients": "最大用户数:",
|
||||||
|
"serverEdit.nickname": "服务器昵称:",
|
||||||
|
"serverEdit.phoneticName": "名称读音:",
|
||||||
|
"serverEdit.codecEncryptionMode": "语音加密:",
|
||||||
|
"serverEdit.codecEncryptionMode.perchannel": "可按频道配置",
|
||||||
|
"serverEdit.codecEncryptionMode.forcedoff": "全局禁用",
|
||||||
|
"serverEdit.codecEncryptionMode.forcedon": "全局启用",
|
||||||
|
"serverEdit.unchanged": "保持不变",
|
||||||
|
"serverEdit.save": "保存",
|
||||||
|
"serverEdit.cancel": "取消",
|
||||||
|
|
||||||
|
"serverProtocolLog.title": "服务器日志",
|
||||||
|
"serverProtocolLog.empty": "暂无日志条目。",
|
||||||
|
"banList.title": "封禁列表",
|
||||||
|
"banList.empty": "未找到封禁记录。",
|
||||||
|
"banList.name": "名称",
|
||||||
|
"banList.ip": "IP",
|
||||||
|
"banList.created": "创建时间",
|
||||||
|
"banList.duration": "时长",
|
||||||
|
"banList.invoker": "执行者",
|
||||||
|
"banList.reason": "原因",
|
||||||
|
"banList.permanent": "永久",
|
||||||
|
"banList.delete": "删除",
|
||||||
|
"banList.deleteAll": "全部删除",
|
||||||
|
"complainList.title": "投诉列表",
|
||||||
|
"complainList.empty": "未找到投诉记录。",
|
||||||
|
"complainList.target": "对象",
|
||||||
|
"complainList.from": "来自",
|
||||||
|
"complainList.message": "消息",
|
||||||
|
"complainList.timestamp": "时间",
|
||||||
|
"offlineMessages.title": "离线消息",
|
||||||
|
"offlineMessages.empty": "暂无消息。",
|
||||||
|
"offlineMessages.subject": "主题",
|
||||||
|
"offlineMessages.from": "来自",
|
||||||
|
"offlineMessages.timestamp": "时间",
|
||||||
|
"offlineMessages.targetUid": "目标 UID",
|
||||||
|
"offlineMessages.message": "消息",
|
||||||
|
"offlineMessages.send": "发送",
|
||||||
|
"offlineMessages.new": "新消息",
|
||||||
|
"offlineMessages.markRead": "标记为已读",
|
||||||
|
"offlineMessages.backToList": "返回列表",
|
||||||
|
"dialog.cancel": "取消",
|
||||||
|
|
||||||
|
"groupAssign.channelTitle": "分配频道组",
|
||||||
|
"groupAssign.serverTitle": "分配服务器组",
|
||||||
|
"groupAssign.empty": "未找到组。",
|
||||||
|
"groupAssign.clickToRemove": "单击移除",
|
||||||
|
|
||||||
|
"serverQueryLogin.username": "用户名",
|
||||||
|
"serverQueryLogin.password": "密码",
|
||||||
|
"serverQueryLogin.login": "登录",
|
||||||
|
|
||||||
|
"permissionOverview.title": "我的权限",
|
||||||
|
"permissionOverview.empty": "未找到权限。",
|
||||||
|
"permissionOverview.name": "权限",
|
||||||
|
"permissionOverview.value": "值",
|
||||||
|
"permissionOverview.negated": "否定",
|
||||||
|
"permissionOverview.skip": "跳过",
|
||||||
|
|
||||||
|
"permsEditor.title": "权限",
|
||||||
|
"permsEditor.tab.server": "服务器组",
|
||||||
|
"permsEditor.tab.client": "用户权限",
|
||||||
|
"permsEditor.tab.channel": "频道权限",
|
||||||
|
"permsEditor.tab.channelgroup": "频道组",
|
||||||
|
"permsEditor.tab.channelclient": "频道用户权限",
|
||||||
|
"permsEditor.clientDbId": "唯一用户数据库 ID:",
|
||||||
|
"permsEditor.load": "加载",
|
||||||
|
"permsEditor.pickOnlineClient": "或选择在线用户...",
|
||||||
|
"permsEditor.pickTarget": "请在左侧选择组或频道,或输入用户 ID。",
|
||||||
|
"permsEditor.addPermission": "添加",
|
||||||
|
"permsEditor.searchPermission": "搜索权限...",
|
||||||
|
|
||||||
|
"dialog.ok": "确定",
|
||||||
|
"channelContext.files": "文件...",
|
||||||
|
"fileBrowser.title": "文件传输",
|
||||||
|
"fileBrowser.up": "上一级",
|
||||||
|
"fileBrowser.refresh": "刷新",
|
||||||
|
"fileBrowser.newFolder": "新建文件夹",
|
||||||
|
"fileBrowser.upload": "上传",
|
||||||
|
"fileBrowser.folderName": "文件夹名称",
|
||||||
|
"fileBrowser.empty": "此文件夹为空。",
|
||||||
|
"fileBrowser.name": "名称",
|
||||||
|
"fileBrowser.size": "大小",
|
||||||
|
"fileBrowser.modified": "修改时间",
|
||||||
|
"fileBrowser.download": "下载",
|
||||||
|
"fileBrowser.rename": "重命名",
|
||||||
|
"fileBrowser.delete": "删除",
|
||||||
|
"fileBrowser.deleteConfirm": "确定要删除吗?",
|
||||||
|
"fileBrowser.uploading": "正在上传...",
|
||||||
|
"fileBrowser.downloading": "正在下载...",
|
||||||
|
|
||||||
|
"serverContext.icons": "服务器图标...",
|
||||||
|
"serverIcons.title": "管理服务器图标",
|
||||||
|
"serverIcons.upload": "上传图标",
|
||||||
|
"serverIcons.iconId": "图标 ID",
|
||||||
|
"serverIcons.empty": "未找到图标。",
|
||||||
|
|
||||||
|
"clientContext.privateChat": "私聊",
|
||||||
|
"clientContext.poke": "戳一戳",
|
||||||
|
"clientContext.copyName": "复制名称",
|
||||||
|
"clientContext.connectionInfo": "查看连接信息",
|
||||||
|
"clientContext.addWhisperTarget": "添加为悄悄话目标",
|
||||||
|
"clientContext.removeWhisperTarget": "从悄悄话目标中移除",
|
||||||
|
"clientContext.assignChannelGroup": "分配频道组",
|
||||||
|
"clientContext.assignServerGroup": "分配服务器组",
|
||||||
|
"clientContext.kickChannel": "踢出频道",
|
||||||
|
"clientContext.kick": "踢出服务器",
|
||||||
|
"clientContext.ban": "封禁",
|
||||||
|
"clientContext.notSupported": "网页客户端暂不支持此功能",
|
||||||
|
|
||||||
|
"serverContext.connectionInfo": "服务器连接信息",
|
||||||
|
"serverContext.copyAddress": "复制服务器地址",
|
||||||
|
"serverContext.addFavorite": "添加到收藏夹",
|
||||||
|
"serverContext.disconnect": "断开连接",
|
||||||
|
|
||||||
|
"connectError.dismiss": "关闭",
|
||||||
|
"dialog.close": "关闭",
|
||||||
|
|
||||||
|
"sounds.title": "声音",
|
||||||
|
"sounds.subtitle": "配置事件提示音",
|
||||||
|
"sounds.enable": "启用声音",
|
||||||
|
"sounds.volume": "音量",
|
||||||
|
"sounds.eventEnable": "启用此声音",
|
||||||
|
"sounds.event.connect": "已连接",
|
||||||
|
"sounds.event.disconnect": "已断开",
|
||||||
|
"sounds.event.clientJoin": "用户加入",
|
||||||
|
"sounds.event.clientLeave": "用户离开",
|
||||||
|
"sounds.event.message": "收到消息",
|
||||||
|
"sounds.event.poke": "收到戳一戳",
|
||||||
|
"sounds.default": "默认",
|
||||||
|
"sounds.custom": "自定义文件:{name}",
|
||||||
|
"sounds.test": "▶ 测试",
|
||||||
|
"sounds.upload": "上传",
|
||||||
|
"sounds.reset": "重置",
|
||||||
|
"sounds.importSoundpack": "导入声音包(.ts3soundpack)",
|
||||||
|
"sounds.importResult": "已导入 {matched} 个声音,{unmatched} 个文件未匹配",
|
||||||
|
|
||||||
|
"nachrichten.title": "消息",
|
||||||
|
"nachrichten.subtitle": "自定义消息",
|
||||||
|
"nachrichten.disconnectMessage": "断开连接:",
|
||||||
|
"nachrichten.disconnectMessagePlaceholder": "离开",
|
||||||
|
"nachrichten.presetsTitle": "预设消息",
|
||||||
|
"nachrichten.type": "类型",
|
||||||
|
"nachrichten.type.away": "离开",
|
||||||
|
"nachrichten.templateName": "模板名称",
|
||||||
|
"nachrichten.message": "消息",
|
||||||
|
"nachrichten.add": "添加",
|
||||||
|
"nachrichten.delete": "删除",
|
||||||
|
};
|
||||||
@@ -36,6 +36,11 @@ export interface MicCaptureOptions {
|
|||||||
deviceId?: string;
|
deviceId?: string;
|
||||||
echoCancellation?: boolean;
|
echoCancellation?: boolean;
|
||||||
noiseSuppression?: boolean;
|
noiseSuppression?: boolean;
|
||||||
|
/** Automatic gain control. Exposed as its own toggle (rather than folded into
|
||||||
|
* echoCancellation) because AGC re-amplifying the mic signal after the
|
||||||
|
* browser's own AEC runs can bring back audible echo residue in speaker+mic
|
||||||
|
* (no headset) setups - some users get a cleaner result with it off. */
|
||||||
|
autoGainControl?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,6 +66,7 @@ export class MicCapture {
|
|||||||
private deviceId?: string;
|
private deviceId?: string;
|
||||||
private echoCancellation: boolean;
|
private echoCancellation: boolean;
|
||||||
private noiseSuppression: boolean;
|
private noiseSuppression: boolean;
|
||||||
|
private autoGainControl: boolean;
|
||||||
private context: AudioContext;
|
private context: AudioContext;
|
||||||
threshold: number;
|
threshold: number;
|
||||||
hangoverSeconds: number;
|
hangoverSeconds: number;
|
||||||
@@ -75,6 +81,7 @@ export class MicCapture {
|
|||||||
this.deviceId = options.deviceId;
|
this.deviceId = options.deviceId;
|
||||||
this.echoCancellation = options.echoCancellation ?? true;
|
this.echoCancellation = options.echoCancellation ?? true;
|
||||||
this.noiseSuppression = options.noiseSuppression ?? true;
|
this.noiseSuppression = options.noiseSuppression ?? true;
|
||||||
|
this.autoGainControl = options.autoGainControl ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async start(): Promise<void> {
|
async start(): Promise<void> {
|
||||||
@@ -84,8 +91,15 @@ export class MicCapture {
|
|||||||
this.stream = await navigator.mediaDevices.getUserMedia({
|
this.stream = await navigator.mediaDevices.getUserMedia({
|
||||||
audio: {
|
audio: {
|
||||||
channelCount: 1,
|
channelCount: 1,
|
||||||
|
// Requesting the pipeline's own rate (rather than leaving it to the
|
||||||
|
// device/OS default) avoids an extra internal resampling step ahead
|
||||||
|
// of the browser's own echo canceller - standard constraint, honored
|
||||||
|
// by both Chromium and Firefox, "ideal" so it's not fatal if a device
|
||||||
|
// genuinely can't provide it.
|
||||||
|
sampleRate: { ideal: SAMPLE_RATE },
|
||||||
echoCancellation: this.echoCancellation,
|
echoCancellation: this.echoCancellation,
|
||||||
noiseSuppression: this.noiseSuppression,
|
noiseSuppression: this.noiseSuppression,
|
||||||
|
autoGainControl: this.autoGainControl,
|
||||||
...(this.deviceId ? { deviceId: { exact: this.deviceId } } : {}),
|
...(this.deviceId ? { deviceId: { exact: this.deviceId } } : {}),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user