mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 08:52:51 +08:00
Compare commits
50
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44450ab35f | ||
|
|
9d6dcebfa9 | ||
|
|
e26b02c449 | ||
|
|
f629666bc2 | ||
|
|
684e597529 | ||
|
|
79df26c3bc | ||
|
|
b4ec2a26b6 | ||
|
|
ecc07308f6 | ||
|
|
53ccb22189 | ||
|
|
17899ae137 | ||
|
|
ea7b97b161 | ||
|
|
6d6803d9b3 | ||
|
|
7901aafbb1 | ||
|
|
41ac845fbc | ||
|
|
0f8576ac6c | ||
|
|
db8b5ea958 | ||
|
|
203e8fba51 | ||
|
|
b9d4bd533d | ||
|
|
dbe9a3c2df | ||
|
|
bd0122812d | ||
|
|
4318ce359f | ||
|
|
181b0fc43b | ||
|
|
330ecccadb | ||
|
|
74f688aba8 | ||
|
|
a300daedeb | ||
|
|
46ae5b120e | ||
|
|
284645f18d | ||
|
|
67c4bc1072 | ||
|
|
7bcced06fd | ||
|
|
f5cb4dd160 | ||
|
|
a0ede4a12a | ||
|
|
6c1fec8dcc | ||
|
|
6c4ace585d | ||
|
|
5858631e6d | ||
|
|
7217bc146a | ||
|
|
249687d98a | ||
|
|
3644ae7c41 | ||
|
|
0529ab72f1 | ||
|
|
af3a7c97cf | ||
|
|
69b256eb42 | ||
|
|
530415b50b | ||
|
|
fcbf3ea40d | ||
|
|
42f82d49aa | ||
|
|
0d8e9336f8 | ||
|
|
f6170f0576 | ||
|
|
65813b6367 | ||
|
|
fe1b5ff991 | ||
|
|
9b83e9d93f | ||
|
|
186a3f958b | ||
|
|
b6ccc6f627 |
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: moepchi
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,85 @@
|
||||
name: Bug Report
|
||||
description: Something isn't working as expected
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report a bug! Please fill in as much detail as you can.
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: A clear description of the bug.
|
||||
placeholder: e.g. The Connect dialog closes unexpectedly when I select text inside it.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: How can we reproduce this?
|
||||
placeholder: |
|
||||
1. Open the Connect dialog
|
||||
2. Click and drag to select the server address text
|
||||
3. Release the mouse outside the dialog
|
||||
4. Dialog closes unexpectedly
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: What did you expect to happen instead?
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: browser
|
||||
attributes:
|
||||
label: Browser
|
||||
options:
|
||||
- Chrome / Chromium
|
||||
- Firefox
|
||||
- Safari
|
||||
- Edge
|
||||
- Other (mention in description)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: deployment
|
||||
attributes:
|
||||
label: Deployment method
|
||||
description: How are you running WebSpeak3?
|
||||
placeholder: e.g. Docker Hub image moepchi/webspeak3:latest, built from source, docker-compose
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version / commit
|
||||
description: Docker tag, commit hash, or release version if known
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant logs / console output
|
||||
description: Browser console errors, gateway logs, or connector output, if any.
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Screenshots, TeamSpeak server version, anything else relevant.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question / Discussion
|
||||
url: https://github.com/Moepchi/webspeak3/discussions
|
||||
about: Ask a question or discuss an idea before filing an issue.
|
||||
@@ -0,0 +1,42 @@
|
||||
name: Feature Request
|
||||
description: Suggest an idea or improvement for WebSpeak3
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for the suggestion! Note that some native TeamSpeak 3 client features (myTeamSpeak integration,
|
||||
badges, plugins) are intentionally out of scope — see the README for details.
|
||||
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: What problem does this solve?
|
||||
description: Is this related to something that's currently missing or annoying?
|
||||
placeholder: e.g. I can't send a targeted whisper to specific clients like in the native client.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Proposed solution
|
||||
description: What would you like to see happen?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives considered
|
||||
description: Any workarounds or alternative approaches you've thought of?
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Screenshots of the native client, links, or other context that helps explain the request.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,57 @@
|
||||
name: Deploy demo to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "web/**"
|
||||
- ".github/workflows/deploy-demo.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: web
|
||||
run: npm ci
|
||||
|
||||
- name: Build (demo mode)
|
||||
working-directory: web
|
||||
env:
|
||||
VITE_DEMO_MODE: "true"
|
||||
VITE_BASE_PATH: /webspeak3/
|
||||
run: npm run build
|
||||
|
||||
- uses: actions/configure-pages@v5
|
||||
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: web/dist
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -7,3 +7,5 @@ dist-ssr/
|
||||
.env.local
|
||||
.DS_Store
|
||||
docker-compose.override.yml
|
||||
.claude/
|
||||
CLAUDE.md
|
||||
@@ -17,11 +17,14 @@
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://moepchi.github.io/webspeak3/">🕹️ Live Demo</a> ·
|
||||
<a href="#-installation">🚀 Quick Start</a> ·
|
||||
<a href="#-installation">📖 Installation</a> ·
|
||||
<a href="https://github.com/Moepchi/webspeak3/issues">🐛 Report Bug</a>
|
||||
</p>
|
||||
|
||||
> The [live demo](https://moepchi.github.io/webspeak3/) runs entirely in your browser with simulated data — no real TeamSpeak server involved. It's there to show the UI, not the real connection.
|
||||
|
||||
---
|
||||
|
||||
## 📸 Preview
|
||||
@@ -43,10 +46,18 @@
|
||||
|---|---|
|
||||
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6 servers over a WebSocket gateway — the server stays exactly as-is |
|
||||
| 🎙️ **Low-latency voice** | Opus-encoded voice with voice activation ("Sprachaktivierung") and adjustable sensitivity |
|
||||
| 🤫 **Whisper** | Target your voice at specific channels or clients instead of your whole current channel |
|
||||
| 🔊 **Custom audio output picker** | Route playback to any output device — works even in browsers without `AudioContext.setSinkId` |
|
||||
| 💬 **Full text chat** | Channel, server-wide, and private (1:1) chat, each in its own tab |
|
||||
| 🌳 **Live channel/client tree** | Correct ordering, status icons (channel commander, away, muted, deafened), click to switch channels |
|
||||
| 💬 **Full text chat** | Channel, server-wide, and private (1:1) chat, each in its own tab — Shift+Enter for a newline |
|
||||
| 🌳 **Live channel/client tree** | Correct ordering, status icons (channel commander, away, muted, deafened), country flags, click to switch channels |
|
||||
| 🖱️ **Right-click context menu** | Private chat, poke, copy name, and whisper-target toggle straight from a client's row |
|
||||
| 📜 **Server log** | Join/leave/switch, channel-group, and channel/server-change events shown inline, like the native client |
|
||||
| 🔔 **Custom sound notifications** | Per-event sounds (connect, poke, messages, ...) with volume control and `.ts3soundpack` import |
|
||||
| 🪪 **Persistent identity** | Keeps the same client UID across sessions instead of generating a new one every connect |
|
||||
| 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status |
|
||||
| ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab |
|
||||
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
|
||||
| 🌍 **Localized UI** | Interface available in German and English, detected automatically or switchable in Options |
|
||||
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
|
||||
| 🔁 **Seamless reconnect** | Switch connections mid-session — old state tears down cleanly, no leaks or duplicates |
|
||||
|
||||
|
||||
Generated
+1
@@ -2641,6 +2641,7 @@ dependencies = [
|
||||
"futures",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"time",
|
||||
"tokio",
|
||||
"tracing-subscriber",
|
||||
"tsclientlib",
|
||||
|
||||
@@ -15,3 +15,4 @@ clap = { version = "4", features = ["derive"] }
|
||||
anyhow = "1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
base64 = "0.22"
|
||||
time = "0.3"
|
||||
+1768
-16
File diff suppressed because it is too large.
Load diff
@@ -71,6 +71,7 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
serverPassword: msg.serverPassword,
|
||||
channelPassword: msg.channelPassword,
|
||||
defaultChannel: msg.defaultChannel,
|
||||
identity: msg.identity,
|
||||
};
|
||||
connection = new Ts3Connection(options);
|
||||
connection.onEvent((event) => socket.send(JSON.stringify(event)));
|
||||
@@ -113,6 +114,154 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
await connection?.setOutputMuted(msg.muted);
|
||||
break;
|
||||
}
|
||||
case "setNickname": {
|
||||
await connection?.setNickname(msg.nickname);
|
||||
break;
|
||||
}
|
||||
case "setWhisperTargets": {
|
||||
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
|
||||
break;
|
||||
}
|
||||
case "getClientConnectionInfo": {
|
||||
await connection?.getClientConnectionInfo(msg.clientId);
|
||||
break;
|
||||
}
|
||||
case "getServerConnectionInfo": {
|
||||
await connection?.getServerConnectionInfo();
|
||||
break;
|
||||
}
|
||||
case "kickFromChannel": {
|
||||
await connection?.kickFromChannel(msg.clientId, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "kickFromServer": {
|
||||
await connection?.kickFromServer(msg.clientId, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "banClient": {
|
||||
await connection?.banClient(msg.clientId, msg.seconds ?? 0, msg.reason ?? "");
|
||||
break;
|
||||
}
|
||||
case "editServer": {
|
||||
await connection?.editServer(msg.payload ?? {});
|
||||
break;
|
||||
}
|
||||
case "getServerLog": {
|
||||
await connection?.getServerLog();
|
||||
break;
|
||||
}
|
||||
case "getBanList": {
|
||||
await connection?.getBanList();
|
||||
break;
|
||||
}
|
||||
case "deleteBan": {
|
||||
await connection?.deleteBan(msg.banId);
|
||||
break;
|
||||
}
|
||||
case "deleteAllBans": {
|
||||
await connection?.deleteAllBans();
|
||||
break;
|
||||
}
|
||||
case "getComplainList": {
|
||||
await connection?.getComplainList();
|
||||
break;
|
||||
}
|
||||
case "deleteComplaint": {
|
||||
await connection?.deleteComplaint(msg.targetClientDbId, msg.fromClientDbId);
|
||||
break;
|
||||
}
|
||||
case "deleteAllComplaintsFor": {
|
||||
await connection?.deleteAllComplaintsFor(msg.targetClientDbId);
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessageList": {
|
||||
await connection?.getOfflineMessageList();
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessage": {
|
||||
await connection?.getOfflineMessage(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "sendOfflineMessage": {
|
||||
await connection?.sendOfflineMessage(msg.clientUid, msg.subject, msg.message);
|
||||
break;
|
||||
}
|
||||
case "deleteOfflineMessage": {
|
||||
await connection?.deleteOfflineMessage(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "markOfflineMessageRead": {
|
||||
await connection?.markOfflineMessageRead(msg.messageId);
|
||||
break;
|
||||
}
|
||||
case "getChannelGroupList": {
|
||||
await connection?.getChannelGroupList();
|
||||
break;
|
||||
}
|
||||
case "getServerGroupList": {
|
||||
await connection?.getServerGroupList();
|
||||
break;
|
||||
}
|
||||
case "setChannelGroup": {
|
||||
await connection?.setChannelGroup(msg.channelGroupId, msg.channelId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "addServerGroup": {
|
||||
await connection?.addServerGroup(msg.serverGroupId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "removeServerGroup": {
|
||||
await connection?.removeServerGroup(msg.serverGroupId, msg.clientDbId);
|
||||
break;
|
||||
}
|
||||
case "serverQueryLogin": {
|
||||
await connection?.serverQueryLogin(msg.username, msg.password);
|
||||
break;
|
||||
}
|
||||
case "getPermissionOverview": {
|
||||
await connection?.getPermissionOverview();
|
||||
break;
|
||||
}
|
||||
case "getFileList": {
|
||||
await connection?.getFileList(msg.channelId, msg.path);
|
||||
break;
|
||||
}
|
||||
case "createDirectory": {
|
||||
await connection?.createDirectory(msg.channelId, msg.dirname);
|
||||
break;
|
||||
}
|
||||
case "deleteFile": {
|
||||
await connection?.deleteFile(msg.channelId, msg.name);
|
||||
break;
|
||||
}
|
||||
case "renameFile": {
|
||||
await connection?.renameFile(msg.channelId, msg.oldName, msg.newName);
|
||||
break;
|
||||
}
|
||||
case "downloadFile": {
|
||||
await connection?.downloadFile(msg.channelId, msg.path);
|
||||
break;
|
||||
}
|
||||
case "uploadFile": {
|
||||
await connection?.uploadFile(msg.channelId, msg.path, msg.dataBase64);
|
||||
break;
|
||||
}
|
||||
case "getPermissionCatalog": {
|
||||
await connection?.getPermissionCatalog();
|
||||
break;
|
||||
}
|
||||
case "getPermList": {
|
||||
await connection?.getPermList(msg.scope, msg.id1, msg.id2);
|
||||
break;
|
||||
}
|
||||
case "addPermission": {
|
||||
await connection?.addPermission(msg.scope, msg.ids, msg.permId, msg.value, msg.negated, msg.skip);
|
||||
break;
|
||||
}
|
||||
case "removePermission": {
|
||||
await connection?.removePermission(msg.scope, msg.ids, msg.permId);
|
||||
break;
|
||||
}
|
||||
case "disconnect": {
|
||||
await connection?.disconnect(msg.message ?? "");
|
||||
break;
|
||||
|
||||
@@ -31,8 +31,83 @@ export interface ClientInfo {
|
||||
away: boolean;
|
||||
awayMessage: string;
|
||||
isChannelCommander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
}
|
||||
|
||||
export interface GroupEntry {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface PermissionOverviewEntry {
|
||||
name: string;
|
||||
description: string;
|
||||
value: number;
|
||||
negated: boolean;
|
||||
skip: boolean;
|
||||
}
|
||||
|
||||
export interface PermissionCatalogEntry {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export type PermScope = "server" | "channelgroup" | "channel" | "client" | "channelclient";
|
||||
|
||||
export interface BanListEntry {
|
||||
banId: number;
|
||||
ip: string;
|
||||
name: string;
|
||||
uid: string;
|
||||
lastNickname: string;
|
||||
created: string;
|
||||
durationSecs: number;
|
||||
invokerName: string;
|
||||
reason: string;
|
||||
enforcements: number;
|
||||
}
|
||||
|
||||
export interface ComplainListEntry {
|
||||
targetClientDbId: number;
|
||||
targetName: string;
|
||||
fromClientDbId: number;
|
||||
fromName: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export interface OfflineMessageListEntry {
|
||||
messageId: number;
|
||||
clientUid: string;
|
||||
subject: string;
|
||||
timestamp: string;
|
||||
isRead: boolean;
|
||||
}
|
||||
|
||||
export interface FileListEntry {
|
||||
path: string;
|
||||
name: string;
|
||||
size: number;
|
||||
isFile: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export type ServerLogEntry =
|
||||
| { kind: "clientJoin"; client: string; channel: string }
|
||||
| { kind: "clientLeave"; client: string }
|
||||
| { kind: "clientChannelSwitch"; client: string; fromChannel: string; toChannel: string }
|
||||
| { kind: "clientChannelGroupAssigned"; client: string; group: string }
|
||||
| { kind: "channelCreated"; channel: string }
|
||||
| { kind: "channelDeleted"; channel: string }
|
||||
| { kind: "channelEdited"; channel: string }
|
||||
| { kind: "serverEdited" }
|
||||
| { kind: "permissionError"; action: string };
|
||||
|
||||
export type Ts3ConnectionEvent =
|
||||
| {
|
||||
type: "connected";
|
||||
@@ -42,6 +117,7 @@ export type Ts3ConnectionEvent =
|
||||
serverVersion: string;
|
||||
serverLicense: string;
|
||||
serverBannerUrl: string;
|
||||
identity: string;
|
||||
}
|
||||
| { type: "channels"; channels: ChannelInfo[]; clients: ClientInfo[] }
|
||||
| { type: "chatMessage"; from: string; message: string }
|
||||
@@ -51,7 +127,52 @@ export type Ts3ConnectionEvent =
|
||||
| { type: "audioOut"; pcm: string }
|
||||
| { type: "talkers"; clients: number[] }
|
||||
| { type: "disconnected"; reason: string }
|
||||
| { type: "error"; message: string };
|
||||
| { type: "error"; message: string }
|
||||
| ({ type: "serverLog" } & ServerLogEntry)
|
||||
| {
|
||||
type: "clientConnectionInfo";
|
||||
clientId: number;
|
||||
pingMs: number | null;
|
||||
connectedSecs: number | null;
|
||||
ip: string | null;
|
||||
packetsSent: number;
|
||||
bytesSent: number;
|
||||
packetsReceived: number;
|
||||
bytesReceived: number;
|
||||
packetLossPercent: number;
|
||||
}
|
||||
| {
|
||||
type: "serverConnectionInfo";
|
||||
pingMs: number;
|
||||
connectedSecs: number;
|
||||
packetLossPercent: number;
|
||||
packetsSentTotal: number;
|
||||
bytesSentTotal: number;
|
||||
packetsReceivedTotal: number;
|
||||
bytesReceivedTotal: number;
|
||||
bandwidthSentLastSecond: number;
|
||||
bandwidthReceivedLastSecond: number;
|
||||
}
|
||||
| { type: "serverProtocolLog"; lines: string[] }
|
||||
| { type: "banList"; entries: BanListEntry[] }
|
||||
| { type: "complainList"; entries: ComplainListEntry[] }
|
||||
| { type: "offlineMessageList"; entries: OfflineMessageListEntry[] }
|
||||
| {
|
||||
type: "offlineMessage";
|
||||
messageId: number;
|
||||
clientUid: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
| { type: "channelGroupList"; entries: GroupEntry[] }
|
||||
| { type: "serverGroupList"; entries: GroupEntry[] }
|
||||
| { type: "permissionOverview"; entries: PermissionOverviewEntry[] }
|
||||
| { type: "fileList"; cid: number; path: string; entries: FileListEntry[] }
|
||||
| { type: "fileDownloadData"; cid: number; path: string; data: string }
|
||||
| { type: "fileUploadDone"; cid: number; path: string }
|
||||
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
|
||||
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] };
|
||||
|
||||
export interface Ts3ConnectOptions {
|
||||
host: string;
|
||||
@@ -59,6 +180,9 @@ export interface Ts3ConnectOptions {
|
||||
serverPassword?: string;
|
||||
channelPassword?: string;
|
||||
defaultChannel?: string;
|
||||
/** Previously-issued identity (from a prior "connected" event) to keep
|
||||
* the same client UID across sessions. Omit to get a freshly generated one. */
|
||||
identity?: string;
|
||||
}
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
@@ -89,6 +213,7 @@ export class Ts3Connection {
|
||||
if (this.options.serverPassword) args.push("--server-password", this.options.serverPassword);
|
||||
if (this.options.channelPassword) args.push("--channel-password", this.options.channelPassword);
|
||||
if (this.options.defaultChannel) args.push("--default-channel", this.options.defaultChannel);
|
||||
if (this.options.identity) args.push("--identity", this.options.identity);
|
||||
this.child = spawn(CONNECTOR_BIN, args);
|
||||
|
||||
createInterface({ input: this.child.stdout }).on("line", (line) => {
|
||||
@@ -103,6 +228,11 @@ export class Ts3Connection {
|
||||
away: boolean;
|
||||
away_message: string;
|
||||
is_channel_commander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
database_id: number;
|
||||
channel_group: number;
|
||||
server_groups: number[];
|
||||
}
|
||||
|
||||
interface RawChannelInfo {
|
||||
@@ -125,6 +255,7 @@ export class Ts3Connection {
|
||||
server_version: string;
|
||||
server_license: string;
|
||||
server_banner_url: string;
|
||||
identity: string;
|
||||
}
|
||||
| { type: "channels"; channels: RawChannelInfo[]; clients: RawClientInfo[] }
|
||||
| { type: "chatMessage"; from: string; message: string }
|
||||
@@ -134,7 +265,88 @@ export class Ts3Connection {
|
||||
| { type: "audioOut"; pcm: string }
|
||||
| { type: "talkers"; clients: number[] }
|
||||
| { type: "disconnected"; reason: string }
|
||||
| { type: "error"; message: string };
|
||||
| { type: "error"; message: string }
|
||||
| ({ type: "serverLog" } & ServerLogEntry)
|
||||
| {
|
||||
type: "clientConnectionInfo";
|
||||
client_id: number;
|
||||
ping_ms: number | null;
|
||||
connected_secs: number | null;
|
||||
ip: string | null;
|
||||
packets_sent: number;
|
||||
bytes_sent: number;
|
||||
packets_received: number;
|
||||
bytes_received: number;
|
||||
packet_loss_percent: number;
|
||||
}
|
||||
| {
|
||||
type: "serverConnectionInfo";
|
||||
ping_ms: number;
|
||||
connected_secs: number;
|
||||
packet_loss_percent: number;
|
||||
packets_sent_total: number;
|
||||
bytes_sent_total: number;
|
||||
packets_received_total: number;
|
||||
bytes_received_total: number;
|
||||
bandwidth_sent_last_second: number;
|
||||
bandwidth_received_last_second: number;
|
||||
}
|
||||
| { type: "serverProtocolLog"; lines: string[] }
|
||||
| {
|
||||
type: "banList";
|
||||
entries: {
|
||||
ban_id: number;
|
||||
ip: string;
|
||||
name: string;
|
||||
uid: string;
|
||||
last_nickname: string;
|
||||
created: string;
|
||||
duration_secs: number;
|
||||
invoker_name: string;
|
||||
reason: string;
|
||||
enforcements: number;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "complainList";
|
||||
entries: {
|
||||
target_client_db_id: number;
|
||||
target_name: string;
|
||||
from_client_db_id: number;
|
||||
from_name: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "offlineMessageList";
|
||||
entries: {
|
||||
message_id: number;
|
||||
client_uid: string;
|
||||
subject: string;
|
||||
timestamp: string;
|
||||
is_read: boolean;
|
||||
}[];
|
||||
}
|
||||
| {
|
||||
type: "offlineMessage";
|
||||
message_id: number;
|
||||
client_uid: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
timestamp: string;
|
||||
}
|
||||
| { type: "channelGroupList"; entries: { id: number; name: string }[] }
|
||||
| { type: "serverGroupList"; entries: { id: number; name: string }[] }
|
||||
| {
|
||||
type: "permissionOverview";
|
||||
entries: { name: string; description: string; value: number; negated: boolean; skip: boolean }[];
|
||||
}
|
||||
| { type: "fileList"; cid: number; path: string; entries: FileListEntry[] }
|
||||
| { type: "fileDownloadData"; cid: number; path: string; data: string }
|
||||
| { type: "fileUploadDone"; cid: number; path: string }
|
||||
| { type: "permList"; scope: PermScope; id1: number; id2: number | null; entries: PermissionOverviewEntry[] }
|
||||
| { type: "permissionCatalog"; entries: PermissionCatalogEntry[] };
|
||||
|
||||
if (event.type === "connected") {
|
||||
this.emit({
|
||||
@@ -145,6 +357,7 @@ export class Ts3Connection {
|
||||
serverVersion: event.server_version,
|
||||
serverLicense: event.server_license,
|
||||
serverBannerUrl: event.server_banner_url,
|
||||
identity: event.identity,
|
||||
});
|
||||
} else if (event.type === "channels") {
|
||||
this.emit({
|
||||
@@ -169,6 +382,11 @@ export class Ts3Connection {
|
||||
away: c.away,
|
||||
awayMessage: c.away_message,
|
||||
isChannelCommander: c.is_channel_commander,
|
||||
country: c.country,
|
||||
uid: c.uid,
|
||||
databaseId: c.database_id,
|
||||
channelGroup: c.channel_group,
|
||||
serverGroups: c.server_groups,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "privateMessage") {
|
||||
@@ -179,6 +397,80 @@ export class Ts3Connection {
|
||||
fromSelf: event.from_self,
|
||||
message: event.message,
|
||||
});
|
||||
} else if (event.type === "clientConnectionInfo") {
|
||||
this.emit({
|
||||
type: "clientConnectionInfo",
|
||||
clientId: event.client_id,
|
||||
pingMs: event.ping_ms,
|
||||
connectedSecs: event.connected_secs,
|
||||
ip: event.ip,
|
||||
packetsSent: event.packets_sent,
|
||||
bytesSent: event.bytes_sent,
|
||||
packetsReceived: event.packets_received,
|
||||
bytesReceived: event.bytes_received,
|
||||
packetLossPercent: event.packet_loss_percent,
|
||||
});
|
||||
} else if (event.type === "serverConnectionInfo") {
|
||||
this.emit({
|
||||
type: "serverConnectionInfo",
|
||||
pingMs: event.ping_ms,
|
||||
connectedSecs: event.connected_secs,
|
||||
packetLossPercent: event.packet_loss_percent,
|
||||
packetsSentTotal: event.packets_sent_total,
|
||||
bytesSentTotal: event.bytes_sent_total,
|
||||
packetsReceivedTotal: event.packets_received_total,
|
||||
bytesReceivedTotal: event.bytes_received_total,
|
||||
bandwidthSentLastSecond: event.bandwidth_sent_last_second,
|
||||
bandwidthReceivedLastSecond: event.bandwidth_received_last_second,
|
||||
});
|
||||
} else if (event.type === "banList") {
|
||||
this.emit({
|
||||
type: "banList",
|
||||
entries: event.entries.map((e) => ({
|
||||
banId: e.ban_id,
|
||||
ip: e.ip,
|
||||
name: e.name,
|
||||
uid: e.uid,
|
||||
lastNickname: e.last_nickname,
|
||||
created: e.created,
|
||||
durationSecs: e.duration_secs,
|
||||
invokerName: e.invoker_name,
|
||||
reason: e.reason,
|
||||
enforcements: e.enforcements,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "complainList") {
|
||||
this.emit({
|
||||
type: "complainList",
|
||||
entries: event.entries.map((e) => ({
|
||||
targetClientDbId: e.target_client_db_id,
|
||||
targetName: e.target_name,
|
||||
fromClientDbId: e.from_client_db_id,
|
||||
fromName: e.from_name,
|
||||
message: e.message,
|
||||
timestamp: e.timestamp,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "offlineMessageList") {
|
||||
this.emit({
|
||||
type: "offlineMessageList",
|
||||
entries: event.entries.map((e) => ({
|
||||
messageId: e.message_id,
|
||||
clientUid: e.client_uid,
|
||||
subject: e.subject,
|
||||
timestamp: e.timestamp,
|
||||
isRead: e.is_read,
|
||||
})),
|
||||
});
|
||||
} else if (event.type === "offlineMessage") {
|
||||
this.emit({
|
||||
type: "offlineMessage",
|
||||
messageId: event.message_id,
|
||||
clientUid: event.client_uid,
|
||||
subject: event.subject,
|
||||
message: event.message,
|
||||
timestamp: event.timestamp,
|
||||
});
|
||||
} else {
|
||||
this.emit(event);
|
||||
}
|
||||
@@ -204,6 +496,194 @@ export class Ts3Connection {
|
||||
this.child?.stdin.write(`switch ${channelId}\n`);
|
||||
}
|
||||
|
||||
async getClientConnectionInfo(clientId: number): Promise<void> {
|
||||
this.child?.stdin.write(`clientconninfo ${clientId}\n`);
|
||||
}
|
||||
|
||||
async getServerConnectionInfo(): Promise<void> {
|
||||
this.child?.stdin.write(`serverconninfo\n`);
|
||||
}
|
||||
|
||||
async kickFromChannel(clientId: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`kickchannel ${clientId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async kickFromServer(clientId: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`kickserver ${clientId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async banClient(clientId: number, seconds: number, reason: string): Promise<void> {
|
||||
const sanitized = reason.replace(/[\r\n]+/g, " ").trim();
|
||||
this.child?.stdin.write(`banclient ${clientId} ${Math.max(0, Math.floor(seconds))} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** Every field is optional - only send what actually changed. JSON.stringify
|
||||
* already escapes embedded newlines, so this is safe as a single stdin line
|
||||
* without extra sanitization. */
|
||||
async editServer(payload: {
|
||||
name?: string;
|
||||
welcomeMessage?: string;
|
||||
password?: string;
|
||||
maxClients?: number;
|
||||
hostmessage?: string;
|
||||
hostmessageMode?: string;
|
||||
hostbannerUrl?: string;
|
||||
hostbannerGfxUrl?: string;
|
||||
hostbannerGfxIntervalSecs?: number;
|
||||
hostbannerMode?: string;
|
||||
hostbuttonTooltip?: string;
|
||||
hostbuttonUrl?: string;
|
||||
hostbuttonGfxUrl?: string;
|
||||
nickname?: string;
|
||||
phoneticName?: string;
|
||||
codecEncryptionMode?: string;
|
||||
}): Promise<void> {
|
||||
this.child?.stdin.write(`serveredit ${JSON.stringify(payload)}\n`);
|
||||
}
|
||||
|
||||
async getServerLog(): Promise<void> {
|
||||
this.child?.stdin.write(`serverlog\n`);
|
||||
}
|
||||
|
||||
async getBanList(): Promise<void> {
|
||||
this.child?.stdin.write(`banlist\n`);
|
||||
}
|
||||
|
||||
async deleteBan(banId: number): Promise<void> {
|
||||
this.child?.stdin.write(`bandel ${banId}\n`);
|
||||
}
|
||||
|
||||
async deleteAllBans(): Promise<void> {
|
||||
this.child?.stdin.write(`bandelall\n`);
|
||||
}
|
||||
|
||||
async getComplainList(): Promise<void> {
|
||||
this.child?.stdin.write(`complainlist\n`);
|
||||
}
|
||||
|
||||
async deleteComplaint(targetClientDbId: number, fromClientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`complaindel ${targetClientDbId} ${fromClientDbId}\n`);
|
||||
}
|
||||
|
||||
async deleteAllComplaintsFor(targetClientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`complaindelall ${targetClientDbId}\n`);
|
||||
}
|
||||
|
||||
async getOfflineMessageList(): Promise<void> {
|
||||
this.child?.stdin.write(`messagelist\n`);
|
||||
}
|
||||
|
||||
async getOfflineMessage(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messageget ${messageId}\n`);
|
||||
}
|
||||
|
||||
async sendOfflineMessage(clientUid: string, subject: string, message: string): Promise<void> {
|
||||
const sanitize = (s: string) => s.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`messageadd ${sanitize(clientUid)}\t${sanitize(subject)}\t${sanitize(message)}\n`);
|
||||
}
|
||||
|
||||
async deleteOfflineMessage(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messagedel ${messageId}\n`);
|
||||
}
|
||||
|
||||
async markOfflineMessageRead(messageId: number): Promise<void> {
|
||||
this.child?.stdin.write(`messageupdateflag ${messageId} 1\n`);
|
||||
}
|
||||
|
||||
async getChannelGroupList(): Promise<void> {
|
||||
this.child?.stdin.write(`channelgrouplist\n`);
|
||||
}
|
||||
|
||||
async getServerGroupList(): Promise<void> {
|
||||
this.child?.stdin.write(`servergrouplist\n`);
|
||||
}
|
||||
|
||||
async setChannelGroup(channelGroupId: number, channelId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`setchannelgroup ${channelGroupId} ${channelId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async addServerGroup(serverGroupId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`addservergroup ${serverGroupId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async removeServerGroup(serverGroupId: number, clientDbId: number): Promise<void> {
|
||||
this.child?.stdin.write(`delservergroup ${serverGroupId} ${clientDbId}\n`);
|
||||
}
|
||||
|
||||
async serverQueryLogin(username: string, password: string): Promise<void> {
|
||||
const u = Buffer.from(username, "utf8").toString("base64");
|
||||
const p = Buffer.from(password, "utf8").toString("base64");
|
||||
this.child?.stdin.write(`serverquerylogin ${u} ${p}\n`);
|
||||
}
|
||||
|
||||
async getPermissionOverview(): Promise<void> {
|
||||
this.child?.stdin.write(`permoverview\n`);
|
||||
}
|
||||
|
||||
async getPermissionCatalog(): Promise<void> {
|
||||
this.child?.stdin.write(`permissionlist\n`);
|
||||
}
|
||||
|
||||
async getPermList(scope: PermScope, id1: number, id2?: number): Promise<void> {
|
||||
const args = id2 !== undefined ? `${scope} ${id1} ${id2}` : `${scope} ${id1}`;
|
||||
this.child?.stdin.write(`permlist ${args}\n`);
|
||||
}
|
||||
|
||||
/** `negated`/`skip` only apply to the "server" and "client" scopes - the
|
||||
* connector ignores extra trailing args for scopes that don't use them, so
|
||||
* it's safe to always pass through what the caller gave. */
|
||||
async addPermission(
|
||||
scope: PermScope,
|
||||
ids: number[],
|
||||
permId: number,
|
||||
value: number,
|
||||
negated = false,
|
||||
skip = false
|
||||
): Promise<void> {
|
||||
let args = `${scope} ${ids.join(" ")} ${permId} ${value}`;
|
||||
if (scope === "server") args += ` ${negated ? 1 : 0} ${skip ? 1 : 0}`;
|
||||
else if (scope === "client") args += ` ${skip ? 1 : 0}`;
|
||||
this.child?.stdin.write(`permadd ${args}\n`);
|
||||
}
|
||||
|
||||
async removePermission(scope: PermScope, ids: number[], permId: number): Promise<void> {
|
||||
this.child?.stdin.write(`permdel ${scope} ${ids.join(" ")} ${permId}\n`);
|
||||
}
|
||||
|
||||
async getFileList(channelId: number, path: string): Promise<void> {
|
||||
const sanitized = (path || "/").replace(/[\r\n]+/g, " ").trim() || "/";
|
||||
this.child?.stdin.write(`ftlist ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async createDirectory(channelId: number, dirname: string): Promise<void> {
|
||||
const sanitized = dirname.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftmkdir ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async deleteFile(channelId: number, name: string): Promise<void> {
|
||||
const sanitized = name.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftdelete ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
async renameFile(channelId: number, oldName: string, newName: string): Promise<void> {
|
||||
const sanitize = (s: string) => s.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`ftrename ${channelId}\t${sanitize(oldName)}\t${sanitize(newName)}\n`);
|
||||
}
|
||||
|
||||
async downloadFile(channelId: number, path: string): Promise<void> {
|
||||
const sanitized = path.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`ftdownload ${channelId} ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** `dataBase64` is the raw file content, base64-encoded - the browser reads
|
||||
* the picked File as a data URL/ArrayBuffer and sends it up already encoded. */
|
||||
async uploadFile(channelId: number, path: string, dataBase64: string): Promise<void> {
|
||||
const sanitizedPath = path.replace(/[\r\n\t]+/g, " ").trim();
|
||||
this.child?.stdin.write(`ftupload ${channelId}\t${sanitizedPath}\t${dataBase64}\n`);
|
||||
}
|
||||
|
||||
async sendChatMessage(message: string): Promise<void> {
|
||||
const sanitized = message.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`chat ${sanitized}\n`);
|
||||
@@ -245,6 +725,21 @@ export class Ts3Connection {
|
||||
this.child?.stdin.write(`muteoutput ${muted ? "1" : "0"}\n`);
|
||||
}
|
||||
|
||||
async setNickname(nickname: string): Promise<void> {
|
||||
const sanitized = nickname.replace(/[\r\n]+/g, " ").trim();
|
||||
if (sanitized) this.child?.stdin.write(`nickname ${sanitized}\n`);
|
||||
}
|
||||
|
||||
/** Empty channelIds/clientIds clears whisper mode, returning outgoing
|
||||
* voice to the normal current-channel broadcast. */
|
||||
async setWhisperTargets(channelIds: number[], clientIds: number[]): Promise<void> {
|
||||
if (channelIds.length === 0 && clientIds.length === 0) {
|
||||
this.child?.stdin.write("unwhisper\n");
|
||||
} else {
|
||||
this.child?.stdin.write(`whisper ${channelIds.join(",")};${clientIds.join(",")}\n`);
|
||||
}
|
||||
}
|
||||
|
||||
async disconnect(message = ""): Promise<void> {
|
||||
if (this.child && !this.child.killed) {
|
||||
const sanitized = message.replace(/[\r\n]+/g, " ").trim();
|
||||
|
||||
@@ -9,6 +9,7 @@ lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-demo
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
|
||||
Generated
+9
-2
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"name": "web",
|
||||
"name": "webspeak3-web",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "web",
|
||||
"name": "webspeak3-web",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"fflate": "^0.8.3",
|
||||
"react": "^19.2.7",
|
||||
"react-dom": "^19.2.7"
|
||||
},
|
||||
@@ -855,6 +856,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fflate": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",
|
||||
"integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"fflate": "^0.8.3",
|
||||
"react": "^19.2.7",
|
||||
"react-dom": "^19.2.7"
|
||||
},
|
||||
|
||||
+902
-1
@@ -26,6 +26,18 @@
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
color-scheme: light;
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
/* Demo-only: simulates a narrow viewport so the mobile layout (driven by
|
||||
the @container rules below) can be previewed without resizing the
|
||||
actual browser window. */
|
||||
.ts-app.ts-force-mobile {
|
||||
max-width: 390px;
|
||||
margin: 0 auto;
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.4),
|
||||
0 0 40px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.ts-app.ts-theme-dark {
|
||||
@@ -52,6 +64,42 @@
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
/* Demo mode banner */
|
||||
|
||||
.ts-demo-banner {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
padding: 0.35rem 0.75rem;
|
||||
background: #7a4d00;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ts-demo-banner a {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ts-demo-mobile-toggle {
|
||||
flex-shrink: 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
padding: 0.15rem 0.6rem;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ts-demo-mobile-toggle:hover {
|
||||
background: rgba(255, 255, 255, 0.28);
|
||||
}
|
||||
|
||||
/* Toolbar */
|
||||
|
||||
.ts-menubar {
|
||||
@@ -142,6 +190,29 @@
|
||||
background: var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-context-menu {
|
||||
position: fixed;
|
||||
z-index: 30;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 200px;
|
||||
padding: 0.25rem;
|
||||
background: var(--bg-toolbar-1);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.ts-context-menu-title {
|
||||
padding: 0.35rem 0.5rem;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ts-toolbar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -369,6 +440,42 @@
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-info-connection-link {
|
||||
margin-top: 0.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
color: var(--accent);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.ts-info-connection-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ts-connection-info-dialog {
|
||||
width: 380px;
|
||||
}
|
||||
|
||||
.ts-connection-info-loading {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-connection-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 0.35rem 0.75rem;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-connection-info-grid span:nth-child(odd) {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-row-selected {
|
||||
background: var(--row-hover);
|
||||
outline: 1px solid var(--border);
|
||||
@@ -470,6 +577,20 @@
|
||||
background: color-mix(in srgb, var(--log-error) 30%, var(--button-bg-1)) !important;
|
||||
}
|
||||
|
||||
.ts-recording-on {
|
||||
background: color-mix(in srgb, var(--log-error) 35%, var(--button-bg-1)) !important;
|
||||
animation: ts-recording-pulse 1.4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes ts-recording-pulse {
|
||||
0%, 100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.55;
|
||||
}
|
||||
}
|
||||
|
||||
.ts-client-away-message {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
@@ -584,6 +705,11 @@
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.ts-chat-line-log {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.ts-chat-input-row {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
@@ -592,14 +718,18 @@
|
||||
border-top: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-chat-input-row input {
|
||||
.ts-chat-input-row textarea {
|
||||
flex: 1;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 2px;
|
||||
padding: 0.3rem 0.5rem;
|
||||
font-size: 12px;
|
||||
font-family: inherit;
|
||||
background: var(--input-bg);
|
||||
color: var(--input-text);
|
||||
resize: none;
|
||||
max-height: 8.5em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-chat-input-row button {
|
||||
@@ -687,6 +817,612 @@
|
||||
width: 420px;
|
||||
}
|
||||
|
||||
.ts-collected-urls-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
.ts-invite-friend-dialog {
|
||||
width: 520px;
|
||||
}
|
||||
|
||||
.ts-client-log-dialog {
|
||||
width: 760px;
|
||||
}
|
||||
|
||||
.ts-whisper-history-dialog {
|
||||
width: 560px;
|
||||
}
|
||||
|
||||
.ts-contacts-dialog {
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
.ts-contacts-body {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.ts-contacts-list-col {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ts-contacts-fields-col {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-contacts-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 3px;
|
||||
height: 220px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-contacts-list-item {
|
||||
padding: 0.3rem 0.5rem;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-contacts-list-item:hover {
|
||||
background: var(--hover-bg, rgba(255, 255, 255, 0.05));
|
||||
}
|
||||
|
||||
.ts-contacts-list-item-selected {
|
||||
background: var(--accent-soft, rgba(78, 161, 247, 0.2));
|
||||
}
|
||||
|
||||
.ts-contacts-list-empty {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-contacts-online-dot {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #4caf50;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
|
||||
.ts-contacts-category-acquaintance {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ts-contacts-category-friend {
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
.ts-contacts-category-blocked {
|
||||
color: #e5534b;
|
||||
}
|
||||
|
||||
.ts-contacts-category-group {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-contacts-actions {
|
||||
display: flex;
|
||||
gap: 0.4rem;
|
||||
padding-top: 0.4rem;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-whisper-history-list {
|
||||
height: 260px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-whisper-history-empty {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-whisper-history-row {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
padding: 0.3rem 0.5rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-whisper-lists-dialog {
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-list {
|
||||
list-style: none;
|
||||
margin: 0.5rem 0 0;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 3px;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
padding: 0.4rem 0.5rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-item-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-item-name {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-item-detail {
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-item-actions {
|
||||
display: flex;
|
||||
gap: 0.4rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-whisper-lists-empty {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-identities-dialog {
|
||||
width: 520px;
|
||||
}
|
||||
|
||||
.ts-identities-body {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.ts-identities-list-label {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.ts-identities-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 3px;
|
||||
width: 180px;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-identities-list li {
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-identities-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ts-identities-list-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.35rem 0.5rem;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-identities-list-item-default {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ts-identities-detail {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.ts-identities-readonly {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-identities-status {
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-log-level-row {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ts-log-list {
|
||||
height: 320px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 3px;
|
||||
font-family: monospace;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-log-row {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
padding: 0.15rem 0.4rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-server-protocol-log-dialog {
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
.ts-ban-list-dialog,
|
||||
.ts-complain-list-dialog {
|
||||
width: 720px;
|
||||
}
|
||||
|
||||
.ts-ban-list-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-ban-list-table th,
|
||||
.ts-ban-list-table td {
|
||||
text-align: left;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.ts-ban-list-table th {
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-dialog-buttons-left {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-offline-messages-dialog {
|
||||
width: 720px;
|
||||
}
|
||||
|
||||
.ts-offline-message-compose,
|
||||
.ts-offline-message-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-offline-message-detail-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-offline-message-detail-uid {
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-offline-message-detail-body {
|
||||
white-space: pre-wrap;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-offline-message-compose textarea {
|
||||
resize: vertical;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.ts-group-assign-dialog {
|
||||
width: 420px;
|
||||
}
|
||||
|
||||
.ts-group-assign-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.15rem;
|
||||
}
|
||||
|
||||
.ts-group-assign-list .ts-menu-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ts-group-assign-current {
|
||||
background: var(--bg-hover, rgba(255, 255, 255, 0.06));
|
||||
}
|
||||
|
||||
.ts-group-assign-hint {
|
||||
margin-left: auto;
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-permission-overview-dialog {
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
.ts-permission-overview-scroll {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-file-browser-dialog {
|
||||
width: 680px;
|
||||
}
|
||||
|
||||
.ts-file-browser-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
margin-bottom: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ts-file-browser-path {
|
||||
flex: 1;
|
||||
font-family: monospace;
|
||||
color: var(--text-muted);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-file-browser-actions {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.ts-link-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--accent, #4a9eff);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.ts-link-button:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.ts-server-icons-dialog {
|
||||
width: 560px;
|
||||
}
|
||||
|
||||
.ts-server-icons-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
|
||||
gap: 0.6rem;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.ts-server-icons-tile {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
padding: 0.4rem;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ts-server-icons-tile img,
|
||||
.ts-server-icons-tile-loading {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.ts-server-icons-tile-loading {
|
||||
background: var(--border-soft);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.ts-perms-editor-dialog {
|
||||
width: 820px;
|
||||
max-width: 95vw;
|
||||
}
|
||||
|
||||
.ts-perms-editor-tabs {
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ts-perms-editor-tab {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0.5rem 0.8rem;
|
||||
cursor: pointer;
|
||||
color: var(--text-muted);
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.ts-perms-editor-tab-active {
|
||||
color: var(--text);
|
||||
border-bottom-color: var(--accent, #4a9eff);
|
||||
}
|
||||
|
||||
.ts-perms-editor-body {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.ts-perms-editor-picker {
|
||||
width: 180px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ts-perms-editor-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-height: 380px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.ts-perms-editor-list li {
|
||||
padding: 0.3rem 0.5rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-perms-editor-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ts-perms-editor-list-empty {
|
||||
color: var(--text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-perms-editor-selected {
|
||||
font-weight: bold;
|
||||
color: var(--accent, #4a9eff);
|
||||
}
|
||||
|
||||
.ts-perms-editor-client-picker {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.ts-perms-editor-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ts-perms-editor-add-form {
|
||||
display: flex;
|
||||
gap: 0.4rem;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 0.5rem;
|
||||
padding: 0.4rem;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.ts-server-protocol-log-line {
|
||||
padding: 0.15rem 0.4rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.ts-log-time {
|
||||
color: var(--text-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-log-category {
|
||||
flex-shrink: 0;
|
||||
width: 90px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ts-log-level {
|
||||
flex-shrink: 0;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.ts-log-message {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ts-log-row-critical .ts-log-level,
|
||||
.ts-log-row-error .ts-log-level {
|
||||
color: #e5534b;
|
||||
}
|
||||
|
||||
.ts-log-row-warning .ts-log-level {
|
||||
color: #e5c34b;
|
||||
}
|
||||
|
||||
.ts-collected-urls-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 12px;
|
||||
max-height: 360px;
|
||||
display: block;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-collected-urls-table thead,
|
||||
.ts-collected-urls-table tbody {
|
||||
display: table;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.ts-collected-urls-table th {
|
||||
text-align: left;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
padding: 0.3rem 0.4rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-collected-urls-table td {
|
||||
padding: 0.3rem 0.4rem;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ts-collected-urls-table a {
|
||||
color: var(--link, #4ea1f7);
|
||||
}
|
||||
|
||||
.ts-away-dialog .ts-dialog-row {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -1194,10 +1930,40 @@
|
||||
padding: 0.3rem 0.7rem;
|
||||
}
|
||||
|
||||
.ts-serverquery-login-compose {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.ts-serverquery-login-compose input {
|
||||
min-width: 260px;
|
||||
}
|
||||
|
||||
.ts-poke-compose button:hover {
|
||||
background: linear-gradient(var(--button-bg-hover-1), var(--button-bg-hover-2));
|
||||
}
|
||||
|
||||
.ts-ban-compose {
|
||||
flex-wrap: wrap;
|
||||
max-width: 380px;
|
||||
}
|
||||
|
||||
.ts-ban-duration-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-ban-duration-field select {
|
||||
background: var(--input-bg);
|
||||
color: var(--input-text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 3px;
|
||||
padding: 0.2rem 0.4rem;
|
||||
}
|
||||
|
||||
.ts-poke-notice {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1231,3 +1997,138 @@
|
||||
.ts-poke-notice button:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Mobile layout */
|
||||
|
||||
@container (max-width: 700px) {
|
||||
.ts-menubar {
|
||||
flex-wrap: wrap;
|
||||
row-gap: 0.2rem;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.ts-toolbar {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ts-toolbar-icons {
|
||||
flex-wrap: wrap;
|
||||
row-gap: 0.3rem;
|
||||
}
|
||||
|
||||
.ts-icon-slider input[type="range"] {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.ts-icon-select select {
|
||||
max-width: 110px;
|
||||
}
|
||||
|
||||
.ts-app-logo {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.ts-toolbar-fields {
|
||||
flex-wrap: wrap;
|
||||
row-gap: 0.4rem;
|
||||
}
|
||||
|
||||
.ts-toolbar-fields input:not([type="range"]),
|
||||
.ts-toolbar-fields select {
|
||||
max-width: 40vw;
|
||||
}
|
||||
|
||||
.ts-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-upper {
|
||||
height: auto !important;
|
||||
flex-direction: column;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.ts-tree-panel {
|
||||
width: 100% !important;
|
||||
max-height: 35vh;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-resize-handle-vertical,
|
||||
.ts-resize-handle-horizontal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-side-panel {
|
||||
max-height: 40vh;
|
||||
}
|
||||
|
||||
.ts-banner-panel {
|
||||
max-height: 25vh;
|
||||
}
|
||||
|
||||
.ts-chat-panel {
|
||||
min-height: 260px;
|
||||
}
|
||||
|
||||
.ts-chat-tabs {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
.ts-dialog {
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ts-connect-dialog,
|
||||
.ts-favorites-dialog,
|
||||
.ts-away-dialog,
|
||||
.ts-options-dialog {
|
||||
width: 92vw !important;
|
||||
}
|
||||
|
||||
.ts-dialog-row {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ts-dialog-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.ts-favorites-body,
|
||||
.ts-options-body {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.ts-favorites-list-col,
|
||||
.ts-favorites-profile-col {
|
||||
width: 100%;
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-options-sidebar {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-options-columns {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ts-poke-compose {
|
||||
flex-wrap: wrap;
|
||||
max-width: 92vw;
|
||||
}
|
||||
|
||||
.ts-poke-compose input {
|
||||
min-width: 160px;
|
||||
}
|
||||
}
|
||||
+4780
-81
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,623 @@
|
||||
// Standalone frontend demo: no gateway, no real TeamSpeak server. Everything
|
||||
// below simulates the WebSocket protocol the real gateway speaks (see
|
||||
// gateway/src/index.ts) so App.tsx doesn't need to know it isn't talking to
|
||||
// a real backend. Only enabled in the GitHub Pages build (VITE_DEMO_MODE=true)
|
||||
// so the normal Docker image is completely unaffected.
|
||||
export const DEMO_MODE = import.meta.env.VITE_DEMO_MODE === "true";
|
||||
|
||||
export const DEMO_HOST = "demo.webspeak3.example";
|
||||
|
||||
interface DemoChannel {
|
||||
id: number;
|
||||
parent: number;
|
||||
order: number;
|
||||
name: string;
|
||||
topic: string;
|
||||
codec: string;
|
||||
maxClients: number | null;
|
||||
hasPassword: boolean;
|
||||
}
|
||||
|
||||
interface DemoClient {
|
||||
id: number;
|
||||
channel: number;
|
||||
name: string;
|
||||
inputMuted: boolean;
|
||||
outputMuted: boolean;
|
||||
inputHardwareEnabled: boolean;
|
||||
away: boolean;
|
||||
awayMessage: string;
|
||||
isChannelCommander: boolean;
|
||||
country: string;
|
||||
uid: string;
|
||||
databaseId: number;
|
||||
channelGroup: number;
|
||||
serverGroups: number[];
|
||||
}
|
||||
|
||||
const DEMO_CHANNELS: DemoChannel[] = [
|
||||
{ id: 1, parent: 0, order: 0, name: "Lobby", topic: "Welcome to the WebSpeak3 demo!", codec: "Opus Voice", maxClients: null, hasPassword: false },
|
||||
{ id: 2, parent: 0, order: 1, name: "Gaming", topic: "", codec: "Opus Voice", maxClients: 10, hasPassword: false },
|
||||
{ id: 3, parent: 0, order: 2, name: "AFK", topic: "", codec: "Opus Voice", maxClients: null, hasPassword: false },
|
||||
];
|
||||
|
||||
const DEMO_CHANNEL_GROUPS = [
|
||||
{ id: 1, name: "Channel Admin" },
|
||||
{ id: 2, name: "Operator" },
|
||||
{ id: 3, name: "Voice" },
|
||||
{ id: 4, name: "Guest" },
|
||||
];
|
||||
|
||||
const DEMO_SERVER_GROUPS = [
|
||||
{ id: 1, name: "Server Admin" },
|
||||
{ id: 2, name: "Moderator" },
|
||||
{ id: 3, name: "Trusted" },
|
||||
{ id: 4, name: "Guest" },
|
||||
];
|
||||
|
||||
const DEMO_NPCS: DemoClient[] = [
|
||||
{ id: 102, channel: 1, name: "Alex", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: true, country: "US", uid: "demo-uid-alex", databaseId: 2, channelGroup: 2, serverGroups: [2] },
|
||||
{ id: 103, channel: 2, name: "Sam", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "GB", uid: "demo-uid-sam", databaseId: 3, channelGroup: 4, serverGroups: [4] },
|
||||
{ id: 104, channel: 2, name: "Jordan", inputMuted: true, outputMuted: false, inputHardwareEnabled: true, away: false, awayMessage: "", isChannelCommander: false, country: "CA", uid: "demo-uid-jordan", databaseId: 4, channelGroup: 4, serverGroups: [4] },
|
||||
{ id: 105, channel: 3, name: "Riley", inputMuted: false, outputMuted: false, inputHardwareEnabled: true, away: true, awayMessage: "brb, grabbing coffee", isChannelCommander: false, country: "DE", uid: "demo-uid-riley", databaseId: 5, channelGroup: 4, serverGroups: [3, 4] },
|
||||
];
|
||||
|
||||
interface DemoFileEntry {
|
||||
path: string;
|
||||
name: string;
|
||||
size: number;
|
||||
isFile: boolean;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
/** Keyed by "<channelId>:<path>" - a tiny in-memory filesystem so the
|
||||
* channel file browser has something real to navigate/mutate in the demo. */
|
||||
const DEMO_FILES: Record<string, DemoFileEntry[]> = {
|
||||
"1:/": [
|
||||
{ path: "/", name: "readme.txt", size: 182, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
{ path: "/", name: "Musik", size: 0, isFile: false, timestamp: "2024-01-01 12:00:00" },
|
||||
],
|
||||
"1:/Musik": [
|
||||
{ path: "/Musik", name: "lobby-theme.mp3", size: 4 * 1024 * 1024, isFile: true, timestamp: "2024-01-02 09:30:00" },
|
||||
],
|
||||
"2:/": [],
|
||||
"3:/": [],
|
||||
// Channel 0 is TS3's special server-wide icon repository, not a real channel.
|
||||
"0:/": [
|
||||
{ path: "/", name: "icon_100", size: 68, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
{ path: "/", name: "icon_200", size: 68, isFile: true, timestamp: "2024-01-01 12:00:00" },
|
||||
],
|
||||
};
|
||||
|
||||
// A tiny 1x1 transparent PNG, reused as the fake image data for every demo icon.
|
||||
const DEMO_ICON_PNG_BASE64 =
|
||||
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=";
|
||||
|
||||
function demoFileKey(channelId: number, path: string): string {
|
||||
return `${channelId}:${path}`;
|
||||
}
|
||||
|
||||
function demoNowTimestamp(): string {
|
||||
return new Date().toISOString().slice(0, 19).replace("T", " ");
|
||||
}
|
||||
|
||||
interface DemoPermEntry {
|
||||
name: string;
|
||||
description: string;
|
||||
value: number;
|
||||
negated: boolean;
|
||||
skip: boolean;
|
||||
}
|
||||
|
||||
// A small fake permission catalog (real TS3 servers expose ~500 of these) -
|
||||
// enough for the permissions editor's "add permission" picker to be usable.
|
||||
const DEMO_PERMISSION_CATALOG: { id: number; name: string; description: string }[] = [
|
||||
{ id: 1, name: "b_client_info_view", description: "View own client info" },
|
||||
{ id: 2, name: "b_client_permissionoverview_view", description: "View permission overview" },
|
||||
{ id: 3, name: "i_channel_join_power", description: "Power to join channels" },
|
||||
{ id: 4, name: "i_client_talk_power", description: "Talk power" },
|
||||
{ id: 5, name: "b_client_use_priority_speaker", description: "Use priority speaker" },
|
||||
{ id: 6, name: "i_client_max_channel_subscriptions", description: "Max channel subscriptions" },
|
||||
{ id: 7, name: "b_channel_join_permanent", description: "Join permanent channels" },
|
||||
{ id: 8, name: "b_client_kick_from_channel", description: "Kick client from channel" },
|
||||
{ id: 9, name: "b_client_kick_from_server", description: "Kick client from server" },
|
||||
{ id: 10, name: "b_client_ban_client", description: "Ban client" },
|
||||
{ id: 11, name: "i_channel_create_modify_power", description: "Power to create/modify channels" },
|
||||
{ id: 12, name: "b_virtualserver_modify_name", description: "Modify server name" },
|
||||
{ id: 13, name: "b_ft_file_upload", description: "Upload files" },
|
||||
{ id: 14, name: "b_ft_file_download", description: "Download files" },
|
||||
];
|
||||
|
||||
// Keyed by "<scope>:<id1>:<id2 ?? ->" - the fake permission set currently
|
||||
// assigned to one server group / channel group / channel / client /
|
||||
// channel+client combination.
|
||||
const DEMO_PERM_LISTS: Record<string, DemoPermEntry[]> = {
|
||||
"server:1:-": [
|
||||
{ name: "b_client_kick_from_server", description: "Kick client from server", value: 1, negated: false, skip: false },
|
||||
{ name: "b_client_ban_client", description: "Ban client", value: 1, negated: false, skip: false },
|
||||
],
|
||||
"server:4:-": [
|
||||
{ name: "i_channel_join_power", description: "Power to join channels", value: 25, negated: false, skip: false },
|
||||
],
|
||||
"channelgroup:1:-": [
|
||||
{ name: "i_channel_create_modify_power", description: "Power to create/modify channels", value: 75, negated: false, skip: false },
|
||||
],
|
||||
"client:1:-": [
|
||||
{ name: "b_client_info_view", description: "View own client info", value: 1, negated: false, skip: false },
|
||||
],
|
||||
};
|
||||
|
||||
function demoPermKey(scope: string, id1: number, id2?: number): string {
|
||||
return `${scope}:${id1}:${id2 ?? "-"}`;
|
||||
}
|
||||
|
||||
const SELF_ID = 101;
|
||||
|
||||
/**
|
||||
* Drop-in stand-in for a real WebSocket. Implements the subset of the
|
||||
* WebSocket interface App.tsx actually uses (onopen/onmessage/onerror/
|
||||
* onclose/send/close/readyState), so it can be assigned to the same
|
||||
* socketRef without any changes to the event-handling code.
|
||||
*/
|
||||
export class DemoSocket {
|
||||
onopen: ((ev: Event) => void) | null = null;
|
||||
onmessage: ((ev: MessageEvent) => void) | null = null;
|
||||
onerror: ((ev: Event) => void) | null = null;
|
||||
onclose: ((ev: CloseEvent) => void) | null = null;
|
||||
readyState: number = WebSocket.CONNECTING;
|
||||
|
||||
private closed = false;
|
||||
private timers: number[] = [];
|
||||
private selfChannel = 1;
|
||||
private selfChannelGroup = 4;
|
||||
private selfServerGroups = new Set<number>([4]);
|
||||
|
||||
constructor() {
|
||||
this.after(400, () => {
|
||||
this.readyState = WebSocket.OPEN;
|
||||
this.onopen?.(new Event("open"));
|
||||
});
|
||||
}
|
||||
|
||||
send(raw: string) {
|
||||
if (this.closed) return;
|
||||
let msg: any;
|
||||
try {
|
||||
msg = JSON.parse(raw);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
this.handle(msg);
|
||||
}
|
||||
|
||||
close() {
|
||||
if (this.closed) return;
|
||||
// Mirrors the real gateway: a "disconnected" event arrives before the
|
||||
// socket itself finishes closing (see gateway's disconnected event vs.
|
||||
// the client-initiated WebSocket close in handleDisconnect).
|
||||
this.emit({ type: "disconnected", reason: "client requested" });
|
||||
this.closed = true;
|
||||
this.readyState = WebSocket.CLOSED;
|
||||
this.timers.forEach((id) => window.clearTimeout(id));
|
||||
this.timers = [];
|
||||
this.onclose?.({} as CloseEvent);
|
||||
}
|
||||
|
||||
private after(ms: number, fn: () => void) {
|
||||
const id = window.setTimeout(() => {
|
||||
if (this.closed) return;
|
||||
fn();
|
||||
}, ms);
|
||||
this.timers.push(id);
|
||||
}
|
||||
|
||||
private emit(data: unknown) {
|
||||
if (this.closed) return;
|
||||
this.onmessage?.({ data: JSON.stringify(data) } as MessageEvent);
|
||||
}
|
||||
|
||||
private handle(msg: any) {
|
||||
switch (msg.type) {
|
||||
case "connect": {
|
||||
const nickname = String(msg.nickname || "Guest").trim() || "Guest";
|
||||
this.after(900, () => {
|
||||
this.emit({
|
||||
type: "connected",
|
||||
serverName: "WebSpeak3 Demo Server",
|
||||
serverMaxClients: 32,
|
||||
serverVersion: "3.13.7 [Build: demo]",
|
||||
serverLicense: "Demo License",
|
||||
serverBannerUrl: null,
|
||||
welcomeMessage: "This is a simulated demo - no real TeamSpeak server is involved. Connect with any name/address you like.",
|
||||
});
|
||||
this.after(150, () => this.sendChannels(nickname));
|
||||
this.scriptServerLog(nickname);
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "switchChannel": {
|
||||
const fromChannel = this.channelName(this.selfChannel);
|
||||
this.selfChannel = msg.channelId;
|
||||
const toChannel = this.channelName(this.selfChannel);
|
||||
this.emit({
|
||||
type: "serverLog",
|
||||
kind: "clientChannelSwitch",
|
||||
client: this.lastNickname,
|
||||
fromChannel,
|
||||
toChannel,
|
||||
});
|
||||
this.after(120, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "sendChatMessage":
|
||||
this.after(80, () => this.emit({ type: "chatMessage", from: this.lastNickname, message: msg.message }));
|
||||
break;
|
||||
case "sendServerMessage":
|
||||
this.after(80, () => this.emit({ type: "serverMessage", from: this.lastNickname, message: msg.message }));
|
||||
break;
|
||||
case "sendPrivateMessage": {
|
||||
const partner = DEMO_NPCS.find((c) => c.id === msg.clientId);
|
||||
this.after(80, () =>
|
||||
this.emit({
|
||||
type: "privateMessage",
|
||||
partnerId: msg.clientId,
|
||||
partnerName: partner?.name ?? "Unknown",
|
||||
message: msg.message,
|
||||
fromSelf: true,
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "sendPoke": {
|
||||
const partner = DEMO_NPCS.find((c) => c.id === msg.clientId);
|
||||
this.after(400, () =>
|
||||
this.emit({ type: "poke", from: partner?.name ?? "Someone", message: "(demo poke - no reply expected)" })
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getClientConnectionInfo": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "clientConnectionInfo",
|
||||
clientId: msg.clientId,
|
||||
pingMs: 12.4,
|
||||
connectedSecs: 217,
|
||||
ip: msg.clientId === SELF_ID ? "127.0.0.1" : null,
|
||||
packetsSent: 4213,
|
||||
bytesSent: 512_340,
|
||||
packetsReceived: 3987,
|
||||
bytesReceived: 498_120,
|
||||
packetLossPercent: 0,
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getServerConnectionInfo": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "serverConnectionInfo",
|
||||
pingMs: 8.1,
|
||||
connectedSecs: 217,
|
||||
packetLossPercent: 0,
|
||||
packetsSentTotal: 21_004,
|
||||
bytesSentTotal: 2_411_000,
|
||||
packetsReceivedTotal: 19_872,
|
||||
bytesReceivedTotal: 2_198_500,
|
||||
bandwidthSentLastSecond: 4200,
|
||||
bandwidthReceivedLastSecond: 3900,
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getServerLog": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "serverProtocolLog",
|
||||
lines: [
|
||||
"2026-08-05 10:12:03.421128|INFO |VirtualServerBase|1 |connect to server successful, connection accepted",
|
||||
"2026-08-05 10:12:04.001912|INFO |VirtualServerBase|1 |client 'Guest'(id:101) connected",
|
||||
"2026-08-05 10:14:19.552031|INFO |VirtualServerBase|1 |client 'Sam'(id:103) connected",
|
||||
"2026-08-05 10:15:02.884120|INFO |VirtualServerBase|1 |client 'Jordan'(id:104) switched channel",
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getBanList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "banList",
|
||||
entries: [
|
||||
{
|
||||
banId: 1,
|
||||
ip: "203.0.113.42",
|
||||
name: "TrollUser",
|
||||
uid: "demo-uid-troll",
|
||||
lastNickname: "TrollUser",
|
||||
created: "2026-07-28 14:02:11",
|
||||
durationSecs: 0,
|
||||
invokerName: "Alex",
|
||||
reason: "Spamming the server chat",
|
||||
enforcements: 0,
|
||||
},
|
||||
{
|
||||
banId: 2,
|
||||
ip: "198.51.100.7",
|
||||
name: "",
|
||||
uid: "demo-uid-annoying",
|
||||
lastNickname: "AnnoyingGuest",
|
||||
created: "2026-08-01 09:44:53",
|
||||
durationSecs: 3600,
|
||||
invokerName: "Sam",
|
||||
reason: "Repeated channel spam",
|
||||
enforcements: 1,
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "deleteBan":
|
||||
case "deleteAllBans":
|
||||
// No observable effect - the frontend already optimistically removes
|
||||
// the deleted row(s) from its own state.
|
||||
break;
|
||||
case "getComplainList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "complainList",
|
||||
entries: [
|
||||
{
|
||||
targetClientDbId: 104,
|
||||
targetName: "Jordan",
|
||||
fromClientDbId: 103,
|
||||
fromName: "Sam",
|
||||
message: "Kept talking over everyone in voice chat.",
|
||||
timestamp: "2026-08-02 18:21:07",
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "deleteComplaint":
|
||||
case "deleteAllComplaintsFor":
|
||||
break;
|
||||
case "getOfflineMessageList": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "offlineMessageList",
|
||||
entries: [
|
||||
{
|
||||
messageId: 1,
|
||||
clientUid: "demo-uid-sam",
|
||||
subject: "Missed you online",
|
||||
timestamp: "2026-08-03 20:11:44",
|
||||
isRead: false,
|
||||
},
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getOfflineMessage": {
|
||||
this.after(300, () =>
|
||||
this.emit({
|
||||
type: "offlineMessage",
|
||||
messageId: msg.messageId,
|
||||
clientUid: "demo-uid-sam",
|
||||
subject: "Missed you online",
|
||||
message: "Hey, we were on last night in the Gaming channel - join us next time!",
|
||||
timestamp: "2026-08-03 20:11:44",
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "sendOfflineMessage":
|
||||
case "deleteOfflineMessage":
|
||||
case "markOfflineMessageRead":
|
||||
// No observable effect - the frontend already optimistically updates
|
||||
// its own state for delete/read, and there's no NPC to reply to a send.
|
||||
break;
|
||||
case "getChannelGroupList":
|
||||
this.after(300, () => this.emit({ type: "channelGroupList", entries: DEMO_CHANNEL_GROUPS }));
|
||||
break;
|
||||
case "getServerGroupList":
|
||||
this.after(300, () => this.emit({ type: "serverGroupList", entries: DEMO_SERVER_GROUPS }));
|
||||
break;
|
||||
case "setChannelGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) npc.channelGroup = msg.channelGroupId;
|
||||
else if (msg.clientDbId === 1) this.selfChannelGroup = msg.channelGroupId;
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "addServerGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) {
|
||||
if (!npc.serverGroups.includes(msg.serverGroupId)) npc.serverGroups.push(msg.serverGroupId);
|
||||
} else if (msg.clientDbId === 1) {
|
||||
this.selfServerGroups.add(msg.serverGroupId);
|
||||
}
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "removeServerGroup": {
|
||||
const npc = DEMO_NPCS.find((c) => c.databaseId === msg.clientDbId);
|
||||
if (npc) {
|
||||
npc.serverGroups = npc.serverGroups.filter((g) => g !== msg.serverGroupId);
|
||||
} else if (msg.clientDbId === 1) {
|
||||
this.selfServerGroups.delete(msg.serverGroupId);
|
||||
}
|
||||
this.after(200, () => this.sendChannels(this.lastNickname));
|
||||
break;
|
||||
}
|
||||
case "serverQueryLogin":
|
||||
// No observable effect - the demo has no real ServerQuery backend to
|
||||
// authenticate against.
|
||||
break;
|
||||
case "getPermissionOverview": {
|
||||
this.after(400, () =>
|
||||
this.emit({
|
||||
type: "permissionOverview",
|
||||
entries: [
|
||||
{ name: "b_client_info_view", description: "View own client info", value: 1, negated: false, skip: false },
|
||||
{ name: "b_client_permissionoverview_view", description: "View permission overview", value: 1, negated: false, skip: false },
|
||||
{ name: "i_channel_join_power", description: "Power to join channels", value: 25, negated: false, skip: false },
|
||||
{ name: "i_client_talk_power", description: "Talk power", value: 25, negated: false, skip: false },
|
||||
{ name: "b_client_use_priority_speaker", description: "Use priority speaker", value: 0, negated: true, skip: false },
|
||||
{ name: "i_client_max_channel_subscriptions", description: "Max channel subscriptions", value: -1, negated: false, skip: false },
|
||||
{ name: "b_channel_join_permanent", description: "Join permanent channels", value: 1, negated: false, skip: false },
|
||||
],
|
||||
})
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "getPermissionCatalog": {
|
||||
this.after(300, () => this.emit({ type: "permissionCatalog", entries: DEMO_PERMISSION_CATALOG }));
|
||||
break;
|
||||
}
|
||||
case "getPermList": {
|
||||
const key = demoPermKey(msg.scope, msg.id1, msg.id2);
|
||||
this.after(300, () =>
|
||||
this.emit({ type: "permList", scope: msg.scope, id1: msg.id1, id2: msg.id2 ?? null, entries: DEMO_PERM_LISTS[key] ?? [] })
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "addPermission": {
|
||||
const [id1, id2] = msg.ids as number[];
|
||||
const key = demoPermKey(msg.scope, id1, id2);
|
||||
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
|
||||
const name = catalogEntry?.name ?? `#${msg.permId}`;
|
||||
const description = catalogEntry?.description ?? "";
|
||||
const list = (DEMO_PERM_LISTS[key] ?? []).filter((e) => e.name !== name);
|
||||
list.push({ name, description, value: msg.value, negated: !!msg.negated, skip: !!msg.skip });
|
||||
DEMO_PERM_LISTS[key] = list;
|
||||
break;
|
||||
}
|
||||
case "removePermission": {
|
||||
const [id1, id2] = msg.ids as number[];
|
||||
const key = demoPermKey(msg.scope, id1, id2);
|
||||
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
|
||||
const name = catalogEntry?.name ?? `#${msg.permId}`;
|
||||
if (DEMO_PERM_LISTS[key]) DEMO_PERM_LISTS[key] = DEMO_PERM_LISTS[key].filter((e) => e.name !== name);
|
||||
break;
|
||||
}
|
||||
case "getFileList": {
|
||||
const key = demoFileKey(msg.channelId, msg.path);
|
||||
this.after(300, () =>
|
||||
this.emit({ type: "fileList", cid: msg.channelId, path: msg.path, entries: DEMO_FILES[key] ?? [] })
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "createDirectory": {
|
||||
const dir = msg.dirname as string;
|
||||
const parent = dir.slice(0, dir.lastIndexOf("/")) || "/";
|
||||
const name = dir.slice(dir.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
DEMO_FILES[parentKey] = (DEMO_FILES[parentKey] ?? []).filter((e) => e.name !== name);
|
||||
DEMO_FILES[parentKey].push({ path: parent, name, size: 0, isFile: false, timestamp: demoNowTimestamp() });
|
||||
DEMO_FILES[demoFileKey(msg.channelId, dir)] = [];
|
||||
break;
|
||||
}
|
||||
case "deleteFile": {
|
||||
const full = msg.name as string;
|
||||
const parent = full.slice(0, full.lastIndexOf("/")) || "/";
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
if (DEMO_FILES[parentKey]) DEMO_FILES[parentKey] = DEMO_FILES[parentKey].filter((e) => e.name !== name);
|
||||
break;
|
||||
}
|
||||
case "renameFile": {
|
||||
const oldFull = msg.oldName as string;
|
||||
const newFull = msg.newName as string;
|
||||
const parent = oldFull.slice(0, oldFull.lastIndexOf("/")) || "/";
|
||||
const oldName = oldFull.slice(oldFull.lastIndexOf("/") + 1);
|
||||
const newName = newFull.slice(newFull.lastIndexOf("/") + 1);
|
||||
const entry = DEMO_FILES[demoFileKey(msg.channelId, parent)]?.find((e) => e.name === oldName);
|
||||
if (entry) entry.name = newName;
|
||||
break;
|
||||
}
|
||||
case "downloadFile": {
|
||||
const full = msg.path as string;
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const data =
|
||||
msg.channelId === 0
|
||||
? DEMO_ICON_PNG_BASE64
|
||||
: btoa(`This is a demo file. There is no real content behind "${name}" in WebSpeak3's demo mode.`);
|
||||
this.after(400, () => this.emit({ type: "fileDownloadData", cid: msg.channelId, path: full, data }));
|
||||
break;
|
||||
}
|
||||
case "uploadFile": {
|
||||
const full = msg.path as string;
|
||||
const parent = full.slice(0, full.lastIndexOf("/")) || "/";
|
||||
const name = full.slice(full.lastIndexOf("/") + 1);
|
||||
const parentKey = demoFileKey(msg.channelId, parent);
|
||||
const sizeBytes = Math.floor(((msg.dataBase64 as string).length * 3) / 4);
|
||||
DEMO_FILES[parentKey] = (DEMO_FILES[parentKey] ?? []).filter((e) => e.name !== name);
|
||||
DEMO_FILES[parentKey].push({ path: parent, name, size: sizeBytes, isFile: true, timestamp: demoNowTimestamp() });
|
||||
this.after(400, () => this.emit({ type: "fileUploadDone", cid: msg.channelId, path: full }));
|
||||
break;
|
||||
}
|
||||
// "disconnect" is intentionally unhandled here: handleDisconnect() in
|
||||
// App.tsx always calls socket.close() right after sending it, and
|
||||
// close() already emits the "disconnected" event below.
|
||||
// setAway, setInputMuted, setOutputMuted, sendAudio: no observable effect
|
||||
// in a simulated single-user session, intentionally no-ops.
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private lastNickname = "Guest";
|
||||
|
||||
private channelName(id: number): string {
|
||||
return DEMO_CHANNELS.find((c) => c.id === id)?.name ?? "";
|
||||
}
|
||||
|
||||
/** A short, scripted burst of Server-tab log lines so the feature is visible
|
||||
* in the demo without needing a second real user to trigger them. */
|
||||
private scriptServerLog(nickname: string) {
|
||||
this.after(2500, () =>
|
||||
this.emit({ type: "serverLog", kind: "clientJoin", client: "Sam", channel: this.channelName(2) })
|
||||
);
|
||||
this.after(5000, () =>
|
||||
this.emit({
|
||||
type: "serverLog",
|
||||
kind: "clientChannelSwitch",
|
||||
client: "Jordan",
|
||||
fromChannel: this.channelName(2),
|
||||
toChannel: this.channelName(1),
|
||||
})
|
||||
);
|
||||
this.after(7500, () =>
|
||||
this.emit({
|
||||
type: "serverLog",
|
||||
kind: "clientChannelGroupAssigned",
|
||||
client: nickname,
|
||||
group: "Guest",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
private sendChannels(nickname: string) {
|
||||
this.lastNickname = nickname;
|
||||
const self: DemoClient = {
|
||||
id: SELF_ID,
|
||||
channel: this.selfChannel,
|
||||
name: nickname,
|
||||
inputMuted: false,
|
||||
outputMuted: false,
|
||||
inputHardwareEnabled: true,
|
||||
away: false,
|
||||
awayMessage: "",
|
||||
isChannelCommander: false,
|
||||
country: "",
|
||||
uid: "demo-uid-self",
|
||||
databaseId: 1,
|
||||
channelGroup: this.selfChannelGroup,
|
||||
serverGroups: [...this.selfServerGroups],
|
||||
};
|
||||
this.emit({ type: "channels", channels: DEMO_CHANNELS, clients: [self, ...DEMO_NPCS] });
|
||||
}
|
||||
}
|
||||
+570
-6
@@ -20,30 +20,38 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"menu.favorites.manage": "Favoriten verwalten",
|
||||
"menu.self": "Selbst",
|
||||
"menu.rights": "Rechte",
|
||||
"menu.rights.serverGroups": "Server-Gruppen bearbeiten...",
|
||||
"menu.rights.channelGroups": "Channel-Gruppen bearbeiten...",
|
||||
"menu.rights.serverPermissions": "Server-Rechte bearbeiten...",
|
||||
"menu.rights.channelPermissions": "Channel-Rechte bearbeiten...",
|
||||
"menu.rights.overview": "Rechteübersicht...",
|
||||
"menu.rights.myRights": "Eigene Rechte anzeigen",
|
||||
"menu.extras": "Extras",
|
||||
"menu.help": "Hilfe",
|
||||
"menu.extras.identities": "Identitäten",
|
||||
"menu.extras.contacts": "Kontakte",
|
||||
"menu.extras.collectedUrls": "Gesammelte URLs",
|
||||
"menu.extras.fileTransfers": "Dateitransfers",
|
||||
"menu.extras.inviteFriend": "Freund einladen",
|
||||
"menu.extras.offlineMessages": "Offline Nachrichten",
|
||||
"menu.extras.whisperLists": "Whisperlisten",
|
||||
"menu.extras.whisperHistory": "Whisper Verlauf",
|
||||
"menu.extras.clientLog": "Client Protokoll",
|
||||
"menu.extras.banList": "Bannliste",
|
||||
"menu.extras.complaintList": "Beschwerdeliste",
|
||||
"menu.extras.offlineMessages": "Offline Nachrichten",
|
||||
"menu.extras.serverQueryLogin": "ServerQuery Login",
|
||||
"menu.extras.serverLog": "Server Protokoll",
|
||||
"menu.extras.startRecording": "Aufnahme starten",
|
||||
"menu.extras.startMultitrackRecording": "Start Multitrack Recording",
|
||||
"menu.extras.stopRecording": "Aufnahme beenden",
|
||||
"menu.extras.installOverwolf": "Overwolf installieren",
|
||||
"menu.extras.options": "Optionen",
|
||||
|
||||
"toolbar.setAway": "Als abwesend markieren",
|
||||
"toolbar.backOnline": "Wieder online",
|
||||
"toolbar.awayOptions": "Abwesenheitsoptionen",
|
||||
"toolbar.whisper": "Whisper-Ziele",
|
||||
"whisper.channels": "Channels",
|
||||
"whisper.clients": "Clients",
|
||||
"whisper.clearAll": "Alle Whisper-Ziele entfernen",
|
||||
"toolbar.micEnable": "Mikrofon aktivieren",
|
||||
"toolbar.micMute": "Mikrofon stummschalten",
|
||||
"toolbar.micUnmute": "Mikrofon aktivieren (unmute)",
|
||||
@@ -77,6 +85,111 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.newTab": "In neuem Tab",
|
||||
"connect.cancel": "Abbrechen",
|
||||
|
||||
"collectedUrls.title": "Gesammelte URLs",
|
||||
"collectedUrls.search": "Suchen:",
|
||||
"collectedUrls.url": "URL",
|
||||
"collectedUrls.count": "Anzahl",
|
||||
"collectedUrls.lastSeen": "Zuletzt erwähnt",
|
||||
"collectedUrls.mentionedBy": "Erwähnt von",
|
||||
"collectedUrls.clearList": "Liste löschen",
|
||||
|
||||
"inviteFriend.title": "Freund einladen",
|
||||
"inviteFriend.type": "Art der Einladung",
|
||||
"inviteFriend.includeChannel": "Aktuellen Channel einfügen",
|
||||
"inviteFriend.link": "Link",
|
||||
"inviteFriend.addPermissionKey": "Berechtigungsschlüssel hinzufügen",
|
||||
"inviteFriend.copyToClipboard": "In Zwischenablage kopieren",
|
||||
"inviteFriend.copied": "Kopiert!",
|
||||
|
||||
"clientLog.title": "Client Protokoll",
|
||||
"clientLog.level.critical": "Kritisch",
|
||||
"clientLog.level.error": "Fehler",
|
||||
"clientLog.level.warning": "Warnungen",
|
||||
"clientLog.level.info": "Info",
|
||||
"clientLog.level.debug": "Debug",
|
||||
"clientLog.search": "Suchen:",
|
||||
"clientLog.filter": "Filter:",
|
||||
"clientLog.caseSensitive": "Groß-/Kleinschreibung",
|
||||
"clientLog.mark": "Markieren",
|
||||
|
||||
"whisperHistory.title": "Whisper Verlauf - {server}",
|
||||
"whisperHistory.empty": "Kein Whisper-Verlauf vorhanden.",
|
||||
"whisperHistory.started": "Whispern an: {targets}",
|
||||
"whisperHistory.stopped": "Whispern beendet",
|
||||
"whisperHistory.clear": "Löschen",
|
||||
"whisperHistory.options": "Optionen",
|
||||
|
||||
"whisperLists.title": "Whisperlisten",
|
||||
"whisperLists.namePlaceholder": "Name der Liste",
|
||||
"whisperLists.saveCurrent": "Aktuelle Auswahl speichern",
|
||||
"whisperLists.itemDetail": "{channels} Channel, {clients} Clients",
|
||||
"whisperLists.activate": "Aktivieren",
|
||||
"whisperLists.delete": "Löschen",
|
||||
"whisperLists.empty": "Keine Whisperlisten gespeichert. Wähle Whisper-Ziele aus und speichere sie hier als Liste.",
|
||||
|
||||
"identities.title": "Identitäten",
|
||||
"identities.activate": "Aktivieren",
|
||||
"identities.add": "Neue Identität",
|
||||
"identities.delete": "Löschen",
|
||||
"identities.newName": "Neue Identität",
|
||||
"identities.generated": "Erstellt",
|
||||
"identities.pending": "Wird bei der nächsten Verbindung erstellt",
|
||||
"identities.listLabel": "Lokale Identitäten",
|
||||
"identities.name": "Identität Name:",
|
||||
"identities.phoneticNickname": "Phonetischer Nickname:",
|
||||
"identities.uniqueId": "Eindeutige ID:",
|
||||
"identities.unknown": "Unbekannt",
|
||||
"identities.setDefault": "Standard",
|
||||
"identities.isDefault": "Aktuell als Standard verwendet",
|
||||
"identities.export": "Exportieren",
|
||||
"identities.import": "Importieren",
|
||||
|
||||
"connectionInfo.clientTitle": "Verbindungsinformationen - {name}",
|
||||
"connectionInfo.serverTitle": "Serververbindungsinformationen",
|
||||
"connectionInfo.loading": "Wird geladen…",
|
||||
"connectionInfo.unavailable": "Keine Antwort vom Server (fehlende Berechtigung?).",
|
||||
"connectionInfo.ping": "Ping:",
|
||||
"connectionInfo.connectedSince": "Verbunden seit:",
|
||||
"connectionInfo.ip": "IP-Adresse:",
|
||||
"connectionInfo.packetLoss": "Paketverlust:",
|
||||
"connectionInfo.packetsSent": "Pakete gesendet:",
|
||||
"connectionInfo.packetsReceived": "Pakete empfangen:",
|
||||
"connectionInfo.bytesSent": "Daten gesendet:",
|
||||
"connectionInfo.bytesReceived": "Daten empfangen:",
|
||||
"connectionInfo.bandwidthSent": "Bandbreite gesendet:",
|
||||
"connectionInfo.bandwidthReceived": "Bandbreite empfangen:",
|
||||
|
||||
"menu.self.recordingProfile": "Aufnahmeprofil",
|
||||
"menu.self.playbackProfile": "Wiedergabeprofil",
|
||||
"menu.self.hotkeyProfile": "Hotkeyprofil",
|
||||
"menu.self.soundPack": "Sound Pack",
|
||||
"menu.self.setAway": "Abwesend setzen",
|
||||
"menu.self.enableMic": "Mikrofon aktivieren",
|
||||
"menu.self.disableMic": "Mikrofon ausschalten",
|
||||
"menu.self.muteOutput": "Lautsprecher/Kopfhörer ausschalten",
|
||||
"menu.self.unmuteOutput": "Lautsprecher/Kopfhörer einschalten",
|
||||
"menu.self.changeNickname": "Nickname ändern",
|
||||
"menu.self.requestTalkPower": "Talk Power anfordern",
|
||||
"menu.self.setAvatar": "Avatar setzen",
|
||||
"menu.self.setPhoneticNickname": "Phonetischen Nicknamen setzen",
|
||||
"menu.self.connectionInfo": "Verbindungsinformationen",
|
||||
|
||||
"contacts.title": "Kontakte",
|
||||
"contacts.addOnlineClient": "Online-Client auswählen...",
|
||||
"contacts.add": "Hinzufügen",
|
||||
"contacts.remove": "Entfernen",
|
||||
"contacts.empty": "Noch keine Kontakte.",
|
||||
"contacts.customName": "Benutzerdefinierter Name:",
|
||||
"contacts.category.acquaintance": "Bekannter",
|
||||
"contacts.category.blocked": "Blockiert",
|
||||
"contacts.category.friend": "Freund",
|
||||
"contacts.phoneticName": "Phonetischer Name:",
|
||||
"contacts.show": "Anzeige",
|
||||
"contacts.ignore": "Ignorieren",
|
||||
"contacts.unignore": "Nicht mehr ignorieren",
|
||||
"contacts.whisper": "Whispern",
|
||||
"contacts.preferences": "Voreinstellungen",
|
||||
|
||||
"favorites.title": "🔖 myTeamSpeak Favoriten",
|
||||
"favorites.synced": "Synchronisierte Favoriten",
|
||||
"favorites.notLoggedIn": "Nicht angemeldet",
|
||||
@@ -189,6 +302,16 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"chat.send": "Senden",
|
||||
"chat.you": "Du",
|
||||
|
||||
"serverLog.clientJoin": "{client} loggte sich in Channel \"{channel}\" ein",
|
||||
"serverLog.clientLeave": "{client} hat die Verbindung getrennt (Verlassen)",
|
||||
"serverLog.clientChannelSwitch": "{client} ging von Channel \"{fromChannel}\" in \"{toChannel}\"",
|
||||
"serverLog.clientChannelGroupAssigned": "Die Channel-Gruppe \"{group}\" wurde {client} zugewiesen",
|
||||
"serverLog.channelCreated": "Channel \"{channel}\" wurde erstellt",
|
||||
"serverLog.channelDeleted": "Channel \"{channel}\" wurde gelöscht",
|
||||
"serverLog.channelEdited": "Channel \"{channel}\" wurde bearbeitet",
|
||||
"serverLog.serverEdited": "Die Servereinstellungen wurden geändert",
|
||||
"serverLog.permissionError": "Fehlende Berechtigung: {action}",
|
||||
|
||||
"poke.title": "Anstupsen",
|
||||
"poke.optionalMessage": "Optionale Nachricht...",
|
||||
"poke.send": "Anstupsen",
|
||||
@@ -196,6 +319,163 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"poke.pokedYou": "hat dich angestupst",
|
||||
"poke.dismiss": "Schließen",
|
||||
|
||||
"kick.title": "Kicken:",
|
||||
"kick.reasonPlaceholder": "Grund (optional)...",
|
||||
"kick.confirm": "Kicken",
|
||||
"kick.cancel": "Abbrechen",
|
||||
|
||||
"ban.title": "Bannen:",
|
||||
"ban.reasonPlaceholder": "Grund (optional)...",
|
||||
"ban.duration": "Dauer:",
|
||||
"ban.durationPermanent": "Permanent",
|
||||
"ban.duration1h": "1 Stunde",
|
||||
"ban.duration1d": "1 Tag",
|
||||
"ban.duration1w": "1 Woche",
|
||||
"ban.confirm": "Bannen",
|
||||
"ban.cancel": "Abbrechen",
|
||||
|
||||
"serverEdit.title": "Virtuellen Server editieren",
|
||||
"serverEdit.tab.host": "Host",
|
||||
"serverEdit.tab.misc": "Verschiedenes",
|
||||
"serverEdit.tab.transmission": "Übertragung",
|
||||
"serverEdit.tab.antiflood": "Anti-Flood",
|
||||
"serverEdit.tab.security": "Sicherheit",
|
||||
"serverEdit.tab.log": "Protokoll",
|
||||
"serverEdit.name": "Servername:",
|
||||
"serverEdit.welcomeMessage": "Willkommensnachricht:",
|
||||
"serverEdit.clearPassword": "Serverpasswort entfernen",
|
||||
"serverEdit.newPassword": "Neues Serverpasswort:",
|
||||
"serverEdit.hostmessage": "Hostnachricht:",
|
||||
"serverEdit.hostmessageMode": "Anzeigemodus:",
|
||||
"serverEdit.hostmessageMode.none": "Nicht anzeigen",
|
||||
"serverEdit.hostmessageMode.log": "Im Protokoll anzeigen",
|
||||
"serverEdit.hostmessageMode.modal": "Als Dialog anzeigen",
|
||||
"serverEdit.hostmessageMode.modalquit": "Als Dialog anzeigen und trennen",
|
||||
"serverEdit.hostbannerUrl": "Host-Banner URL:",
|
||||
"serverEdit.hostbannerGfxUrl": "Host-Banner Bild-URL:",
|
||||
"serverEdit.hostbannerGfxInterval": "Banner-Aktualisierung (Sekunden):",
|
||||
"serverEdit.hostbannerMode": "Banner-Anpassung:",
|
||||
"serverEdit.hostbannerMode.noadjust": "Nicht anpassen",
|
||||
"serverEdit.hostbannerMode.adjustignoreaspect": "Anpassen (Seitenverhältnis ignorieren)",
|
||||
"serverEdit.hostbannerMode.adjustkeepaspect": "Anpassen (Seitenverhältnis beibehalten)",
|
||||
"serverEdit.hostbuttonTooltip": "Host-Button Tooltip:",
|
||||
"serverEdit.hostbuttonUrl": "Host-Button URL:",
|
||||
"serverEdit.hostbuttonGfxUrl": "Host-Button Bild-URL:",
|
||||
"serverEdit.maxClients": "Maximale Clientanzahl:",
|
||||
"serverEdit.nickname": "Server-Nickname:",
|
||||
"serverEdit.phoneticName": "Phonetischer Name:",
|
||||
"serverEdit.codecEncryptionMode": "Sprachverschlüsselung:",
|
||||
"serverEdit.codecEncryptionMode.perchannel": "Pro Channel konfigurierbar",
|
||||
"serverEdit.codecEncryptionMode.forcedoff": "Global deaktiviert",
|
||||
"serverEdit.codecEncryptionMode.forcedon": "Global aktiviert",
|
||||
"serverEdit.unchanged": "Unverändert lassen",
|
||||
"serverEdit.save": "Speichern",
|
||||
"serverEdit.cancel": "Abbrechen",
|
||||
|
||||
"serverProtocolLog.title": "Server Protokoll",
|
||||
"serverProtocolLog.empty": "Keine Protokolleinträge vorhanden.",
|
||||
"banList.title": "Bannliste",
|
||||
"banList.empty": "Keine Bans vorhanden.",
|
||||
"banList.name": "Name",
|
||||
"banList.ip": "IP",
|
||||
"banList.created": "Erstellt",
|
||||
"banList.duration": "Dauer",
|
||||
"banList.invoker": "Von",
|
||||
"banList.reason": "Grund",
|
||||
"banList.permanent": "Permanent",
|
||||
"banList.delete": "Löschen",
|
||||
"banList.deleteAll": "Alle löschen",
|
||||
"complainList.title": "Beschwerdeliste",
|
||||
"complainList.empty": "Keine Beschwerden vorhanden.",
|
||||
"complainList.target": "Ziel",
|
||||
"complainList.from": "Von",
|
||||
"complainList.message": "Nachricht",
|
||||
"complainList.timestamp": "Zeitpunkt",
|
||||
"offlineMessages.title": "Offline Nachrichten",
|
||||
"offlineMessages.empty": "Keine Nachrichten vorhanden.",
|
||||
"offlineMessages.subject": "Betreff",
|
||||
"offlineMessages.from": "Von",
|
||||
"offlineMessages.timestamp": "Zeitpunkt",
|
||||
"offlineMessages.targetUid": "Ziel-UID",
|
||||
"offlineMessages.message": "Nachricht",
|
||||
"offlineMessages.send": "Senden",
|
||||
"offlineMessages.new": "Neue Nachricht",
|
||||
"offlineMessages.markRead": "Als gelesen markieren",
|
||||
"offlineMessages.backToList": "Zurück zur Liste",
|
||||
"dialog.cancel": "Abbrechen",
|
||||
|
||||
"groupAssign.channelTitle": "Channel-Gruppe zuweisen",
|
||||
"groupAssign.serverTitle": "Server-Gruppe zuweisen",
|
||||
"groupAssign.empty": "Keine Gruppen vorhanden.",
|
||||
"groupAssign.clickToRemove": "Klicken zum Entfernen",
|
||||
|
||||
"serverQueryLogin.username": "Benutzername",
|
||||
"serverQueryLogin.password": "Passwort",
|
||||
"serverQueryLogin.login": "Anmelden",
|
||||
|
||||
"permissionOverview.title": "Eigene Rechte",
|
||||
"permissionOverview.empty": "Keine Rechte gefunden.",
|
||||
"permissionOverview.name": "Recht",
|
||||
"permissionOverview.value": "Wert",
|
||||
"permissionOverview.negated": "Negiert",
|
||||
"permissionOverview.skip": "Skip",
|
||||
|
||||
"permsEditor.title": "Rechte",
|
||||
"permsEditor.tab.server": "Server Gruppen",
|
||||
"permsEditor.tab.client": "Client Rechte",
|
||||
"permsEditor.tab.channel": "Channel Rechte",
|
||||
"permsEditor.tab.channelgroup": "Channel Gruppen",
|
||||
"permsEditor.tab.channelclient": "Channel Client Rechte",
|
||||
"permsEditor.clientDbId": "Eindeutige Client-DB-ID:",
|
||||
"permsEditor.load": "Laden",
|
||||
"permsEditor.pickOnlineClient": "Oder Online-Client wählen...",
|
||||
"permsEditor.pickTarget": "Bitte links eine Gruppe/einen Channel wählen bzw. eine Client-ID eingeben.",
|
||||
"permsEditor.addPermission": "Hinzufügen",
|
||||
"permsEditor.searchPermission": "Recht suchen...",
|
||||
|
||||
"dialog.ok": "OK",
|
||||
"channelContext.files": "Dateien...",
|
||||
"fileBrowser.title": "Dateitransfers",
|
||||
"fileBrowser.up": "Nach oben",
|
||||
"fileBrowser.refresh": "Aktualisieren",
|
||||
"fileBrowser.newFolder": "Neuer Ordner",
|
||||
"fileBrowser.upload": "Hochladen",
|
||||
"fileBrowser.folderName": "Ordnername",
|
||||
"fileBrowser.empty": "Dieser Ordner ist leer.",
|
||||
"fileBrowser.name": "Name",
|
||||
"fileBrowser.size": "Größe",
|
||||
"fileBrowser.modified": "Geändert",
|
||||
"fileBrowser.download": "Herunterladen",
|
||||
"fileBrowser.rename": "Umbenennen",
|
||||
"fileBrowser.delete": "Löschen",
|
||||
"fileBrowser.deleteConfirm": "Wirklich löschen?",
|
||||
"fileBrowser.uploading": "Wird hochgeladen...",
|
||||
"fileBrowser.downloading": "Wird heruntergeladen...",
|
||||
|
||||
"serverContext.icons": "Server-Icons...",
|
||||
"serverIcons.title": "Server-Icons verwalten",
|
||||
"serverIcons.upload": "Icon hochladen",
|
||||
"serverIcons.iconId": "Icon-ID",
|
||||
"serverIcons.empty": "Keine Icons vorhanden.",
|
||||
|
||||
"clientContext.privateChat": "Privater Chat",
|
||||
"clientContext.poke": "Anstupsen",
|
||||
"clientContext.copyName": "Namen kopieren",
|
||||
"clientContext.connectionInfo": "Verbindungsinformationen anzeigen",
|
||||
"clientContext.addWhisperTarget": "Als Whisper-Ziel hinzufügen",
|
||||
"clientContext.removeWhisperTarget": "Als Whisper-Ziel entfernen",
|
||||
"clientContext.assignChannelGroup": "Channel-Gruppe zuweisen",
|
||||
"clientContext.assignServerGroup": "Server-Gruppe zuweisen",
|
||||
"clientContext.kickChannel": "Aus dem Channel kicken",
|
||||
"clientContext.kick": "Vom Server kicken",
|
||||
"clientContext.ban": "Bannen",
|
||||
"clientContext.notSupported": "Im Web-Client noch nicht unterstützt",
|
||||
|
||||
"serverContext.connectionInfo": "Serververbindungsinformationen",
|
||||
"serverContext.copyAddress": "Serveradresse kopieren",
|
||||
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
|
||||
"serverContext.disconnect": "Verbindung trennen",
|
||||
|
||||
"connectError.dismiss": "Schließen",
|
||||
"dialog.close": "Schließen",
|
||||
|
||||
@@ -215,6 +495,8 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"sounds.test": "▶ Testen",
|
||||
"sounds.upload": "Hochladen",
|
||||
"sounds.reset": "Zurücksetzen",
|
||||
"sounds.importSoundpack": "Soundpack importieren (.ts3soundpack)",
|
||||
"sounds.importResult": "{matched} Sound(s) übernommen, {unmatched} Datei(en) nicht zugeordnet",
|
||||
|
||||
"nachrichten.title": "Nachrichten",
|
||||
"nachrichten.subtitle": "Nachrichten anpassen",
|
||||
@@ -238,30 +520,38 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"menu.favorites.manage": "Manage bookmarks",
|
||||
"menu.self": "Self",
|
||||
"menu.rights": "Permissions",
|
||||
"menu.rights.serverGroups": "Edit server groups...",
|
||||
"menu.rights.channelGroups": "Edit channel groups...",
|
||||
"menu.rights.serverPermissions": "Edit server permissions...",
|
||||
"menu.rights.channelPermissions": "Edit channel permissions...",
|
||||
"menu.rights.overview": "Permission overview...",
|
||||
"menu.rights.myRights": "Show my permissions",
|
||||
"menu.extras": "Tools",
|
||||
"menu.help": "Help",
|
||||
"menu.extras.identities": "Identities",
|
||||
"menu.extras.contacts": "Contacts",
|
||||
"menu.extras.collectedUrls": "Collected URLs",
|
||||
"menu.extras.fileTransfers": "File Transfers",
|
||||
"menu.extras.inviteFriend": "Invite a friend",
|
||||
"menu.extras.offlineMessages": "Offline Messages",
|
||||
"menu.extras.whisperLists": "Whisper Lists",
|
||||
"menu.extras.whisperHistory": "Whisper History",
|
||||
"menu.extras.clientLog": "Client Log",
|
||||
"menu.extras.banList": "Ban List",
|
||||
"menu.extras.complaintList": "Complaint List",
|
||||
"menu.extras.offlineMessages": "Offline Messages",
|
||||
"menu.extras.serverQueryLogin": "ServerQuery Login",
|
||||
"menu.extras.serverLog": "Server Log",
|
||||
"menu.extras.startRecording": "Start Recording",
|
||||
"menu.extras.startMultitrackRecording": "Start Multitrack Recording",
|
||||
"menu.extras.stopRecording": "Stop Recording",
|
||||
"menu.extras.installOverwolf": "Install Overwolf",
|
||||
"menu.extras.options": "Options",
|
||||
|
||||
"toolbar.setAway": "Set away",
|
||||
"toolbar.backOnline": "Back online",
|
||||
"toolbar.awayOptions": "Away options",
|
||||
"toolbar.whisper": "Whisper targets",
|
||||
"whisper.channels": "Channels",
|
||||
"whisper.clients": "Clients",
|
||||
"whisper.clearAll": "Clear all whisper targets",
|
||||
"toolbar.micEnable": "Enable microphone",
|
||||
"toolbar.micMute": "Mute microphone",
|
||||
"toolbar.micUnmute": "Unmute microphone",
|
||||
@@ -295,6 +585,111 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"connect.newTab": "In new tab",
|
||||
"connect.cancel": "Cancel",
|
||||
|
||||
"collectedUrls.title": "Collected URLs",
|
||||
"collectedUrls.search": "Search:",
|
||||
"collectedUrls.url": "URL",
|
||||
"collectedUrls.count": "Count",
|
||||
"collectedUrls.lastSeen": "Last mentioned",
|
||||
"collectedUrls.mentionedBy": "Mentioned by",
|
||||
"collectedUrls.clearList": "Clear list",
|
||||
|
||||
"inviteFriend.title": "Invite a friend",
|
||||
"inviteFriend.type": "Invitation type",
|
||||
"inviteFriend.includeChannel": "Insert current channel",
|
||||
"inviteFriend.link": "Link",
|
||||
"inviteFriend.addPermissionKey": "Add permission key",
|
||||
"inviteFriend.copyToClipboard": "Copy to clipboard",
|
||||
"inviteFriend.copied": "Copied!",
|
||||
|
||||
"clientLog.title": "Client Log",
|
||||
"clientLog.level.critical": "Critical",
|
||||
"clientLog.level.error": "Errors",
|
||||
"clientLog.level.warning": "Warnings",
|
||||
"clientLog.level.info": "Info",
|
||||
"clientLog.level.debug": "Debug",
|
||||
"clientLog.search": "Search:",
|
||||
"clientLog.filter": "Filter:",
|
||||
"clientLog.caseSensitive": "Case sensitive",
|
||||
"clientLog.mark": "Mark",
|
||||
|
||||
"whisperHistory.title": "Whisper History - {server}",
|
||||
"whisperHistory.empty": "No whisper history yet.",
|
||||
"whisperHistory.started": "Whispering to: {targets}",
|
||||
"whisperHistory.stopped": "Stopped whispering",
|
||||
"whisperHistory.clear": "Clear",
|
||||
"whisperHistory.options": "Options",
|
||||
|
||||
"whisperLists.title": "Whisper Lists",
|
||||
"whisperLists.namePlaceholder": "List name",
|
||||
"whisperLists.saveCurrent": "Save current selection",
|
||||
"whisperLists.itemDetail": "{channels} channels, {clients} clients",
|
||||
"whisperLists.activate": "Activate",
|
||||
"whisperLists.delete": "Delete",
|
||||
"whisperLists.empty": "No whisper lists saved yet. Select whisper targets and save them here as a list.",
|
||||
|
||||
"identities.title": "Identities",
|
||||
"identities.activate": "Activate",
|
||||
"identities.add": "New Identity",
|
||||
"identities.delete": "Delete",
|
||||
"identities.newName": "New Identity",
|
||||
"identities.generated": "Generated",
|
||||
"identities.pending": "Will be generated on next connection",
|
||||
"identities.listLabel": "Local Identities",
|
||||
"identities.name": "Identity Name:",
|
||||
"identities.phoneticNickname": "Phonetic Nickname:",
|
||||
"identities.uniqueId": "Unique ID:",
|
||||
"identities.unknown": "Unknown",
|
||||
"identities.setDefault": "Set as Default",
|
||||
"identities.isDefault": "Currently used as default",
|
||||
"identities.export": "Export",
|
||||
"identities.import": "Import",
|
||||
|
||||
"connectionInfo.clientTitle": "Connection Info - {name}",
|
||||
"connectionInfo.serverTitle": "Server Connection Info",
|
||||
"connectionInfo.loading": "Loading…",
|
||||
"connectionInfo.unavailable": "No response from the server (missing permission?).",
|
||||
"connectionInfo.ping": "Ping:",
|
||||
"connectionInfo.connectedSince": "Connected since:",
|
||||
"connectionInfo.ip": "IP address:",
|
||||
"connectionInfo.packetLoss": "Packet loss:",
|
||||
"connectionInfo.packetsSent": "Packets sent:",
|
||||
"connectionInfo.packetsReceived": "Packets received:",
|
||||
"connectionInfo.bytesSent": "Data sent:",
|
||||
"connectionInfo.bytesReceived": "Data received:",
|
||||
"connectionInfo.bandwidthSent": "Bandwidth sent:",
|
||||
"connectionInfo.bandwidthReceived": "Bandwidth received:",
|
||||
|
||||
"menu.self.recordingProfile": "Recording Profile",
|
||||
"menu.self.playbackProfile": "Playback Profile",
|
||||
"menu.self.hotkeyProfile": "Hotkey Profile",
|
||||
"menu.self.soundPack": "Sound Pack",
|
||||
"menu.self.setAway": "Set Away",
|
||||
"menu.self.enableMic": "Enable Microphone",
|
||||
"menu.self.disableMic": "Disable Microphone",
|
||||
"menu.self.muteOutput": "Mute Speakers/Headphones",
|
||||
"menu.self.unmuteOutput": "Unmute Speakers/Headphones",
|
||||
"menu.self.changeNickname": "Change Nickname",
|
||||
"menu.self.requestTalkPower": "Request Talk Power",
|
||||
"menu.self.setAvatar": "Set Avatar",
|
||||
"menu.self.setPhoneticNickname": "Set Phonetic Nickname",
|
||||
"menu.self.connectionInfo": "Connection Info",
|
||||
|
||||
"contacts.title": "Contacts",
|
||||
"contacts.addOnlineClient": "Select an online client...",
|
||||
"contacts.add": "Add",
|
||||
"contacts.remove": "Remove",
|
||||
"contacts.empty": "No contacts yet.",
|
||||
"contacts.customName": "Custom Name:",
|
||||
"contacts.category.acquaintance": "Acquaintance",
|
||||
"contacts.category.blocked": "Blocked",
|
||||
"contacts.category.friend": "Friend",
|
||||
"contacts.phoneticName": "Phonetic Name:",
|
||||
"contacts.show": "Show",
|
||||
"contacts.ignore": "Ignore",
|
||||
"contacts.unignore": "Unignore",
|
||||
"contacts.whisper": "Whisper",
|
||||
"contacts.preferences": "Preferences",
|
||||
|
||||
"favorites.title": "🔖 myTeamSpeak Bookmarks",
|
||||
"favorites.synced": "Synced Bookmarks",
|
||||
"favorites.notLoggedIn": "Not logged in",
|
||||
@@ -407,6 +802,16 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"chat.send": "Send",
|
||||
"chat.you": "You",
|
||||
|
||||
"serverLog.clientJoin": "{client} entered channel \"{channel}\"",
|
||||
"serverLog.clientLeave": "{client} disconnected (Left)",
|
||||
"serverLog.clientChannelSwitch": "{client} moved from channel \"{fromChannel}\" to \"{toChannel}\"",
|
||||
"serverLog.clientChannelGroupAssigned": "Channel group \"{group}\" was assigned to {client}",
|
||||
"serverLog.channelCreated": "Channel \"{channel}\" was created",
|
||||
"serverLog.channelDeleted": "Channel \"{channel}\" was deleted",
|
||||
"serverLog.channelEdited": "Channel \"{channel}\" was edited",
|
||||
"serverLog.serverEdited": "Server settings were changed",
|
||||
"serverLog.permissionError": "Missing permission: {action}",
|
||||
|
||||
"poke.title": "Poke",
|
||||
"poke.optionalMessage": "Optional message...",
|
||||
"poke.send": "Poke",
|
||||
@@ -414,6 +819,163 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"poke.pokedYou": "poked you",
|
||||
"poke.dismiss": "Dismiss",
|
||||
|
||||
"kick.title": "Kick:",
|
||||
"kick.reasonPlaceholder": "Reason (optional)...",
|
||||
"kick.confirm": "Kick",
|
||||
"kick.cancel": "Cancel",
|
||||
|
||||
"ban.title": "Ban:",
|
||||
"ban.reasonPlaceholder": "Reason (optional)...",
|
||||
"ban.duration": "Duration:",
|
||||
"ban.durationPermanent": "Permanent",
|
||||
"ban.duration1h": "1 hour",
|
||||
"ban.duration1d": "1 day",
|
||||
"ban.duration1w": "1 week",
|
||||
"ban.confirm": "Ban",
|
||||
"ban.cancel": "Cancel",
|
||||
|
||||
"serverEdit.title": "Edit Virtual Server",
|
||||
"serverEdit.tab.host": "Host",
|
||||
"serverEdit.tab.misc": "Misc",
|
||||
"serverEdit.tab.transmission": "Transmission",
|
||||
"serverEdit.tab.antiflood": "Anti-Flood",
|
||||
"serverEdit.tab.security": "Security",
|
||||
"serverEdit.tab.log": "Log",
|
||||
"serverEdit.name": "Server name:",
|
||||
"serverEdit.welcomeMessage": "Welcome message:",
|
||||
"serverEdit.clearPassword": "Remove server password",
|
||||
"serverEdit.newPassword": "New server password:",
|
||||
"serverEdit.hostmessage": "Host message:",
|
||||
"serverEdit.hostmessageMode": "Display mode:",
|
||||
"serverEdit.hostmessageMode.none": "Don't display",
|
||||
"serverEdit.hostmessageMode.log": "Display in log",
|
||||
"serverEdit.hostmessageMode.modal": "Display as dialog",
|
||||
"serverEdit.hostmessageMode.modalquit": "Display as dialog and disconnect",
|
||||
"serverEdit.hostbannerUrl": "Host banner URL:",
|
||||
"serverEdit.hostbannerGfxUrl": "Host banner image URL:",
|
||||
"serverEdit.hostbannerGfxInterval": "Banner refresh (seconds):",
|
||||
"serverEdit.hostbannerMode": "Banner scaling:",
|
||||
"serverEdit.hostbannerMode.noadjust": "Don't adjust",
|
||||
"serverEdit.hostbannerMode.adjustignoreaspect": "Adjust (ignore aspect ratio)",
|
||||
"serverEdit.hostbannerMode.adjustkeepaspect": "Adjust (keep aspect ratio)",
|
||||
"serverEdit.hostbuttonTooltip": "Host button tooltip:",
|
||||
"serverEdit.hostbuttonUrl": "Host button URL:",
|
||||
"serverEdit.hostbuttonGfxUrl": "Host button image URL:",
|
||||
"serverEdit.maxClients": "Max clients:",
|
||||
"serverEdit.nickname": "Server nickname:",
|
||||
"serverEdit.phoneticName": "Phonetic name:",
|
||||
"serverEdit.codecEncryptionMode": "Voice encryption:",
|
||||
"serverEdit.codecEncryptionMode.perchannel": "Configurable per channel",
|
||||
"serverEdit.codecEncryptionMode.forcedoff": "Globally disabled",
|
||||
"serverEdit.codecEncryptionMode.forcedon": "Globally enabled",
|
||||
"serverEdit.unchanged": "Leave unchanged",
|
||||
"serverEdit.save": "Save",
|
||||
"serverEdit.cancel": "Cancel",
|
||||
|
||||
"serverProtocolLog.title": "Server Log",
|
||||
"serverProtocolLog.empty": "No log entries.",
|
||||
"banList.title": "Ban List",
|
||||
"banList.empty": "No bans found.",
|
||||
"banList.name": "Name",
|
||||
"banList.ip": "IP",
|
||||
"banList.created": "Created",
|
||||
"banList.duration": "Duration",
|
||||
"banList.invoker": "By",
|
||||
"banList.reason": "Reason",
|
||||
"banList.permanent": "Permanent",
|
||||
"banList.delete": "Delete",
|
||||
"banList.deleteAll": "Delete all",
|
||||
"complainList.title": "Complaint List",
|
||||
"complainList.empty": "No complaints found.",
|
||||
"complainList.target": "Target",
|
||||
"complainList.from": "From",
|
||||
"complainList.message": "Message",
|
||||
"complainList.timestamp": "Timestamp",
|
||||
"offlineMessages.title": "Offline Messages",
|
||||
"offlineMessages.empty": "No messages found.",
|
||||
"offlineMessages.subject": "Subject",
|
||||
"offlineMessages.from": "From",
|
||||
"offlineMessages.timestamp": "Timestamp",
|
||||
"offlineMessages.targetUid": "Target UID",
|
||||
"offlineMessages.message": "Message",
|
||||
"offlineMessages.send": "Send",
|
||||
"offlineMessages.new": "New message",
|
||||
"offlineMessages.markRead": "Mark as read",
|
||||
"offlineMessages.backToList": "Back to list",
|
||||
"dialog.cancel": "Cancel",
|
||||
|
||||
"groupAssign.channelTitle": "Assign Channel Group",
|
||||
"groupAssign.serverTitle": "Assign Server Group",
|
||||
"groupAssign.empty": "No groups found.",
|
||||
"groupAssign.clickToRemove": "Click to remove",
|
||||
|
||||
"serverQueryLogin.username": "Username",
|
||||
"serverQueryLogin.password": "Password",
|
||||
"serverQueryLogin.login": "Login",
|
||||
|
||||
"permissionOverview.title": "My Permissions",
|
||||
"permissionOverview.empty": "No permissions found.",
|
||||
"permissionOverview.name": "Permission",
|
||||
"permissionOverview.value": "Value",
|
||||
"permissionOverview.negated": "Negated",
|
||||
"permissionOverview.skip": "Skip",
|
||||
|
||||
"permsEditor.title": "Permissions",
|
||||
"permsEditor.tab.server": "Server Groups",
|
||||
"permsEditor.tab.client": "Client Permissions",
|
||||
"permsEditor.tab.channel": "Channel Permissions",
|
||||
"permsEditor.tab.channelgroup": "Channel Groups",
|
||||
"permsEditor.tab.channelclient": "Channel Client Permissions",
|
||||
"permsEditor.clientDbId": "Unique client DB ID:",
|
||||
"permsEditor.load": "Load",
|
||||
"permsEditor.pickOnlineClient": "Or pick an online client...",
|
||||
"permsEditor.pickTarget": "Pick a group/channel on the left, or enter a client ID.",
|
||||
"permsEditor.addPermission": "Add",
|
||||
"permsEditor.searchPermission": "Search permission...",
|
||||
|
||||
"dialog.ok": "OK",
|
||||
"channelContext.files": "Files...",
|
||||
"fileBrowser.title": "File Transfers",
|
||||
"fileBrowser.up": "Up",
|
||||
"fileBrowser.refresh": "Refresh",
|
||||
"fileBrowser.newFolder": "New Folder",
|
||||
"fileBrowser.upload": "Upload",
|
||||
"fileBrowser.folderName": "Folder name",
|
||||
"fileBrowser.empty": "This folder is empty.",
|
||||
"fileBrowser.name": "Name",
|
||||
"fileBrowser.size": "Size",
|
||||
"fileBrowser.modified": "Modified",
|
||||
"fileBrowser.download": "Download",
|
||||
"fileBrowser.rename": "Rename",
|
||||
"fileBrowser.delete": "Delete",
|
||||
"fileBrowser.deleteConfirm": "Really delete?",
|
||||
"fileBrowser.uploading": "Uploading...",
|
||||
"fileBrowser.downloading": "Downloading...",
|
||||
|
||||
"serverContext.icons": "Server Icons...",
|
||||
"serverIcons.title": "Manage Server Icons",
|
||||
"serverIcons.upload": "Upload Icon",
|
||||
"serverIcons.iconId": "Icon ID",
|
||||
"serverIcons.empty": "No icons found.",
|
||||
|
||||
"clientContext.privateChat": "Private chat",
|
||||
"clientContext.poke": "Poke",
|
||||
"clientContext.copyName": "Copy name",
|
||||
"clientContext.connectionInfo": "Show connection info",
|
||||
"clientContext.addWhisperTarget": "Add as whisper target",
|
||||
"clientContext.removeWhisperTarget": "Remove as whisper target",
|
||||
"clientContext.assignChannelGroup": "Assign channel group",
|
||||
"clientContext.assignServerGroup": "Assign server group",
|
||||
"clientContext.kickChannel": "Kick from channel",
|
||||
"clientContext.kick": "Kick from server",
|
||||
"clientContext.ban": "Ban",
|
||||
"clientContext.notSupported": "Not yet supported in the web client",
|
||||
|
||||
"serverContext.connectionInfo": "Server Connection Info",
|
||||
"serverContext.copyAddress": "Copy server address",
|
||||
"serverContext.addFavorite": "Add to favorites",
|
||||
"serverContext.disconnect": "Disconnect",
|
||||
|
||||
"connectError.dismiss": "Dismiss",
|
||||
"dialog.close": "Close",
|
||||
|
||||
@@ -433,6 +995,8 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"sounds.test": "▶ Test",
|
||||
"sounds.upload": "Upload",
|
||||
"sounds.reset": "Reset",
|
||||
"sounds.importSoundpack": "Import soundpack (.ts3soundpack)",
|
||||
"sounds.importResult": "{matched} sound(s) imported, {unmatched} file(s) not matched",
|
||||
|
||||
"nachrichten.title": "Messages",
|
||||
"nachrichten.subtitle": "Customize messages",
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import { unzipSync } from "fflate";
|
||||
import type { SoundEventId } from "./sounds";
|
||||
|
||||
const AUDIO_EXTENSIONS = [".wav", ".mp3", ".ogg", ".m4a"];
|
||||
|
||||
const MIME_BY_EXTENSION: Record<string, string> = {
|
||||
".wav": "audio/wav",
|
||||
".mp3": "audio/mpeg",
|
||||
".ogg": "audio/ogg",
|
||||
".m4a": "audio/mp4",
|
||||
};
|
||||
|
||||
/** Real .ts3soundpack files use TeamSpeak's own internal event names, which
|
||||
* vary between client versions and aren't documented anywhere stable - so
|
||||
* this matches by keyword against the filename (soundpacks are zips of
|
||||
* individual audio files, not proprietary-encoded) rather than depending on
|
||||
* an exact manifest format. Falls back to a "not matched" list the caller
|
||||
* can surface, instead of silently dropping unrecognized files. */
|
||||
const EVENT_KEYWORDS: Record<SoundEventId, string[]> = {
|
||||
connect: ["connectionaccepted", "connectionestablished", "youhaveconnected", "connect"],
|
||||
disconnect: ["connectionlost", "connectiondisconnected", "youhavebeendisconnected", "disconnect"],
|
||||
clientJoin: ["userenteredchannel", "userenteredvisibility", "cliententerview", "userjoined", "enter"],
|
||||
clientLeave: ["userleftchannel", "userleftvisibility", "clientleftview", "userleave", "userleft", "leave"],
|
||||
message: ["textmessagereceived", "chatmessage", "newmessage", "message"],
|
||||
poke: ["gotpoked", "poke"],
|
||||
};
|
||||
|
||||
function normalize(filename: string): string {
|
||||
const base = filename.slice(filename.lastIndexOf("/") + 1);
|
||||
const dot = base.lastIndexOf(".");
|
||||
return (dot === -1 ? base : base.slice(0, dot)).toLowerCase().replace(/[^a-z0-9]/g, "");
|
||||
}
|
||||
|
||||
function extensionOf(filename: string): string | null {
|
||||
const lower = filename.toLowerCase();
|
||||
return AUDIO_EXTENSIONS.find((ext) => lower.endsWith(ext)) ?? null;
|
||||
}
|
||||
|
||||
export interface SoundpackImportResult {
|
||||
matched: Partial<Record<SoundEventId, { name: string; blob: Blob }>>;
|
||||
unmatchedFiles: string[];
|
||||
}
|
||||
|
||||
export async function parseSoundpack(file: File): Promise<SoundpackImportResult> {
|
||||
const buffer = new Uint8Array(await file.arrayBuffer());
|
||||
const entries = unzipSync(buffer, {
|
||||
filter: (entry) => extensionOf(entry.name) !== null,
|
||||
});
|
||||
|
||||
const matched: SoundpackImportResult["matched"] = {};
|
||||
const unmatchedFiles: string[] = [];
|
||||
|
||||
for (const [name, data] of Object.entries(entries)) {
|
||||
const ext = extensionOf(name);
|
||||
if (!ext) continue;
|
||||
const key = normalize(name);
|
||||
const eventId = (Object.keys(EVENT_KEYWORDS) as SoundEventId[]).find(
|
||||
(id) => !matched[id] && EVENT_KEYWORDS[id].some((keyword) => key.includes(keyword))
|
||||
);
|
||||
if (eventId) {
|
||||
matched[eventId] = {
|
||||
name: name.slice(name.lastIndexOf("/") + 1),
|
||||
blob: new Blob([data.slice()], { type: MIME_BY_EXTENSION[ext] }),
|
||||
};
|
||||
} else {
|
||||
unmatchedFiles.push(name);
|
||||
}
|
||||
}
|
||||
|
||||
return { matched, unmatchedFiles };
|
||||
}
|
||||
+50
-5
@@ -61,13 +61,12 @@ export class MicCapture {
|
||||
private deviceId?: string;
|
||||
private echoCancellation: boolean;
|
||||
private noiseSuppression: boolean;
|
||||
private context: AudioContext;
|
||||
threshold: number;
|
||||
hangoverSeconds: number;
|
||||
|
||||
constructor(
|
||||
private context: AudioContext,
|
||||
options: MicCaptureOptions
|
||||
) {
|
||||
constructor(context: AudioContext, options: MicCaptureOptions) {
|
||||
this.context = context;
|
||||
this.onFrame = options.onFrame;
|
||||
this.onActivity = options.onActivity;
|
||||
this.onLevel = options.onLevel;
|
||||
@@ -135,6 +134,11 @@ export class MicCapture {
|
||||
this.silence.connect(this.context.destination);
|
||||
}
|
||||
|
||||
/** The raw mic input node, e.g. to additionally route it into a recorder. */
|
||||
getSourceNode(): AudioNode | null {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
/** Routes the raw mic signal to `destination` too, so you can hear yourself (a mic test), until disabled again. */
|
||||
setMonitoring(enabled: boolean, destination: AudioNode): void {
|
||||
if (!this.source) return;
|
||||
@@ -167,6 +171,45 @@ export class MicCapture {
|
||||
}
|
||||
}
|
||||
|
||||
function writeAsciiString(view: DataView, offset: number, text: string): void {
|
||||
for (let i = 0; i < text.length; i++) view.setUint8(offset + i, text.charCodeAt(i));
|
||||
}
|
||||
|
||||
/** Encodes raw stereo float samples (range -1..1) as an uncompressed 16-bit PCM WAV file. */
|
||||
export function encodeWavStereo(left: Float32Array, right: Float32Array, sampleRate: number): Blob {
|
||||
const numChannels = 2;
|
||||
const bytesPerSample = 2;
|
||||
const blockAlign = numChannels * bytesPerSample;
|
||||
const dataSize = left.length * blockAlign;
|
||||
const buffer = new ArrayBuffer(44 + dataSize);
|
||||
const view = new DataView(buffer);
|
||||
|
||||
writeAsciiString(view, 0, "RIFF");
|
||||
view.setUint32(4, 36 + dataSize, true);
|
||||
writeAsciiString(view, 8, "WAVE");
|
||||
writeAsciiString(view, 12, "fmt ");
|
||||
view.setUint32(16, 16, true);
|
||||
view.setUint16(20, 1, true); // PCM
|
||||
view.setUint16(22, numChannels, true);
|
||||
view.setUint32(24, sampleRate, true);
|
||||
view.setUint32(28, sampleRate * blockAlign, true);
|
||||
view.setUint16(32, blockAlign, true);
|
||||
view.setUint16(34, 16, true);
|
||||
writeAsciiString(view, 36, "data");
|
||||
view.setUint32(40, dataSize, true);
|
||||
|
||||
let offset = 44;
|
||||
for (let i = 0; i < left.length; i++) {
|
||||
const l = Math.max(-1, Math.min(1, left[i]));
|
||||
const r = Math.max(-1, Math.min(1, right[i]));
|
||||
view.setInt16(offset, l < 0 ? l * 0x8000 : l * 0x7fff, true);
|
||||
view.setInt16(offset + 2, r < 0 ? r * 0x8000 : r * 0x7fff, true);
|
||||
offset += blockAlign;
|
||||
}
|
||||
|
||||
return new Blob([buffer], { type: "audio/wav" });
|
||||
}
|
||||
|
||||
/** Output ("audiooutput") devices available for playback, e.g. for a device picker. */
|
||||
export async function listAudioOutputDevices(): Promise<MediaDeviceInfo[]> {
|
||||
if (!navigator.mediaDevices) return [];
|
||||
@@ -222,8 +265,10 @@ export class AudioPlayer {
|
||||
private destination: MediaStreamAudioDestinationNode;
|
||||
private element: SinkableElement;
|
||||
private gain: GainNode;
|
||||
private context: AudioContext;
|
||||
|
||||
constructor(private context: AudioContext) {
|
||||
constructor(context: AudioContext) {
|
||||
this.context = context;
|
||||
this.destination = context.createMediaStreamDestination();
|
||||
this.gain = context.createGain();
|
||||
this.gain.connect(this.destination);
|
||||
|
||||
@@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react'
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
// Set by the GitHub Pages workflow to the repo subpath (e.g. /webspeak3/);
|
||||
// the normal Docker build serves from the domain root and leaves this unset.
|
||||
base: process.env.VITE_BASE_PATH || '/',
|
||||
})
|
||||
Reference in new issue
Block a user