mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 08:52:51 +08:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc70bc4736 | ||
|
|
603cedd907 | ||
|
|
803cefd653 | ||
|
|
01faa6593c |
No files matched your search
@@ -56,6 +56,7 @@ jobs:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
build-args: WEBSPEAK3_VERSION=${{ github.event.release.tag_name || 'latest' }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -90,6 +90,10 @@ COPY --from=connector-builder /src/connector/target/*/release/ts-connector /app/
|
||||
COPY --from=web-builder /src/web/dist /app/web/dist
|
||||
|
||||
ENV PORT=8080
|
||||
# Release tag, set by .github/workflows/docker-publish.yml. Only used for the
|
||||
# anonymous usage ping (gateway/src/telemetry.ts).
|
||||
ARG WEBSPEAK3_VERSION=unknown
|
||||
ENV WEBSPEAK3_VERSION=$WEBSPEAK3_VERSION
|
||||
ENV WEB_DIST=/app/web/dist
|
||||
ENV CONNECTOR_BIN=/app/connector-bin/ts-connector
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -197,7 +197,7 @@ All optional; add them under `environment:` in your compose override next to `PO
|
||||
| `DEFAULT_SERVER` / `DEFAULT_CHANNEL` | unset | Server (and optionally channel) every visitor auto-connects to — see [Bake in a default server](#2-bake-in-a-default-server). |
|
||||
| `BROADCAST_TOKEN` | unset | Bearer token required to call `/api/broadcast` (send an in-app notice to all connected clients before a maintenance restart). Endpoint 404s while unset. |
|
||||
| `TLS_CERT` / `TLS_KEY` | unset | Paths to serve the gateway over HTTPS/WSS directly instead of behind a reverse proxy/tunnel. Both must be set together. |
|
||||
| `STORE_ENABLED` | off | Set to `1` to turn this gateway's own `/api/store/themes` endpoint on. Only needed if you want to run your own Design Store instead of using the maintainer's shared one (see `STORE_URL` build arg above) — the endpoint 404s while unset. |
|
||||
| `STORE_ENABLED` | off | Set to `1` to turn this gateway's own `/api/store/themes` endpoint on. Only needed if you want to run your own Design Store instead of using the maintainer's shared one (see `STORE_URL` build arg above) — the endpoint 404s while unset. The store can also run as its own process (`node dist/store-server.js`, same image) so redeploying it never drops voice connections; route `/api/store/*` to it in your reverse proxy. |
|
||||
| `STORE_DATA_FILE` | `store-themes.json` in the container's working dir | Where submitted themes (including screenshots) are stored. Mount a volume over this path if they should survive a container recreate. |
|
||||
| `STORE_ALLOWED_ORIGIN` | `*` | CORS origin allowed to call the store endpoint, if you want to restrict it to your own frontend's origin. |
|
||||
| `STORE_ADMIN_TOKEN` | unset | Bearer token for moderation. New submissions wait as "pending" until approved on the review page at `/api/store/admin` (enter the token there); the token holder's own submissions and the reserved author name(s) skip the queue. Without it, nothing ever gets published. Submitted CSS is also checked server-side: no `@import`/`@font-face`, no external `url()` — only inline `data:` images. |
|
||||
@@ -209,6 +209,9 @@ All optional; add them under `environment:` in your compose override next to `PO
|
||||
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `300` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
|
||||
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
|
||||
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
|
||||
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
|
||||
|
||||
> **Anonymous usage ping:** when the gateway starts and then once a day, it sends a random instance ID (made up on first start, stored in `instance-id` in the working directory, used for nothing else) and its version number to `gateway.webspeak3.de`. That's the only way to tell whether anyone self-hosts WebSpeak3 at all, and how many instances still run an old version, e.g. after a security fix. Nothing else is sent: no hostnames, no TeamSpeak servers, no users, no settings. The receiving side doesn't store IP addresses. The startup log says when it's on. Turn it off with `TELEMETRY=0`.
|
||||
|
||||
> **Trust model:** the gateway speaks the TeamSpeak protocol on the user's behalf, so whoever runs it necessarily handles their identity key, server/channel passwords and privilege keys (they're kept out of process listings, but the operator can still see them). Only use gateways you trust, and serve them over HTTPS/WSS (`TLS_CERT`/`TLS_KEY` or a TLS-terminating proxy) - plain HTTP exposes all of that on the wire. File uploads are limited to 24 MiB, downloads to 25 MiB.
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Ts3Connection, type ServerType, type Ts3ConnectOptions } from "./ts3/co
|
||||
import { handleStore } from "./store.js";
|
||||
import { logFeedback, logConnectionEvent } from "./activity-log.js";
|
||||
import { clientIp, createRateLimiter } from "./net.js";
|
||||
import "./telemetry.js";
|
||||
|
||||
const SERVER_TYPES = new Set<ServerType>(["teamspeak", "teaspeak", "auto"]);
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
// --- Receiving end of telemetry.ts ---------------------------------------------
|
||||
//
|
||||
// Only served by store-server.ts, and only with PING_DATA_FILE set. Keeps one
|
||||
// row per instance id: version, first and last seen. No IP addresses, no
|
||||
// request log. The admin view returns counts only.
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { readFile, rename, writeFile } from "node:fs/promises";
|
||||
import { clientIp, createRateLimiter } from "./net.js";
|
||||
import { isAdminRequest } from "./store.js";
|
||||
|
||||
const PING_DATA_FILE = process.env.PING_DATA_FILE;
|
||||
const MAX_INSTANCES = 20_000;
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
const isRateLimited = createRateLimiter(20, 60 * 60 * 1000);
|
||||
|
||||
interface Instance {
|
||||
version: string;
|
||||
firstSeen: string;
|
||||
lastSeen: string;
|
||||
}
|
||||
|
||||
let cache: Record<string, Instance> | null = null;
|
||||
|
||||
async function load(): Promise<Record<string, Instance>> {
|
||||
if (cache) return cache;
|
||||
try {
|
||||
cache = JSON.parse(await readFile(PING_DATA_FILE!, "utf-8")) as Record<string, Instance>;
|
||||
} catch (err) {
|
||||
if ((err as NodeJS.ErrnoException).code !== "ENOENT") throw err;
|
||||
cache = {};
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
async function save(instances: Record<string, Instance>) {
|
||||
// Instances silent for 90 days are gone for good.
|
||||
const cutoff = Date.now() - 90 * DAY_MS;
|
||||
for (const [id, i] of Object.entries(instances)) if (Date.parse(i.lastSeen) < cutoff) delete instances[id];
|
||||
const tmp = `${PING_DATA_FILE}.tmp`;
|
||||
await writeFile(tmp, JSON.stringify(instances), "utf-8");
|
||||
await rename(tmp, PING_DATA_FILE!);
|
||||
}
|
||||
|
||||
function json(res: ServerResponse, status: number, body: unknown) {
|
||||
res.writeHead(status, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify(body));
|
||||
}
|
||||
|
||||
export async function handlePing(req: IncomingMessage, res: ServerResponse, pathname: string) {
|
||||
if (!PING_DATA_FILE) return json(res, 404, { error: "not_found" });
|
||||
|
||||
if (pathname === "/api/ping/stats" && req.method === "GET") {
|
||||
if (!isAdminRequest(req)) return json(res, 401, { error: "unauthorized" });
|
||||
const now = Date.now();
|
||||
const instances = Object.values(await load());
|
||||
const activeSince = (days: number) => instances.filter((i) => now - Date.parse(i.lastSeen) < days * DAY_MS);
|
||||
const versions: Record<string, number> = {};
|
||||
for (const i of activeSince(30)) versions[i.version] = (versions[i.version] ?? 0) + 1;
|
||||
return json(res, 200, {
|
||||
active2d: activeSince(2).length,
|
||||
active7d: activeSince(7).length,
|
||||
active30d: activeSince(30).length,
|
||||
newLast7d: instances.filter((i) => now - Date.parse(i.firstSeen) < 7 * DAY_MS).length,
|
||||
versions,
|
||||
});
|
||||
}
|
||||
|
||||
if (pathname !== "/api/ping" || req.method !== "POST") return json(res, 405, { error: "method_not_allowed" });
|
||||
if (isRateLimited(clientIp(req))) return json(res, 429, { error: "rate_limited" });
|
||||
|
||||
let raw = "";
|
||||
for await (const chunk of req) {
|
||||
raw += chunk;
|
||||
if (raw.length > 500) return json(res, 413, { error: "payload_too_large" });
|
||||
}
|
||||
let body: { id?: unknown; version?: unknown };
|
||||
try {
|
||||
body = JSON.parse(raw || "{}");
|
||||
} catch {
|
||||
return json(res, 400, { error: "invalid_json" });
|
||||
}
|
||||
const { id, version } = body;
|
||||
if (typeof id !== "string" || !/^[0-9a-f-]{36}$/.test(id) || typeof version !== "string" || !/^[\w.+-]{1,40}$/.test(version)) {
|
||||
return json(res, 400, { error: "invalid_ping" });
|
||||
}
|
||||
|
||||
const instances = await load();
|
||||
const now = new Date().toISOString();
|
||||
const known = instances[id];
|
||||
if (!known && Object.keys(instances).length >= MAX_INSTANCES) return json(res, 507, { error: "full" });
|
||||
instances[id] = { version, firstSeen: known?.firstSeen ?? now, lastSeen: now };
|
||||
await save(instances);
|
||||
json(res, 200, { ok: true });
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Standalone Design Store: the same /api/store/* routes index.ts serves, in a
|
||||
// process of its own. Lets the store be redeployed or restarted without
|
||||
// dropping anyone's voice connection. Same image, different command:
|
||||
// node dist/store-server.js (with STORE_ENABLED=1)
|
||||
// The gateway in front of the same hostname then runs with STORE_ENABLED off
|
||||
// and the reverse proxy routes /api/store/* here.
|
||||
import { createServer } from "node:http";
|
||||
import { handleStore } from "./store.js";
|
||||
import { handlePing } from "./ping.js";
|
||||
|
||||
const PORT = Number(process.env.PORT ?? 8080);
|
||||
|
||||
createServer((req, res) => {
|
||||
res.setHeader("X-Content-Type-Options", "nosniff");
|
||||
const { pathname } = new URL(req.url ?? "/", "http://localhost");
|
||||
if (pathname === "/healthz") {
|
||||
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
|
||||
res.end("ok\n");
|
||||
return;
|
||||
}
|
||||
if (pathname === "/api/store/admin" || pathname === "/api/store/themes" || pathname.startsWith("/api/store/themes/")) {
|
||||
handleStore(req, res, pathname).catch((err) => {
|
||||
console.error("[store] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (pathname === "/api/ping" || pathname === "/api/ping/stats") {
|
||||
handlePing(req, res, pathname).catch((err) => {
|
||||
console.error("[ping] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.writeHead(404, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "not_found" }));
|
||||
}).listen(PORT, () => console.log(`WebSpeak3 store listening on http://localhost:${PORT}`));
|
||||
@@ -136,7 +136,7 @@ async function saveStoreThemes(themes: StoreTheme[]): Promise<void> {
|
||||
await rename(tmp, STORE_DATA_FILE);
|
||||
}
|
||||
|
||||
function isAdminRequest(req: IncomingMessage): boolean {
|
||||
export function isAdminRequest(req: IncomingMessage): boolean {
|
||||
const authHeader = req.headers.authorization ?? "";
|
||||
return authHeader.startsWith("Bearer ") && isValidStoreAdminToken(authHeader.slice("Bearer ".length));
|
||||
}
|
||||
@@ -367,6 +367,13 @@ async function handleStoreSubmit(req: IncomingMessage, res: ServerResponse) {
|
||||
}
|
||||
|
||||
const themes = await loadStoreThemes();
|
||||
// Re-uploading an installed store theme unchanged would just duplicate it.
|
||||
const cssKey = normalizeCss(css).replace(/\s+/g, "");
|
||||
if (themes.some((t) => normalizeCss(t.css).replace(/\s+/g, "") === cssKey)) {
|
||||
res.writeHead(409, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "duplicate" }));
|
||||
return;
|
||||
}
|
||||
if (themes.length >= STORE_MAX_THEMES) {
|
||||
res.writeHead(507, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "store_full" }));
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
// --- Anonymous usage ping ----------------------------------------------------
|
||||
//
|
||||
// Once at startup and then once a day, the gateway tells webspeak3.de that an
|
||||
// instance is running. That's the only way to know whether anyone self-hosts
|
||||
// at all, and which versions are still out there (e.g. before dropping
|
||||
// support for something or after a security fix).
|
||||
//
|
||||
// Sent: a random instance id (generated here, used for nothing else) and the
|
||||
// version. Not sent: hostnames, TeamSpeak servers, user counts, settings.
|
||||
// The receiving side stores no IP addresses (see ping.ts).
|
||||
//
|
||||
// On by default, off with TELEMETRY=0. Said so in the startup log, too.
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import path from "node:path";
|
||||
|
||||
const TELEMETRY_URL = process.env.TELEMETRY_URL || "https://gateway.webspeak3.de/api/ping";
|
||||
const VERSION = process.env.WEBSPEAK3_VERSION || "unknown";
|
||||
// ponytail: without a volume over the working directory a container recreate
|
||||
// makes a new id, so an update counts twice for a day or so.
|
||||
const ID_FILE = process.env.TELEMETRY_ID_FILE ?? path.resolve(process.cwd(), "instance-id");
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
|
||||
async function instanceId(): Promise<string> {
|
||||
try {
|
||||
const id = (await readFile(ID_FILE, "utf-8")).trim();
|
||||
if (/^[0-9a-f-]{36}$/.test(id)) return id;
|
||||
} catch {
|
||||
// first start - fall through
|
||||
}
|
||||
const id = randomUUID();
|
||||
await writeFile(ID_FILE, id + "\n").catch(() => {});
|
||||
return id;
|
||||
}
|
||||
|
||||
async function ping(id: string) {
|
||||
try {
|
||||
await fetch(TELEMETRY_URL, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ id, version: VERSION }),
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
});
|
||||
} catch {
|
||||
// Offline or blocked - not worth a log line every day.
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.TELEMETRY !== "0") {
|
||||
console.log(
|
||||
`Sending an anonymous usage ping (random instance id + version ${VERSION}) to ${new URL(TELEMETRY_URL).host} at startup and once a day. Disable with TELEMETRY=0.`
|
||||
);
|
||||
void instanceId().then((id) => {
|
||||
void ping(id);
|
||||
setInterval(() => void ping(id), DAY_MS).unref();
|
||||
});
|
||||
}
|
||||
+37
-1
@@ -74,7 +74,21 @@
|
||||
}
|
||||
|
||||
/* Nova: alternate design, independent of the light/dark toggle (always dark). */
|
||||
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap");
|
||||
/* Self-hosted (OFL) so no visitor IP goes to Google Fonts. */
|
||||
@font-face {
|
||||
font-family: "Manrope";
|
||||
font-weight: 500 800;
|
||||
font-display: swap;
|
||||
src: url("./assets/fonts/manrope-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Manrope";
|
||||
font-weight: 500 800;
|
||||
font-display: swap;
|
||||
src: url("./assets/fonts/manrope-latin-ext.woff2") format("woff2");
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
:where(.ts-app.ts-design-nova) {
|
||||
--success: oklch(0.75 0.15 150);
|
||||
@@ -1720,6 +1734,28 @@
|
||||
margin: 0 0.2rem;
|
||||
}
|
||||
|
||||
.ts-ptt-button {
|
||||
/* Holding it on a phone must not scroll, zoom or pop the long-press menu */
|
||||
touch-action: none;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
|
||||
.ts-ptt-key-listening {
|
||||
outline: 2px solid var(--accent);
|
||||
}
|
||||
|
||||
.ts-hotkeys-table td {
|
||||
padding: 0.2rem 1rem 0.2rem 0;
|
||||
}
|
||||
|
||||
.ts-hotkeys-table kbd {
|
||||
font-family: inherit;
|
||||
padding: 0.05rem 0.4rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-icon-slider,
|
||||
.ts-icon-select {
|
||||
display: flex;
|
||||
|
||||
+283
-16
@@ -132,6 +132,7 @@ import {
|
||||
loadSoundsEnabled,
|
||||
loadSoundsVolume,
|
||||
playSound,
|
||||
setSoundStyle,
|
||||
saveCustomSound,
|
||||
saveEventSoundEnabled,
|
||||
saveSoundsEnabled,
|
||||
@@ -390,6 +391,8 @@ const ECHO_CANCELLATION_KEY = "webspeak3:echo-cancellation";
|
||||
const AUTO_GAIN_CONTROL_KEY = "webspeak3:auto-gain-control";
|
||||
const AEC3_ENABLED_KEY = "webspeak3:aec3-enabled";
|
||||
const VAD_HANGOVER_KEY = "webspeak3:vad-hangover";
|
||||
const PUSH_TO_TALK_KEY = "webspeak3:push-to-talk";
|
||||
const PTT_BINDING_KEY = "webspeak3:ptt-key";
|
||||
const DESIGN_THEME_KEY = "webspeak3:design-theme";
|
||||
// The user's actual pick - "standard" | "nova" | "greenteaspeak" | "custom:<id>".
|
||||
// DESIGN_THEME_KEY above keeps tracking just the resolved structural base, since a
|
||||
@@ -504,6 +507,29 @@ function loadBoolPref(key: string, fallback: boolean): boolean {
|
||||
return raw === null ? fallback : raw === "1";
|
||||
}
|
||||
|
||||
interface PttBinding {
|
||||
code: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
function loadPttBinding(): PttBinding | null {
|
||||
try {
|
||||
const v = JSON.parse(localStorage.getItem(PTT_BINDING_KEY) ?? "null");
|
||||
return v && typeof v.code === "string" && typeof v.label === "string" ? v : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function keyBindingLabel(e: KeyboardEvent): string {
|
||||
return e.key.length === 1 && e.key !== " " ? e.key.toUpperCase() : e.code;
|
||||
}
|
||||
|
||||
function isTypingTarget(target: EventTarget | null): boolean {
|
||||
const el = target as HTMLElement | null;
|
||||
return !!el && (el.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName));
|
||||
}
|
||||
|
||||
function loadNumberPref(key: string, fallback: number): number {
|
||||
const raw = localStorage.getItem(key);
|
||||
const parsed = raw === null ? NaN : Number(raw);
|
||||
@@ -565,6 +591,7 @@ const AWAY_PRESETS_KEY = "webspeak3:away-presets";
|
||||
/** "off" hides the server banner: it loads from whatever host the server
|
||||
* admin picked, which then sees the viewer's IP (review S12). */
|
||||
const SERVER_BANNER_KEY = "webspeak3:server-banner";
|
||||
const IDE_PIXEL_FONT_KEY = "webspeak3:ide-pixel-font";
|
||||
// Off by default: an inline chat image loads from whatever host the sender picked.
|
||||
const CHAT_IMAGES_KEY = "webspeak3:chat-images";
|
||||
const DISCONNECT_MESSAGE_KEY = "webspeak3:disconnect-message";
|
||||
@@ -5287,6 +5314,10 @@ interface AudioSettings {
|
||||
onVadThresholdChange: (v: number) => void;
|
||||
vadHangover: number;
|
||||
onVadHangoverChange: (v: number) => void;
|
||||
pushToTalk: boolean;
|
||||
onPushToTalkChange: (on: boolean) => void;
|
||||
pttBinding: PttBinding | null;
|
||||
onPttBindingChange: (binding: PttBinding) => void;
|
||||
noiseSuppressionEnabled: boolean;
|
||||
onToggleNoiseSuppression: () => void;
|
||||
echoCancellationEnabled: boolean;
|
||||
@@ -5298,6 +5329,88 @@ interface AudioSettings {
|
||||
onToggleAec3: () => void;
|
||||
}
|
||||
|
||||
function PttKeyButton({ binding, onChange }: { binding: PttBinding | null; onChange: (b: PttBinding) => void }) {
|
||||
const t = useT();
|
||||
const [listening, setListening] = useState(false);
|
||||
useEffect(() => {
|
||||
if (!listening) return;
|
||||
// Capture phase on window: the next key or mouse button wins wherever the
|
||||
// pointer is, and never reaches the dialog (Escape) or the live PTT listener.
|
||||
const take = (e: Event, next?: PttBinding) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
setListening(false);
|
||||
if (next) onChange(next);
|
||||
};
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
if (e.key === "Tab") return setListening(false);
|
||||
take(e, e.key === "Escape" ? undefined : { code: e.code, label: keyBindingLabel(e) });
|
||||
};
|
||||
const onMouse = (e: MouseEvent) => {
|
||||
// Left click is how you started (and how you click away), so it can't be PTT.
|
||||
if (e.button === 0) return setListening(false);
|
||||
take(e, { code: `Mouse${e.button}`, label: `Mouse ${e.button + 1}` });
|
||||
// The back/forward side buttons navigate on release; keep the page.
|
||||
window.addEventListener("mouseup", (up) => up.preventDefault(), { capture: true, once: true });
|
||||
};
|
||||
window.addEventListener("keydown", onKey, true);
|
||||
window.addEventListener("mousedown", onMouse, true);
|
||||
return () => {
|
||||
window.removeEventListener("keydown", onKey, true);
|
||||
window.removeEventListener("mousedown", onMouse, true);
|
||||
};
|
||||
}, [listening, onChange]);
|
||||
return (
|
||||
<button className={listening ? "ts-ptt-key-listening" : undefined} onClick={() => setListening(true)}>
|
||||
{listening ? t("recording.pttKeyPress") : (binding?.label ?? t("recording.pttKeyNone"))}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
function HotkeysPanel({ audio }: { audio: AudioSettings }) {
|
||||
const t = useT();
|
||||
return (
|
||||
<>
|
||||
<h3>{t("options.section.hotkeys")}</h3>
|
||||
<p className="ts-options-subtitle">{t("hotkeys.subtitle")}</p>
|
||||
<fieldset className="ts-options-fieldset">
|
||||
<legend>{t("recording.pushToTalk")}</legend>
|
||||
<label className="ts-options-checkbox">
|
||||
<input type="checkbox" checked={audio.pushToTalk} onChange={(e) => audio.onPushToTalkChange(e.target.checked)} />
|
||||
{t("hotkeys.pttEnabled")}
|
||||
</label>
|
||||
<div className="ts-options-field-row">
|
||||
{t("recording.pttKey")}
|
||||
<PttKeyButton binding={audio.pttBinding} onChange={audio.onPttBindingChange} />
|
||||
</div>
|
||||
<p className="ts-options-hint">{t("recording.pttHint")}</p>
|
||||
</fieldset>
|
||||
<fieldset className="ts-options-fieldset">
|
||||
<legend>{t("hotkeys.shortcuts")}</legend>
|
||||
<table className="ts-hotkeys-table">
|
||||
<tbody>
|
||||
{(
|
||||
[
|
||||
["Ctrl + S", "menu.connections.connect"],
|
||||
["Ctrl + D", "menu.connections.disconnectCurrent"],
|
||||
["Ctrl + B", "menu.favorites.add"],
|
||||
] as const
|
||||
).map(([keys, label]) => (
|
||||
<tr key={keys}>
|
||||
<td>
|
||||
<kbd>{keys}</kbd>
|
||||
</td>
|
||||
<td>{t(label)}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
<p className="ts-options-hint">{t("hotkeys.shortcutsHint")}</p>
|
||||
</fieldset>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function MicLevelBar({ levelRef, active }: { levelRef: React.MutableRefObject<number>; active: boolean }) {
|
||||
const [level, setLevel] = useState(0);
|
||||
useEffect(() => {
|
||||
@@ -5421,15 +5534,34 @@ function AufnahmePanel({ audio }: { audio: AudioSettings }) {
|
||||
<fieldset className="ts-options-fieldset">
|
||||
<legend>{t("recording.activation")}</legend>
|
||||
<label className="ts-options-radio">
|
||||
<input type="radio" name="activation" disabled readOnly />
|
||||
<input
|
||||
type="radio"
|
||||
name="activation"
|
||||
checked={audio.pushToTalk}
|
||||
onChange={() => audio.onPushToTalkChange(true)}
|
||||
/>
|
||||
{t("recording.pushToTalk")}
|
||||
</label>
|
||||
{audio.pushToTalk && (
|
||||
<>
|
||||
<div className="ts-options-field-row">
|
||||
{t("recording.pttKey")}
|
||||
<PttKeyButton binding={audio.pttBinding} onChange={audio.onPttBindingChange} />
|
||||
</div>
|
||||
<p className="ts-options-hint">{t("recording.pttHint")}</p>
|
||||
</>
|
||||
)}
|
||||
<label className="ts-options-radio">
|
||||
<input type="radio" name="activation" disabled readOnly />
|
||||
{t("recording.continuous")}
|
||||
</label>
|
||||
<label className="ts-options-radio">
|
||||
<input type="radio" name="activation" checked readOnly />
|
||||
<input
|
||||
type="radio"
|
||||
name="activation"
|
||||
checked={!audio.pushToTalk}
|
||||
onChange={() => audio.onPushToTalkChange(false)}
|
||||
/>
|
||||
{t("recording.voiceActivation")}
|
||||
</label>
|
||||
<div className="ts-options-level-wrap">
|
||||
@@ -5589,12 +5721,16 @@ function DesignPanel({
|
||||
customThemes,
|
||||
onSaveCustomTheme,
|
||||
onDeleteCustomTheme,
|
||||
idePixelFont,
|
||||
onIdePixelFontChange,
|
||||
}: {
|
||||
designSelection: string;
|
||||
onSelectionChange: (next: string) => void;
|
||||
customThemes: CustomTheme[];
|
||||
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||
onDeleteCustomTheme: (id: string) => void;
|
||||
idePixelFont: boolean;
|
||||
onIdePixelFontChange: (on: boolean) => void;
|
||||
}) {
|
||||
const t = useT();
|
||||
const [editing, setEditing] = useState<CustomThemeDraft | null>(null);
|
||||
@@ -5712,6 +5848,12 @@ function DesignPanel({
|
||||
<>
|
||||
<h3>{t("options.section.design")}</h3>
|
||||
<p className="ts-options-subtitle">{t("design.subtitle")}</p>
|
||||
{resolveDesignThemeBase(designSelection, customThemes) === "ide" && (
|
||||
<label className="ts-options-checkbox">
|
||||
<input type="checkbox" checked={idePixelFont} onChange={(e) => onIdePixelFontChange(e.target.checked)} />
|
||||
{t("design.idePixelFont")}
|
||||
</label>
|
||||
)}
|
||||
<div className="ts-design-theme-grid">
|
||||
{builtins.map((th) => (
|
||||
<button
|
||||
@@ -5826,7 +5968,7 @@ function DesignStorePanel({
|
||||
() => localStorage.getItem(STORE_ADMIN_TOKEN_KEY) ?? ""
|
||||
);
|
||||
const [publishing, setPublishing] = useState(false);
|
||||
const [publishResult, setPublishResult] = useState<"ok" | "pending" | "error" | null>(null);
|
||||
const [publishResult, setPublishResult] = useState<"ok" | "pending" | "duplicate" | "error" | null>(null);
|
||||
const [ratedIds, setRatedIds] = useState<Set<string>>(new Set());
|
||||
|
||||
const refreshThemes = () =>
|
||||
@@ -5905,6 +6047,10 @@ function DesignStorePanel({
|
||||
screenshot: publishScreenshot ?? undefined,
|
||||
}),
|
||||
});
|
||||
if (res.status === 409) {
|
||||
setPublishResult("duplicate");
|
||||
return;
|
||||
}
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
const body = (await res.json().catch(() => ({}))) as { status?: string };
|
||||
setPublishResult(body.status === "pending" ? "pending" : "ok");
|
||||
@@ -6056,6 +6202,7 @@ function DesignStorePanel({
|
||||
</button>
|
||||
{publishResult === "ok" && <p className="ts-options-subtitle">{t("design.store.publish.success")}</p>}
|
||||
{publishResult === "pending" && <p className="ts-options-subtitle">{t("design.store.publish.pending")}</p>}
|
||||
{publishResult === "duplicate" && <p className="ts-options-subtitle">{t("design.store.publish.duplicate")}</p>}
|
||||
{publishResult === "error" && <p className="ts-options-subtitle">{t("design.store.publish.error")}</p>}
|
||||
</>
|
||||
)}
|
||||
@@ -6347,6 +6494,8 @@ function OptionsDialog({
|
||||
customThemes,
|
||||
onSaveCustomTheme,
|
||||
onDeleteCustomTheme,
|
||||
idePixelFont,
|
||||
onIdePixelFontChange,
|
||||
showServerBanner,
|
||||
onShowServerBannerChange,
|
||||
chatImages,
|
||||
@@ -6361,6 +6510,8 @@ function OptionsDialog({
|
||||
customThemes: CustomTheme[];
|
||||
onSaveCustomTheme: (theme: CustomTheme) => void;
|
||||
onDeleteCustomTheme: (id: string) => void;
|
||||
idePixelFont: boolean;
|
||||
onIdePixelFontChange: (on: boolean) => void;
|
||||
showServerBanner: boolean;
|
||||
onShowServerBannerChange: (on: boolean) => void;
|
||||
chatImages: boolean;
|
||||
@@ -6403,6 +6554,8 @@ function OptionsDialog({
|
||||
<WiedergabePanel audio={audio} />
|
||||
) : active.id === "aufnahme" ? (
|
||||
<AufnahmePanel audio={audio} />
|
||||
) : active.id === "hotkeys" ? (
|
||||
<HotkeysPanel audio={audio} />
|
||||
) : active.id === "sounds" ? (
|
||||
<SoundsPanel />
|
||||
) : active.id === "design" ? (
|
||||
@@ -6412,6 +6565,8 @@ function OptionsDialog({
|
||||
customThemes={customThemes}
|
||||
onSaveCustomTheme={onSaveCustomTheme}
|
||||
onDeleteCustomTheme={onDeleteCustomTheme}
|
||||
idePixelFont={idePixelFont}
|
||||
onIdePixelFontChange={onIdePixelFontChange}
|
||||
/>
|
||||
) : active.id === "nachrichten" ? (
|
||||
<NachrichtenPanel />
|
||||
@@ -6749,6 +6904,7 @@ function AppInner() {
|
||||
const [serverLicenseId, setServerLicenseId] = useState(0);
|
||||
const [serverBannerUrl, setServerBannerUrl] = useState("");
|
||||
const [showServerBanner, setShowServerBanner] = useState(() => localStorage.getItem(SERVER_BANNER_KEY) !== "off");
|
||||
const [idePixelFont, setIdePixelFont] = useState(() => localStorage.getItem(IDE_PIXEL_FONT_KEY) !== "off");
|
||||
const [chatImages, setChatImages] = useState(() => localStorage.getItem(CHAT_IMAGES_KEY) === "on");
|
||||
const [serverWelcomeMessage, setServerWelcomeMessage] = useState("");
|
||||
const [serverEditOpen, setServerEditOpen] = useState(false);
|
||||
@@ -6849,6 +7005,7 @@ function AppInner() {
|
||||
// "greenteaspeak" behavior keeps working unchanged, whether that behavior
|
||||
// came from picking the builtin directly or from a custom theme on top of it.
|
||||
const designTheme: DesignTheme = resolveDesignThemeBase(designSelection, customThemes);
|
||||
useEffect(() => setSoundStyle(designTheme === "ide" ? "ide" : "classic"), [designTheme]);
|
||||
const handleDesignSelectionChange = (next: string) => {
|
||||
setDesignSelection(next);
|
||||
localStorage.setItem(DESIGN_SELECTION_KEY, next);
|
||||
@@ -6893,6 +7050,12 @@ function AppInner() {
|
||||
const [selfActive, setSelfActive] = useState(false);
|
||||
const [vadThreshold, setVadThreshold] = useState(0.02);
|
||||
const [vadHangover, setVadHangover] = useState(() => loadNumberPref(VAD_HANGOVER_KEY, 0.3));
|
||||
const [pushToTalk, setPushToTalk] = useState(() => loadBoolPref(PUSH_TO_TALK_KEY, false));
|
||||
const [pttBinding, setPttBinding] = useState<PttBinding | null>(loadPttBinding);
|
||||
const [pttPressed, setPttPressed] = useState(false);
|
||||
// Read when a new MicCapture is created, which happens outside render.
|
||||
const pushToTalkRef = useRef(pushToTalk);
|
||||
const pttPressedRef = useRef(false);
|
||||
const [outputDevices, setOutputDevices] = useState<MediaDeviceInfo[]>([]);
|
||||
const [outputDeviceId, setOutputDeviceId] = useState("");
|
||||
const [inputDevices, setInputDevices] = useState<MediaDeviceInfo[]>([]);
|
||||
@@ -7112,6 +7275,64 @@ function AppInner() {
|
||||
localStorage.setItem(VAD_HANGOVER_KEY, String(vadHangover));
|
||||
}, [vadHangover]);
|
||||
|
||||
useEffect(() => {
|
||||
pushToTalkRef.current = pushToTalk;
|
||||
if (micCaptureRef.current) micCaptureRef.current.pushToTalk = pushToTalk;
|
||||
localStorage.setItem(PUSH_TO_TALK_KEY, pushToTalk ? "1" : "0");
|
||||
}, [pushToTalk]);
|
||||
|
||||
useEffect(() => {
|
||||
pttPressedRef.current = pttPressed;
|
||||
if (micCaptureRef.current) micCaptureRef.current.pttPressed = pttPressed;
|
||||
}, [pttPressed]);
|
||||
|
||||
useEffect(() => {
|
||||
if (pttBinding) localStorage.setItem(PTT_BINDING_KEY, JSON.stringify(pttBinding));
|
||||
}, [pttBinding]);
|
||||
|
||||
// Browsers only deliver keys while this tab has focus - there's no global
|
||||
// hotkey for websites, so PTT can't work while another program is in front.
|
||||
useEffect(() => {
|
||||
if (!pushToTalk || !pttBinding) return;
|
||||
const onKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.code !== pttBinding.code || e.defaultPrevented) return;
|
||||
// A letter key still has to type in chat; F-keys or modifiers work anywhere.
|
||||
if (e.key.length === 1 && isTypingTarget(e.target)) return;
|
||||
if (!isTypingTarget(e.target)) e.preventDefault();
|
||||
setPttPressed(true);
|
||||
};
|
||||
const onKeyUp = (e: KeyboardEvent) => {
|
||||
if (e.code === pttBinding.code) setPttPressed(false);
|
||||
};
|
||||
// preventDefault: no middle-click autoscroll, no back/forward navigation
|
||||
// from the side buttons (which fires on release).
|
||||
const onMouseDown = (e: MouseEvent) => {
|
||||
if (`Mouse${e.button}` !== pttBinding.code) return;
|
||||
e.preventDefault();
|
||||
setPttPressed(true);
|
||||
};
|
||||
const onMouseUp = (e: MouseEvent) => {
|
||||
if (`Mouse${e.button}` !== pttBinding.code) return;
|
||||
e.preventDefault();
|
||||
setPttPressed(false);
|
||||
};
|
||||
// The keyup goes to whatever has focus next; don't leave the mic open.
|
||||
const release = () => setPttPressed(false);
|
||||
window.addEventListener("keydown", onKeyDown);
|
||||
window.addEventListener("keyup", onKeyUp);
|
||||
window.addEventListener("mousedown", onMouseDown);
|
||||
window.addEventListener("mouseup", onMouseUp);
|
||||
window.addEventListener("blur", release);
|
||||
return () => {
|
||||
window.removeEventListener("keydown", onKeyDown);
|
||||
window.removeEventListener("keyup", onKeyUp);
|
||||
window.removeEventListener("mousedown", onMouseDown);
|
||||
window.removeEventListener("mouseup", onMouseUp);
|
||||
window.removeEventListener("blur", release);
|
||||
release();
|
||||
};
|
||||
}, [pushToTalk, pttBinding]);
|
||||
|
||||
useEffect(() => {
|
||||
audioPlayerRef.current?.setVolume(playbackVolume);
|
||||
localStorage.setItem(PLAYBACK_VOLUME_KEY, String(playbackVolume));
|
||||
@@ -8843,6 +9064,8 @@ function AppInner() {
|
||||
}
|
||||
micCaptureRef.current?.stop();
|
||||
micCaptureRef.current = mic;
|
||||
mic.pushToTalk = pushToTalkRef.current;
|
||||
mic.pttPressed = pttPressedRef.current;
|
||||
mic.setExtraAudio(tabAudioRef.current);
|
||||
setMicOn(true);
|
||||
refreshOutputDevices();
|
||||
@@ -8872,6 +9095,7 @@ function AppInner() {
|
||||
return;
|
||||
}
|
||||
socketRef.current?.send(JSON.stringify({ type: "setInputMuted", muted: !inputMutedRef.current }));
|
||||
void playSound("mute");
|
||||
};
|
||||
|
||||
// Enable the mic automatically on page load (voice activation still gates
|
||||
@@ -9002,6 +9226,7 @@ function AppInner() {
|
||||
|
||||
const handleToggleOutputMuted = () => {
|
||||
socketRef.current?.send(JSON.stringify({ type: "setOutputMuted", muted: !outputMutedRef.current }));
|
||||
void playSound("mute");
|
||||
};
|
||||
|
||||
// Connects the current mic (if any) into the active recording, so a device
|
||||
@@ -9963,7 +10188,9 @@ function AppInner() {
|
||||
<div
|
||||
className={`ts-app ts-theme-${theme}${designThemeClassName(designTheme)}${
|
||||
activeCustomTheme ? " ts-design-custom" : ""
|
||||
}${demoForceMobile ? " ts-force-mobile" : ""}${novaSplash ? " ts-nova-splash" : ""}`}
|
||||
}${demoForceMobile ? " ts-force-mobile" : ""}${novaSplash ? " ts-nova-splash" : ""}${
|
||||
designTheme === "ide" && !idePixelFont ? " ts-ide-plain-font" : ""
|
||||
}`}
|
||||
data-custom-theme={activeCustomTheme?.id}
|
||||
data-design-theme={designTheme}
|
||||
>
|
||||
@@ -10671,18 +10898,45 @@ function AppInner() {
|
||||
>
|
||||
{micOn && !inputMuted ? "🎤" : "🔇"}
|
||||
</button>
|
||||
<label className="ts-icon-slider" title={t("toolbar.vadSensitivity")}>
|
||||
🎚️
|
||||
<input
|
||||
type="range"
|
||||
min={0.002}
|
||||
max={0.15}
|
||||
step={0.002}
|
||||
value={vadThreshold}
|
||||
onChange={(e) => setVadThreshold(Number(e.target.value))}
|
||||
aria-label={t("toolbar.vadSensitivity")}
|
||||
/>
|
||||
</label>
|
||||
{pushToTalk ? (
|
||||
<button
|
||||
className={`ts-icon-button ts-ptt-button${pttPressed ? " ts-mic-on" : ""}`}
|
||||
onPointerDown={(e) => {
|
||||
e.currentTarget.setPointerCapture(e.pointerId);
|
||||
setPttPressed(true);
|
||||
}}
|
||||
onPointerUp={() => setPttPressed(false)}
|
||||
onPointerCancel={() => setPttPressed(false)}
|
||||
onKeyDown={(e) => {
|
||||
if ((e.key === " " || e.key === "Enter") && !e.repeat) {
|
||||
e.preventDefault();
|
||||
setPttPressed(true);
|
||||
}
|
||||
}}
|
||||
onKeyUp={(e) => {
|
||||
if (e.key === " " || e.key === "Enter") setPttPressed(false);
|
||||
}}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
title={t("toolbar.pushToTalk")}
|
||||
aria-label={t("toolbar.pushToTalk")}
|
||||
aria-pressed={pttPressed}
|
||||
>
|
||||
🗣️
|
||||
</button>
|
||||
) : (
|
||||
<label className="ts-icon-slider" title={t("toolbar.vadSensitivity")}>
|
||||
🎚️
|
||||
<input
|
||||
type="range"
|
||||
min={0.002}
|
||||
max={0.15}
|
||||
step={0.002}
|
||||
value={vadThreshold}
|
||||
onChange={(e) => setVadThreshold(Number(e.target.value))}
|
||||
aria-label={t("toolbar.vadSensitivity")}
|
||||
/>
|
||||
</label>
|
||||
)}
|
||||
<button
|
||||
className={`ts-icon-button${publishState === "live" ? " ts-mic-on" : ""}`}
|
||||
onClick={handleStreamButton}
|
||||
@@ -11077,6 +11331,15 @@ function AppInner() {
|
||||
customThemes={customThemes}
|
||||
onSaveCustomTheme={handleSaveCustomTheme}
|
||||
onDeleteCustomTheme={handleDeleteCustomTheme}
|
||||
idePixelFont={idePixelFont}
|
||||
onIdePixelFontChange={(on) => {
|
||||
setIdePixelFont(on);
|
||||
try {
|
||||
localStorage.setItem(IDE_PIXEL_FONT_KEY, on ? "on" : "off");
|
||||
} catch {
|
||||
/* private mode: setting just doesn't persist */
|
||||
}
|
||||
}}
|
||||
showServerBanner={showServerBanner}
|
||||
onShowServerBannerChange={(on) => {
|
||||
setShowServerBanner(on);
|
||||
@@ -11115,6 +11378,10 @@ function AppInner() {
|
||||
onVadThresholdChange: setVadThreshold,
|
||||
vadHangover,
|
||||
onVadHangoverChange: setVadHangover,
|
||||
pushToTalk,
|
||||
onPushToTalkChange: setPushToTalk,
|
||||
pttBinding,
|
||||
onPttBindingChange: setPttBinding,
|
||||
noiseSuppressionEnabled,
|
||||
onToggleNoiseSuppression: handleToggleNoiseSuppression,
|
||||
echoCancellationEnabled,
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2018 The Manrope Project Authors (https://github.com/googlefonts/manrope)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2011, The VT323 Project Authors (peter.hull@oikoi.com)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -90,6 +90,7 @@
|
||||
"toolbar.micMute": "Ztlumit mikrofon",
|
||||
"toolbar.micUnmute": "Zrušit ztlumení mikrofonu",
|
||||
"toolbar.vadSensitivity": "Citlivost aktivace hlasem",
|
||||
"toolbar.pushToTalk": "Držte pro mluvení",
|
||||
"tabAudio.start": "Sdílet zvuk karty nebo okna do hlasového kanálu (sluchátka zabrání ozvěně)",
|
||||
"tabAudio.stop": "Zastavit sdílení zvuku",
|
||||
"tabAudio.noAudio": "Nebyl sdílen žádný zvuk. Ve výběru zvolte kartu nebo okno a zapněte jeho zvuk.",
|
||||
@@ -278,6 +279,7 @@
|
||||
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "Technické, ploché rozvržení ve stylu IDE pro pokročilé uživatele.",
|
||||
"design.idePixelFont": "Pixelové terminálové písmo",
|
||||
"design.status.connected": "Připojeno",
|
||||
"design.custom.new": "+ Nový vzhled",
|
||||
"design.custom.import": "Importovat vzhled",
|
||||
@@ -322,6 +324,7 @@
|
||||
"design.store.publish.submit": "Publikovat do obchodu",
|
||||
"design.store.publish.success": "Vzhled byl publikován!",
|
||||
"design.store.publish.pending": "Děkujeme! Váš vzhled byl odeslán a po kontrole se objeví v obchodě.",
|
||||
"design.store.publish.duplicate": "Tento vzhled už v obchodě je. Před dalším zveřejněním ho trochu upravte.",
|
||||
"design.store.publish.error": "Publikování se nezdařilo.",
|
||||
"options.section.erweiterungen": "Doplňky",
|
||||
"options.section.hotkeys": "Klávesové zkratky",
|
||||
@@ -365,6 +368,14 @@
|
||||
"recording.device": "Vstupní zařízení:",
|
||||
"recording.activation": "Aktivace",
|
||||
"recording.pushToTalk": "Stiskni a mluv",
|
||||
"recording.pttKey": "Klávesa Push-To-Talk:",
|
||||
"recording.pttKeyNone": "Nenastaveno",
|
||||
"recording.pttKeyPress": "Stiskněte klávesu nebo tlačítko myši…",
|
||||
"recording.pttHint": "Funguje jakákoli klávesa nebo tlačítko myši (prostřední či boční), ale jen když je WebSpeak3 aktivní okno. Prohlížeče nedovolí webovým stránkám vidět vstup z jiných programů, takže ve hře to nefunguje. Můžete také podržet tlačítko 🗣️ na panelu nástrojů.",
|
||||
"hotkeys.subtitle": "Klávesové a myší zkratky",
|
||||
"hotkeys.pttEnabled": "Použít Push-To-Talk (místo aktivace hlasem)",
|
||||
"hotkeys.shortcuts": "Zkratky",
|
||||
"hotkeys.shortcutsHint": "Nefungují, když píšete do textového pole.",
|
||||
"recording.continuous": "Nepřetržitý přenos",
|
||||
"recording.voiceActivation": "Detekce aktivace hlasem",
|
||||
"recording.testStart": "Spustit test",
|
||||
@@ -647,6 +658,7 @@
|
||||
"sounds.event.clientLeave": "Klient odejde",
|
||||
"sounds.event.message": "Přijata zpráva",
|
||||
"sounds.event.poke": "Přijato šťouchnutí",
|
||||
"sounds.event.mute": "Přepnutí ztlumení",
|
||||
"sounds.default": "Výchozí",
|
||||
"sounds.custom": "Vlastní soubor: {name}",
|
||||
"sounds.test": "▶ Test",
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
"toolbar.micMute": "Mikrofon stummschalten",
|
||||
"toolbar.micUnmute": "Mikrofon aktivieren (unmute)",
|
||||
"toolbar.vadSensitivity": "Empfindlichkeit der Sprachaktivierung",
|
||||
"toolbar.pushToTalk": "Zum Sprechen gedrückt halten",
|
||||
"tabAudio.start": "Ton eines Tabs oder Fensters in den Sprachkanal geben (mit Kopfhörer kein Echo)",
|
||||
"tabAudio.stop": "Ton-Freigabe beenden",
|
||||
"tabAudio.noAudio": "Es wurde kein Ton freigegeben. Im Auswahldialog einen Tab oder ein Fenster wählen und den Ton einschalten.",
|
||||
@@ -278,6 +279,7 @@
|
||||
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "Technisches, flaches Layout im IDE-Stil für Power-User.",
|
||||
"design.idePixelFont": "Pixel-Terminal-Schrift",
|
||||
"design.status.connected": "Verbunden",
|
||||
"design.custom.new": "+ Neues Design",
|
||||
"design.custom.import": "Design importieren",
|
||||
@@ -322,6 +324,7 @@
|
||||
"design.store.publish.submit": "Im Store veröffentlichen",
|
||||
"design.store.publish.success": "Design wurde veröffentlicht!",
|
||||
"design.store.publish.pending": "Danke! Dein Design wurde eingereicht und erscheint im Store, sobald es geprüft wurde.",
|
||||
"design.store.publish.duplicate": "Dieses Design ist schon im Store. Ändere es etwas, bevor du es erneut veröffentlichst.",
|
||||
"design.store.publish.error": "Veröffentlichen fehlgeschlagen.",
|
||||
"options.section.erweiterungen": "Erweiterungen",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
@@ -365,6 +368,14 @@
|
||||
"recording.device": "Aufnahmegerät:",
|
||||
"recording.activation": "Aktivierung",
|
||||
"recording.pushToTalk": "Push-To-Talk",
|
||||
"recording.pttKey": "Push-To-Talk-Taste:",
|
||||
"recording.pttKeyNone": "Nicht festgelegt",
|
||||
"recording.pttKeyPress": "Taste oder Maustaste drücken…",
|
||||
"recording.pttHint": "Jede Taste oder Maustaste (mittlere oder Seitentasten) geht, aber nur solange WebSpeak3 das aktive Fenster ist. Browser lassen Webseiten keine Eingaben aus anderen Programmen sehen, im Spiel klappt es also nicht. Alternativ den 🗣️-Knopf in der Toolbar gedrückt halten.",
|
||||
"hotkeys.subtitle": "Tastatur- und Maus-Kürzel",
|
||||
"hotkeys.pttEnabled": "Push-To-Talk verwenden (statt Sprachaktivierung)",
|
||||
"hotkeys.shortcuts": "Tastenkürzel",
|
||||
"hotkeys.shortcutsHint": "Greifen nicht, während du in ein Textfeld tippst.",
|
||||
"recording.continuous": "Dauersenden",
|
||||
"recording.voiceActivation": "Automatische Spracherkennung",
|
||||
"recording.testStart": "Test starten",
|
||||
@@ -647,6 +658,7 @@
|
||||
"sounds.event.clientLeave": "Client geht",
|
||||
"sounds.event.message": "Nachricht empfangen",
|
||||
"sounds.event.poke": "Anstupsen erhalten",
|
||||
"sounds.event.mute": "Stummschaltung umgeschaltet",
|
||||
"sounds.default": "Standard",
|
||||
"sounds.custom": "Eigene Datei: {name}",
|
||||
"sounds.test": "▶ Testen",
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
"toolbar.micMute": "Mute microphone",
|
||||
"toolbar.micUnmute": "Unmute microphone",
|
||||
"toolbar.vadSensitivity": "Voice activation sensitivity",
|
||||
"toolbar.pushToTalk": "Hold to talk",
|
||||
"tabAudio.start": "Share tab or window audio into the voice channel (headphones avoid an echo)",
|
||||
"tabAudio.stop": "Stop sharing audio",
|
||||
"tabAudio.noAudio": "No audio was shared. In the picker, choose a tab or window and turn on its audio.",
|
||||
@@ -278,6 +279,7 @@
|
||||
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "A technical, flat IDE-style layout for power users.",
|
||||
"design.idePixelFont": "Pixel terminal font",
|
||||
"design.status.connected": "Connected",
|
||||
"design.custom.new": "+ New design",
|
||||
"design.custom.import": "Import design",
|
||||
@@ -322,6 +324,7 @@
|
||||
"design.store.publish.submit": "Publish to the store",
|
||||
"design.store.publish.success": "Design published!",
|
||||
"design.store.publish.pending": "Thanks! Your design was submitted and will appear in the store once it has been reviewed.",
|
||||
"design.store.publish.duplicate": "This design is already in the store. Change it a little before publishing it again.",
|
||||
"design.store.publish.error": "Publishing failed.",
|
||||
"options.section.erweiterungen": "Addons",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
@@ -365,6 +368,14 @@
|
||||
"recording.device": "Capture device:",
|
||||
"recording.activation": "Activation",
|
||||
"recording.pushToTalk": "Push-To-Talk",
|
||||
"recording.pttKey": "Push-to-talk key:",
|
||||
"recording.pttKeyNone": "Not set",
|
||||
"recording.pttKeyPress": "Press a key or mouse button…",
|
||||
"recording.pttHint": "Any key or mouse button (middle or side buttons) works, but only while WebSpeak3 is the active window. Browsers don't let websites see input in other programs, so it won't work while you're in a game. You can also hold the 🗣️ button in the toolbar.",
|
||||
"hotkeys.subtitle": "Keyboard and mouse shortcuts",
|
||||
"hotkeys.pttEnabled": "Use push-to-talk (instead of voice activation)",
|
||||
"hotkeys.shortcuts": "Shortcuts",
|
||||
"hotkeys.shortcutsHint": "These don't fire while you're typing in a text field.",
|
||||
"recording.continuous": "Continuous transmission",
|
||||
"recording.voiceActivation": "Voice activation detection",
|
||||
"recording.testStart": "Start test",
|
||||
@@ -647,6 +658,7 @@
|
||||
"sounds.event.clientLeave": "Client leaves",
|
||||
"sounds.event.message": "Message received",
|
||||
"sounds.event.poke": "Poke received",
|
||||
"sounds.event.mute": "Mute toggled",
|
||||
"sounds.default": "Default",
|
||||
"sounds.custom": "Custom file: {name}",
|
||||
"sounds.test": "▶ Test",
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
"toolbar.micMute": "بیصدا کردن میکروفون",
|
||||
"toolbar.micUnmute": "فعال کردن صدای میکروفون",
|
||||
"toolbar.vadSensitivity": "حساسیت فعالسازی صوتی",
|
||||
"toolbar.pushToTalk": "برای صحبت نگه دارید",
|
||||
"tabAudio.start": "صدای یک زبانه یا پنجره را در کانال صوتی پخش کن (با هدفون پژواک ایجاد نمیشود)",
|
||||
"tabAudio.stop": "توقف اشتراک صدا",
|
||||
"tabAudio.noAudio": "صدایی به اشتراک گذاشته نشد. در پنجره انتخاب، یک زبانه یا پنجره را انتخاب و صدای آن را روشن کنید.",
|
||||
@@ -278,6 +279,7 @@
|
||||
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "چیدمانی فنی و تخت به سبک IDE برای کاربران حرفهای.",
|
||||
"design.idePixelFont": "فونت پیکسلی ترمینال",
|
||||
"design.status.connected": "متصل",
|
||||
"design.custom.new": "+ طراحی جدید",
|
||||
"design.custom.import": "وارد کردن طراحی",
|
||||
@@ -322,6 +324,7 @@
|
||||
"design.store.publish.submit": "انتشار در فروشگاه",
|
||||
"design.store.publish.success": "طراحی منتشر شد!",
|
||||
"design.store.publish.pending": "ممنون! طراحی تو ارسال شد و پس از بررسی در فروشگاه نمایش داده میشود.",
|
||||
"design.store.publish.duplicate": "این طرح از قبل در فروشگاه وجود دارد. قبل از انتشار دوباره، کمی آن را تغییر دهید.",
|
||||
"design.store.publish.error": "انتشار ناموفق بود.",
|
||||
"options.section.erweiterungen": "افزونهها",
|
||||
"options.section.hotkeys": "کلیدهای میانبر",
|
||||
@@ -365,6 +368,14 @@
|
||||
"recording.device": "دستگاه ضبط:",
|
||||
"recording.activation": "فعالسازی",
|
||||
"recording.pushToTalk": "فشار برای صحبت (Push-To-Talk)",
|
||||
"recording.pttKey": "کلید Push-To-Talk:",
|
||||
"recording.pttKeyNone": "تنظیم نشده",
|
||||
"recording.pttKeyPress": "یک کلید یا دکمه ماوس را فشار دهید…",
|
||||
"recording.pttHint": "هر کلید یا دکمه ماوس (دکمه وسط یا کناری) کار میکند، اما فقط وقتی WebSpeak3 پنجره فعال باشد. مرورگرها اجازه نمیدهند وبسایتها ورودی برنامههای دیگر را ببینند، پس داخل بازی کار نمیکند. میتوانید دکمه 🗣️ را در نوار ابزار نگه دارید.",
|
||||
"hotkeys.subtitle": "میانبرهای صفحهکلید و ماوس",
|
||||
"hotkeys.pttEnabled": "استفاده از Push-To-Talk (به جای فعالسازی صوتی)",
|
||||
"hotkeys.shortcuts": "میانبرها",
|
||||
"hotkeys.shortcutsHint": "هنگام تایپ در یک فیلد متنی کار نمیکنند.",
|
||||
"recording.continuous": "ارسال پیوسته",
|
||||
"recording.voiceActivation": "تشخیص فعالسازی صوتی",
|
||||
"recording.testStart": "شروع آزمایش",
|
||||
@@ -646,6 +657,7 @@
|
||||
"sounds.event.clientLeave": "خروج کاربر",
|
||||
"sounds.event.message": "پیام دریافت شد",
|
||||
"sounds.event.poke": "سقلمه دریافت شد",
|
||||
"sounds.event.mute": "تغییر حالت بیصدا",
|
||||
"sounds.default": "پیشفرض",
|
||||
"sounds.custom": "فایل سفارشی: {name}",
|
||||
"sounds.test": "▶ آزمایش",
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
"toolbar.micMute": "麦克风静音",
|
||||
"toolbar.micUnmute": "取消麦克风静音",
|
||||
"toolbar.vadSensitivity": "语音激活灵敏度",
|
||||
"toolbar.pushToTalk": "按住说话",
|
||||
"tabAudio.start": "将标签页或窗口的声音共享到语音频道(戴耳机可避免回声)",
|
||||
"tabAudio.stop": "停止共享声音",
|
||||
"tabAudio.noAudio": "没有共享声音。请在选择窗口中选择标签页或窗口,并开启其声音。",
|
||||
@@ -225,6 +226,7 @@
|
||||
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
|
||||
"design.theme.ide": "Command Center",
|
||||
"design.theme.ide.desc": "面向高级用户的扁平化 IDE 风格技术布局。",
|
||||
"design.idePixelFont": "像素终端字体",
|
||||
"design.status.connected": "已连接",
|
||||
"options.section.erweiterungen": "扩展",
|
||||
"options.section.hotkeys": "快捷键",
|
||||
@@ -268,6 +270,14 @@
|
||||
"recording.device": "录音设备:",
|
||||
"recording.activation": "激活方式",
|
||||
"recording.pushToTalk": "按键说话",
|
||||
"recording.pttKey": "按键说话键:",
|
||||
"recording.pttKeyNone": "未设置",
|
||||
"recording.pttKeyPress": "请按下按键或鼠标按键…",
|
||||
"recording.pttHint": "可使用任意按键或鼠标按键(中键或侧键),但仅在 WebSpeak3 为当前活动窗口时有效。浏览器不允许网站读取其他程序中的输入,因此在游戏中无法使用。也可以按住工具栏中的 🗣️ 按钮。",
|
||||
"hotkeys.subtitle": "键盘和鼠标快捷键",
|
||||
"hotkeys.pttEnabled": "使用按键说话(代替语音激活)",
|
||||
"hotkeys.shortcuts": "快捷键",
|
||||
"hotkeys.shortcutsHint": "在文本框中输入时不会触发。",
|
||||
"recording.continuous": "持续传输",
|
||||
"recording.voiceActivation": "语音激活检测",
|
||||
"recording.testStart": "开始测试",
|
||||
@@ -501,6 +511,7 @@
|
||||
"sounds.event.clientLeave": "用户离开",
|
||||
"sounds.event.message": "收到消息",
|
||||
"sounds.event.poke": "收到戳一戳",
|
||||
"sounds.event.mute": "切换静音",
|
||||
"sounds.default": "默认",
|
||||
"sounds.custom": "自定义文件:{name}",
|
||||
"sounds.test": "▶ 测试",
|
||||
@@ -615,6 +626,7 @@
|
||||
"design.store.publish.submit": "发布到商店",
|
||||
"design.store.publish.success": "设计已发布!",
|
||||
"design.store.publish.pending": "谢谢!你的设计已提交,审核通过后将显示在商店中。",
|
||||
"design.store.publish.duplicate": "该设计已在商店中。请稍作修改后再发布。",
|
||||
"design.store.publish.error": "发布失败。",
|
||||
"recording.autoGainControl": "自动增益控制",
|
||||
"tree.streaming": "正在直播",
|
||||
|
||||
@@ -23,6 +23,7 @@ const EVENT_KEYWORDS: Record<SoundEventId, string[]> = {
|
||||
clientLeave: ["userleftchannel", "userleftvisibility", "clientleftview", "userleave", "userleft", "leave"],
|
||||
message: ["textmessagereceived", "chatmessage", "newmessage", "message"],
|
||||
poke: ["gotpoked", "poke"],
|
||||
mute: ["micmuted", "microphonemuted", "micactivated", "microphoneactivated"],
|
||||
};
|
||||
|
||||
function normalize(filename: string): string {
|
||||
|
||||
+62
-10
@@ -1,6 +1,14 @@
|
||||
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke";
|
||||
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke" | "mute";
|
||||
|
||||
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke"];
|
||||
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke", "mute"];
|
||||
|
||||
/** "ide" swaps the default chimes for synthetic terminal blips (Command Center layout). */
|
||||
type SoundStyle = "classic" | "ide";
|
||||
let soundStyle: SoundStyle = "classic";
|
||||
|
||||
export function setSoundStyle(style: SoundStyle): void {
|
||||
soundStyle = style;
|
||||
}
|
||||
|
||||
const ENABLED_KEY = "webspeak3:sounds-enabled";
|
||||
const VOLUME_KEY = "webspeak3:sounds-volume";
|
||||
@@ -141,8 +149,8 @@ class NotificationSoundPlayer {
|
||||
const { context, destination } = this.ensure();
|
||||
if (context.state === "suspended") context.resume().catch(() => {});
|
||||
const now = context.currentTime;
|
||||
for (const note of synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, note.freq, note.duration, volume * note.gain);
|
||||
for (const note of soundStyle === "ide" ? ideNotes(event) : synthNotes(event)) {
|
||||
this.playNote(context, destination, now + note.delay, volume * note.gain, note);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,13 +158,13 @@ class NotificationSoundPlayer {
|
||||
context: AudioContext,
|
||||
destination: AudioNode,
|
||||
startTime: number,
|
||||
freq: number,
|
||||
duration: number,
|
||||
peakGain: number
|
||||
peakGain: number,
|
||||
{ freq, endFreq, duration, type = "sine" }: SynthNote
|
||||
): void {
|
||||
const osc = context.createOscillator();
|
||||
osc.type = "sine";
|
||||
osc.frequency.value = freq;
|
||||
osc.type = type;
|
||||
osc.frequency.setValueAtTime(freq, startTime);
|
||||
if (endFreq) osc.frequency.exponentialRampToValueAtTime(endFreq, startTime + duration);
|
||||
const gain = context.createGain();
|
||||
gain.gain.setValueAtTime(0, startTime);
|
||||
gain.gain.linearRampToValueAtTime(peakGain, startTime + 0.02);
|
||||
@@ -169,7 +177,17 @@ class NotificationSoundPlayer {
|
||||
|
||||
/** Soft, modern two/three-note chimes - a sine-wave, quick-attack/exponential-decay
|
||||
* shape reads as gentle rather than the harsh square/saw beeps of classic UI sounds. */
|
||||
function synthNotes(event: SoundEventId): { delay: number; freq: number; duration: number; gain: number }[] {
|
||||
interface SynthNote {
|
||||
delay: number;
|
||||
freq: number;
|
||||
/** Glide to this frequency over the note's duration. */
|
||||
endFreq?: number;
|
||||
duration: number;
|
||||
gain: number;
|
||||
type?: OscillatorType;
|
||||
}
|
||||
|
||||
function synthNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
@@ -195,6 +213,40 @@ function synthNotes(event: SoundEventId): { delay: number; freq: number; duratio
|
||||
{ delay: 0, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
{ delay: 0.12, freq: 987.77, duration: 0.1, gain: 0.5 },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 660, duration: 0.06, gain: 0.3 }];
|
||||
}
|
||||
}
|
||||
|
||||
/** Command Center: short, dry, synthetic blips - square/triangle clicks and
|
||||
* quick arpeggios instead of soft chimes. Square waves are loud, so lower gains. */
|
||||
function ideNotes(event: SoundEventId): SynthNote[] {
|
||||
switch (event) {
|
||||
case "connect":
|
||||
return [
|
||||
{ delay: 0, freq: 440, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.1, freq: 554.37, duration: 0.1, gain: 0.3 },
|
||||
{ delay: 0.2, freq: 659.25, duration: 0.14, gain: 0.3 },
|
||||
];
|
||||
case "disconnect":
|
||||
return [{ delay: 0, freq: 200, endFreq: 50, duration: 0.2, gain: 0.45, type: "triangle" }];
|
||||
case "clientJoin":
|
||||
return [
|
||||
{ delay: 0, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
{ delay: 0.1, freq: 800, duration: 0.07, gain: 0.18 },
|
||||
];
|
||||
case "clientLeave":
|
||||
return [{ delay: 0, freq: 600, endFreq: 400, duration: 0.09, gain: 0.18 }];
|
||||
case "message":
|
||||
return [{ delay: 0, freq: 1200, duration: 0.04, gain: 0.12, type: "square" }];
|
||||
case "poke":
|
||||
return [
|
||||
{ delay: 0, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.08, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
{ delay: 0.16, freq: 1000, duration: 0.05, gain: 0.12, type: "square" },
|
||||
];
|
||||
case "mute":
|
||||
return [{ delay: 0, freq: 300, endFreq: 50, duration: 0.04, gain: 0.15, type: "square" }];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+60
-17
@@ -5,13 +5,36 @@
|
||||
without !important. Imported right after App.css in App.tsx - the order
|
||||
matters for the zero-specificity block. */
|
||||
|
||||
/* Pixel terminal font, self-hosted (OFL) so no visitor IP goes to Google Fonts.
|
||||
The file only downloads once an element actually uses it. */
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin.woff2") format("woff2");
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "VT323";
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../assets/fonts/vt323-latin-ext.woff2") format("woff2");
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
:where(.ts-app.ts-design-ide) {
|
||||
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
/* VT323 has no bold cut; faux-bold smears the pixels. */
|
||||
font-synthesis-weight: none;
|
||||
--ide-mono: VT323, "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: var(--ide-mono);
|
||||
--ide-panel: #18181b;
|
||||
--ide-faint: #71717a;
|
||||
--ide-accent-bg: rgba(16, 185, 129, 0.1);
|
||||
|
||||
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
font-family: var(--ide-font);
|
||||
/* VT323 has a tiny x-height and narrow glyphs: scale it up and space it out. */
|
||||
font-size-adjust: 0.55;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 13px;
|
||||
|
||||
--bg: #09090b;
|
||||
@@ -56,6 +79,26 @@
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
/* Terminal font everywhere, beating base rules that pick their own family */
|
||||
.ts-app.ts-design-ide:not(.ts-ide-plain-font) :is(*, *::before, *::after) {
|
||||
font-family: var(--ide-font);
|
||||
}
|
||||
|
||||
/* Pixel font switched off in the design options: sans UI, regular mono for the terminal bits */
|
||||
.ts-app.ts-design-ide.ts-ide-plain-font {
|
||||
--ide-mono: "Fira Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
|
||||
--ide-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
||||
font-size-adjust: none;
|
||||
letter-spacing: normal;
|
||||
font-synthesis-weight: auto;
|
||||
}
|
||||
|
||||
/* Form controls reset size adjust and spacing in the UA sheet instead of inheriting them */
|
||||
.ts-app.ts-design-ide :is(button, input, select, textarea) {
|
||||
font-size-adjust: inherit;
|
||||
letter-spacing: inherit;
|
||||
}
|
||||
|
||||
/* ---------- Header: menubar + toolbar + connection tabs ---------- */
|
||||
|
||||
/* No own row for the menubar: the hamburger floats into the toolbar row */
|
||||
@@ -98,9 +141,9 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .gts-connection-tabs {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -144,19 +187,19 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-tree-panel {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 1;
|
||||
overflow-x: hidden;
|
||||
min-width: 16rem;
|
||||
padding: 0 0 0.5rem;
|
||||
border-right: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-side-panel {
|
||||
font-family: var(--ide-mono);
|
||||
grid-column: 3;
|
||||
border-left: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -169,6 +212,7 @@
|
||||
/* Section headers like an IDE side bar */
|
||||
.ts-app.ts-design-ide .ts-tree-panel::before,
|
||||
.ts-app.ts-design-ide .ts-side-panel::before {
|
||||
font-family: var(--ide-mono);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
@@ -176,7 +220,6 @@
|
||||
padding: 0 1rem;
|
||||
margin-bottom: 0.4rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.15em;
|
||||
@@ -326,15 +369,16 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-info-connection-link {
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* ---------- Center: breadcrumb, voice grid, terminal ---------- */
|
||||
|
||||
.ts-app.ts-design-ide .ts-ide-breadcrumb {
|
||||
font-family: var(--ide-mono);
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -342,7 +386,6 @@
|
||||
height: 2rem;
|
||||
padding: 0 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
color: var(--ide-faint);
|
||||
}
|
||||
@@ -397,6 +440,7 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-avatar {
|
||||
font-family: var(--ide-mono);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -407,7 +451,6 @@
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
background: var(--bg);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
@@ -492,11 +535,11 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-group {
|
||||
font-family: var(--ide-mono);
|
||||
padding: 0 0.25rem;
|
||||
border: 1px solid var(--group-color);
|
||||
background: color-mix(in srgb, var(--group-color) 10%, transparent);
|
||||
color: color-mix(in srgb, var(--group-color) 75%, #fff);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 9px;
|
||||
line-height: 1.5;
|
||||
text-transform: uppercase;
|
||||
@@ -518,11 +561,11 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-speaking-now-status {
|
||||
font-family: var(--ide-mono);
|
||||
margin-top: 0.375rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
color: var(--ide-faint);
|
||||
}
|
||||
@@ -542,22 +585,22 @@
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-messages {
|
||||
font-family: var(--ide-mono);
|
||||
order: 2;
|
||||
padding: 1rem;
|
||||
background: var(--ide-panel);
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-tab {
|
||||
font-family: var(--ide-mono);
|
||||
padding: 0 0 0.5rem;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -595,13 +638,13 @@
|
||||
|
||||
/* Prompt-style input */
|
||||
.ts-app.ts-design-ide .ts-chat-input-row {
|
||||
font-family: var(--ide-mono);
|
||||
order: 3;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.3rem 1rem;
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row::before {
|
||||
@@ -614,30 +657,30 @@
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row textarea,
|
||||
.ts-app.ts-design-ide .ts-chat-input-row input {
|
||||
font-family: var(--ide-mono);
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
font-family: var(--ide-mono);
|
||||
font-size: 12px;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-ide .ts-chat-input-row button,
|
||||
.ts-app.ts-design-ide .ts-dialog button:not(.ts-icon-button) {
|
||||
letter-spacing: 0.05em;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: none;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Client log strip at the very bottom */
|
||||
.ts-app.ts-design-ide > .ts-log {
|
||||
font-family: var(--ide-mono);
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--border);
|
||||
font-family: var(--ide-mono);
|
||||
}
|
||||
|
||||
/* Narrow screens: stack instead of three columns */
|
||||
|
||||
+7
-2
@@ -54,7 +54,8 @@ export interface MicCaptureOptions {
|
||||
*
|
||||
* Uses voice activation (like TeamSpeak's own "Sprachaktivierung"): frames are
|
||||
* only sent while the input level is above `threshold`, plus a short hangover
|
||||
* so the tail of a word isn't cut off. `onActivity` reports transitions so the
|
||||
* so the tail of a word isn't cut off. With `pushToTalk` set, only while
|
||||
* `pttPressed` is. `onActivity` reports transitions so the
|
||||
* UI can show a local "currently transmitting" indicator.
|
||||
*/
|
||||
export class MicCapture {
|
||||
@@ -83,6 +84,9 @@ export class MicCapture {
|
||||
private context: AudioContext;
|
||||
threshold: number;
|
||||
hangoverSeconds: number;
|
||||
/** Push-to-talk: send while `pttPressed` instead of voice activation. */
|
||||
pushToTalk = false;
|
||||
pttPressed = false;
|
||||
|
||||
constructor(context: AudioContext, options: MicCaptureOptions) {
|
||||
this.context = context;
|
||||
@@ -148,8 +152,9 @@ export class MicCapture {
|
||||
|
||||
const now = this.context.currentTime;
|
||||
if (rms >= this.threshold) this.activeUntil = now + this.hangoverSeconds;
|
||||
const talking = this.pushToTalk ? this.pttPressed : now < this.activeUntil;
|
||||
// Shared audio (music, a video) has its own pauses; keep sending throughout.
|
||||
const shouldBeActive = this.extra !== null || now < this.activeUntil;
|
||||
const shouldBeActive = this.extra !== null || talking;
|
||||
if (shouldBeActive !== this.active) {
|
||||
this.active = shouldBeActive;
|
||||
this.onActivity?.(this.active);
|
||||
|
||||
Reference in new issue
Block a user