From 6a821b760e1b1c701da27b607a1fb574b5ef415a Mon Sep 17 00:00:00 2001 From: illusia <64828020+EchoSixHIYA@users.noreply.github.com> Date: Tue, 22 Sep 2026 10:50:53 +0800 Subject: [PATCH] fix: sync mute state and handle move permissions --- src/server/ts-client.ts | 15 ----- src/server/voice-bridge.ts | 84 +++--------------------- web/src/composables/useVoiceWebSocket.ts | 25 ++++--- web/src/views/WebClient.vue | 51 +++++++------- 4 files changed, 48 insertions(+), 127 deletions(-) diff --git a/src/server/ts-client.ts b/src/server/ts-client.ts index 1fe6eb4..15cf8d3 100644 --- a/src/server/ts-client.ts +++ b/src/server/ts-client.ts @@ -354,21 +354,6 @@ export class TSClient extends EventEmitter { await tsClientMove(this.client, clientId, channelId, password); } - /** - * Probe whether this identity may move a visible client into a channel. - * - * The browser client protocol does not expose ServerQuery's `permget`, so - * the only authoritative capability check available through this session is - * the same `clientmove` operation the UI will use. The bridge calls this - * with the client's current channel, making the probe a no-op when accepted; - * TeamSpeak still evaluates both move-power permissions. - */ - async probeMovePermission(clientId: number, channelId: bigint): Promise { - if (!this.client || !this.connected) throw new Error("TeamSpeak session is not ready"); - if (!Number.isInteger(clientId) || clientId <= 0 || clientId > 65535) throw new Error("Invalid TeamSpeak client id"); - await tsClientMove(this.client, clientId, channelId); - } - getClientId(): number { // The SDK learns the real client id during the welcome sequence, before // TSClient.connect() resumes. Reading it from the SDK prevents the first diff --git a/src/server/voice-bridge.ts b/src/server/voice-bridge.ts index 2ca6a13..2df0352 100644 --- a/src/server/voice-bridge.ts +++ b/src/server/voice-bridge.ts @@ -25,7 +25,6 @@ const { OpusEncoder } = require("@discordjs/opus") as { }; const HEARTBEAT_INTERVAL_MS = 30_000; -const MOVE_PERMISSION_PROBE_INTERVAL_MS = 30_000; const AUDIO_FRAME_BYTES = 1_920; // A browser audio frame is 20 ms of mono 48 kHz PCM. Keep the server-side // WebSocket egress queue small enough that a slow browser cannot turn old @@ -155,8 +154,6 @@ interface WebClientEntry { audio: AudioFlowStats; webrtc: WebRtcAudioSession | null; lastLatencyProbeAt: number; - canMoveClients: boolean; - movePermissionProbeTimer: ReturnType | null; connectionFailureCode?: string; screenPeerId: string; } @@ -299,8 +296,6 @@ export class VoiceBridge { audio: createAudioFlowStats(), webrtc: null, lastLatencyProbeAt: 0, - canMoveClients: false, - movePermissionProbeTimer: null, screenPeerId: entryId, }; this.entries.set(entryId, entry!); @@ -465,7 +460,6 @@ export class VoiceBridge { webrtcAvailable: this.getWebRtcOptions()?.enabled === true, screenShareIceServers: this.getScreenShareIceServers(), accelerated: Boolean(entry!.acceleration), - canMoveClients: entry!.canMoveClients, ...(entry!.rememberIdentity ? { identity: tsClient.getIdentityString() } : {}), }); sendJson({ type: "channelList", channels: entry!.channelTree }); @@ -473,57 +467,11 @@ export class VoiceBridge { scheduleMemberAvatarRefresh(); }; - let movePermissionProbeInFlight = false; - const refreshMoveCapability = async (): Promise => { - if (!entry || !tsReady || session.state !== "connected" || movePermissionProbeInFlight) return; - const probeTarget = findMovePermissionProbeTarget(entry, selfId); - if (!probeTarget) return; - movePermissionProbeInFlight = true; - try { - // Probe by moving a visible client to the channel it is already in. - // A successful request has no observable state change, while the - // server still evaluates i_client_move_power and the target channel's - // i_client_needed_move_power. This avoids using ServerQuery-only - // `permget`, which is not available on the browser client protocol. - await tsClient.probeMovePermission(probeTarget.clientId, BigInt(probeTarget.channelId)); - if (!entry.canMoveClients) { - entry.canMoveClients = true; - sendJson({ type: "capabilities", canMoveClients: true }); - } - } catch (error: unknown) { - const operation = classifyOperationError(error, "OPERATION_FAILED", "操作失败"); - // TeamSpeak rejects a no-op move with ALREADY_IN_CHANNEL after it - // has evaluated the caller's move power. That is still a positive - // permission result for this capability probe; treating it as a - // failed probe made server-admin clients look permanently disabled. - if (operation.code === "ALREADY_IN_CHANNEL") { - if (!entry.canMoveClients) { - entry.canMoveClients = true; - sendJson({ type: "capabilities", canMoveClients: true }); - } - } else if (operation.code === "PERMISSION_DENIED" && entry.canMoveClients) { - entry.canMoveClients = false; - sendJson({ type: "capabilities", canMoveClients: false }); - } - this.logger.debug({ - entryId, - clientId: probeTarget.clientId, - channelId: probeTarget.channelId, - code: operation.code, - }, "TeamSpeak move capability probe completed"); - } finally { - movePermissionProbeInFlight = false; - } - }; - entry!.movePermissionProbeTimer = setInterval(() => { void refreshMoveCapability(); }, MOVE_PERMISSION_PROBE_INTERVAL_MS); - entry!.movePermissionProbeTimer.unref?.(); - const resetDirectoryForReconnect = () => { tsReady = false; initialStateSent = false; selfId = 0; selfChannelId = 0n; - entry!.canMoveClients = false; directory.clear(); entry!.channelTree = []; entry!.members.clear(); @@ -595,7 +543,6 @@ export class VoiceBridge { } sendInitialState(); void this.discoverExistingTeamSpeakStreams(entry!); - void refreshMoveCapability(); } catch (error: unknown) { const normalized = normalizeTeamSpeakError(error); const failureCode = clientConnectionFailureCode(normalized, serverPassword); @@ -661,7 +608,6 @@ export class VoiceBridge { if (!wasKnown) sendJson({ type: "memberEnter", id: info.id, nickname: info.nickname, uid: info.uid, isSelf: info.id === selfId }); if (!wasKnown && info.id !== selfId) addServerEvent("joined", `${info.nickname || "未知用户"} 加入了服务器`); scheduleMemberAvatarRefresh(); - void refreshMoveCapability(); } }); @@ -992,10 +938,6 @@ export class VoiceBridge { clearTimeout(entry.reconnectTimer); entry.reconnectTimer = null; } - if (entry.movePermissionProbeTimer) { - clearInterval(entry.movePermissionProbeTimer); - entry.movePermissionProbeTimer = null; - } entry.opusEncoder = null; const webRtc = entry.webrtc; entry.webrtc = null; @@ -1673,12 +1615,21 @@ export class VoiceBridge { } const config = this.getWebRtcOptions(); if (!config?.enabled) return; + const muted = offer.muted === true; + try { + // The offer carries the browser's initial mute state. WebRTC can silence + // the browser track locally, but TeamSpeak clients only see the state + // after the gateway updates its own TS client as well. + await entry.tsClient.setInputMuted(muted); + } catch (error: unknown) { + this.logger.warn({ entryId: entry.id, muted, err: error instanceof Error ? error.message : String(error) }, "Could not synchronize initial microphone mute state"); + } const peer = new WebRtcAudioSession({ connectionId: entry.id, ...(entry.webrtcPublicHost ? { publicHost: entry.webrtcPublicHost } : {}), udpPortRange: config.udpPortRange, logger: this.logger, - microphoneMuted: offer.muted === true, + microphoneMuted: muted, accompanimentActive: offer.accompanimentActive === true, onVoiceFrame: (data, codec) => { const now = Date.now(); @@ -1891,10 +1842,6 @@ async function handleCommand( if (command.requestId) sendJson({ type: "commandCompleted", requestId: command.requestId }); } catch (error: unknown) { const operation = classifyOperationError(error, "OPERATION_FAILED", "操作失败"); - if (command.type === "moveClient" && operation.code === "PERMISSION_DENIED" && entry.canMoveClients) { - entry.canMoveClients = false; - sendJson({ type: "capabilities", canMoveClients: false }); - } sendJson({ type: "error", requestId: command.requestId, error: { code: operation.code, message: operation.message, recoverable: false } }); } } @@ -2118,17 +2065,6 @@ function mapChannelTree(snapshot: TSDirectorySnapshot, avatarCache = new Map, selfId: number): { clientId: number; channelId: string } | null { - for (const rawChannel of entry.channelTree) { - if (!isRecord(rawChannel) || typeof rawChannel.id !== "string" || !Array.isArray(rawChannel.members)) continue; - for (const rawMember of rawChannel.members) { - if (!isRecord(rawMember) || typeof rawMember.id !== "number" || rawMember.id === selfId) continue; - if (entry.members.has(rawMember.id)) return { clientId: rawMember.id, channelId: rawChannel.id }; - } - } - return null; -} - function avatarDataUrl(data: Buffer): string | null { if (data.length >= 8 && data.subarray(0, 8).equals(Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]))) return `data:image/png;base64,${data.toString("base64")}`; if (data.length >= 3 && data.subarray(0, 3).equals(Buffer.from([0xff, 0xd8, 0xff]))) return `data:image/jpeg;base64,${data.toString("base64")}`; diff --git a/web/src/composables/useVoiceWebSocket.ts b/web/src/composables/useVoiceWebSocket.ts index ec385f7..5d1ada1 100644 --- a/web/src/composables/useVoiceWebSocket.ts +++ b/web/src/composables/useVoiceWebSocket.ts @@ -49,7 +49,6 @@ export interface VoiceState { reconnectAttempt: number; reconnectFailed: boolean; tsClientId: number; - canMoveClients: boolean; error: string; errorCode: string; /** @@ -295,7 +294,7 @@ const CONNECTION_FAILURE_MESSAGES: Record = { export function useVoiceWebSocket() { const ws = ref(null); - const state = reactive({ connected: false, connecting: false, reconnecting: false, reconnectAttempt: 0, reconnectFailed: false, tsClientId: 0, canMoveClients: false, error: "", errorCode: "", microphoneError: "", microphoneErrorCode: "", audioNotice: "", audioNoticeCode: "", channelSwitchedChannelId: "" }); + const state = reactive({ connected: false, connecting: false, reconnecting: false, reconnectAttempt: 0, reconnectFailed: false, tsClientId: 0, error: "", errorCode: "", microphoneError: "", microphoneErrorCode: "", audioNotice: "", audioNoticeCode: "", channelSwitchedChannelId: "" }); const members = reactive([]); const channels = reactive([]); const chatMessages = reactive([]); @@ -447,7 +446,7 @@ export function useVoiceWebSocket() { } } - void loadLocalPreferences().then((preferences) => { + const audioPreferencesReady = loadLocalPreferences().then((preferences) => { if (!selectedInputDeviceId.value) selectedInputDeviceId.value = preferences.preferredInputDeviceId ?? preferences.inputDeviceId ?? ""; if (typeof preferences.microphoneMuted === "boolean") microphoneMuted.value = preferences.microphoneMuted; if (typeof preferences.noiseSuppressionEnabled === "boolean") noiseSuppressionEnabled.value = preferences.noiseSuppressionEnabled; @@ -1480,7 +1479,10 @@ export function useVoiceWebSocket() { state.reconnecting = false; state.reconnectAttempt = 0; state.reconnectFailed = false; - void openTicketedConnection(sequence, target, channel, nickname, serverPassword, inviteToken, accelerated); + void audioPreferencesReady.then(() => { + if (sequence !== connectionSequence) return; + void openTicketedConnection(sequence, target, channel, nickname, serverPassword, inviteToken, accelerated); + }); } async function openTicketedConnection(sequence: number, target: string, channel: string, nickname: string, serverPassword: string, inviteToken: string, accelerated: boolean): Promise { @@ -1535,7 +1537,6 @@ export function useVoiceWebSocket() { clearLatencyProbes(); rejectPendingCommands(new Error("语音连接已关闭")); state.connected = false; - state.canMoveClients = false; state.connecting = false; state.reconnecting = false; // Prefer the close code over the generic WebSocket error event. The @@ -1640,7 +1641,6 @@ export function useVoiceWebSocket() { state.reconnectAttempt = 0; state.reconnectFailed = false; state.tsClientId = 0; - state.canMoveClients = false; state.errorCode = ""; state.channelSwitchedChannelId = ""; if (!keepRememberedIdentity) identityMaterial.value = ""; @@ -2066,7 +2066,11 @@ export function useVoiceWebSocket() { state.errorCode = ""; state.channelSwitchedChannelId = ""; state.tsClientId = Number(msg.tsClientId) || 0; - state.canMoveClients = msg.canMoveClients === true; + // The mute preference is local to the browser, while TeamSpeak shows + // the gateway's own client_input_muted flag to other clients. Send it + // as soon as the session is ready so a muted reconnect is visible to + // native TeamSpeak users even before WebRTC negotiation completes. + sendCmd("setMicrophoneMuted", { muted: microphoneMuted.value }); screenShareIceServers = normalizeScreenShareIceServers(msg.screenShareIceServers); applyWhisperState(msg.whisperTargetIds, msg.whisperActive); if (Array.isArray(msg.members)) { @@ -2212,9 +2216,6 @@ export function useVoiceWebSocket() { } syncKnownMemberVolumes(); break; - case "capabilities": - state.canMoveClients = msg.canMoveClients === true; - break; case "memberAvatar": { const clientId = Number(msg.id); const uid = typeof msg.uid === "string" ? msg.uid : ""; @@ -2280,7 +2281,6 @@ export function useVoiceWebSocket() { } case "disconnected": state.connected = false; - state.canMoveClients = false; state.connecting = false; state.reconnecting = Boolean(msg.recoverable !== false); state.reconnectFailed = false; @@ -2293,7 +2293,6 @@ export function useVoiceWebSocket() { break; case "reconnecting": state.connected = false; - state.canMoveClients = false; state.connecting = false; state.reconnecting = true; state.reconnectFailed = false; @@ -2310,7 +2309,6 @@ export function useVoiceWebSocket() { break; case "reconnectFailed": state.connected = false; - state.canMoveClients = false; state.connecting = false; state.reconnecting = false; state.reconnectFailed = true; @@ -2322,7 +2320,6 @@ export function useVoiceWebSocket() { break; case "connectionFailed": state.connected = false; - state.canMoveClients = false; state.connecting = false; state.reconnecting = false; // This is the first connection attempt, not a failed reconnect. Keep diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index fbe3ab5..1d8ee48 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -23,13 +23,17 @@
{{ t('secureJoin') }}{{ t('inviteProtected') }}
{{ t('realtime') }}{{ t('membersSync') }}
+
+ + + {{ t('visitorCount', { count: visitorNumber }) }} + +
-
{{ t('joinServer') }}

{{ t('welcomeBack') }}

{{ t('joinLead') }}

-

{{ t('visitorCount', { count: visitorNumber }) }}

!{{ localizedMessage(voiceState.error) }}{{ t('errorCode') }}: {{ visibleErrorCode(voiceState.errorCode) }}
i{{ localizedMessage(browserError) }}
@@ -41,7 +45,6 @@
-

{{ t('serverAddressHint') }}

{{ t('relayAcceleration') }}{{ t('relayAccelerationHint') }}
{{ t('favoriteServers') }}
@@ -215,7 +218,7 @@ {{ channelItem.members.length }}
-
+
{{ member.avatar ? '' : avatarInitial(member.nickname) }}
{{ memberDisplayName(member) }}{{ member.away ? t('away') : isSpeaking(member) ? t('speaking') : member.isSelf ? t('yourDevice') : t('memberOnline') }}
@@ -278,7 +281,7 @@ -
+
@@ -286,7 +289,6 @@ {{ t('moveMemberNoChannels') }}
-
@@ -1640,7 +1642,7 @@ function localizedMessage(message: string) { "连接 TeamSpeak 超时,请检查网络或服务器状态": "TeamSpeak への接続がタイムアウトしました。ネットワークとサーバーの状態を確認してください", "你没有执行此操作的权限": "この操作を実行する権限がありません", }; - if (localizedExact[message]) return localizedExact[message]; + if ((language.value === "ru" || language.value === "ja") && localizedExact[message]) return localizedExact[message]; const errorCodeMatch = message.match(/错误代码:([A-Z0-9_-]{1,64}))(?::([^,。]+))?/); if (errorCodeMatch) { const code = errorCodeMatch[1]; @@ -2470,21 +2472,11 @@ function openMemberActions(member: ChannelMember): void { } function toggleMemberMoveMenu(): void { - if (!voiceState.canMoveClients) { - showToast(t("movePermissionDenied")); - return; - } memberMoveMenuOpen.value = true; } async function moveMemberDirect(member: ChannelMember, targetChannelId: string): Promise { if (member.isSelf || !targetChannelId || targetChannelId === "__current__") return; - if (!voiceState.canMoveClients) { - memberMenu.value = null; - memberMoveMenuOpen.value = false; - showToast(t("movePermissionDenied")); - return; - } const sourceChannel = memberChannels.value.find((channel) => channel.members.some((candidate) => candidate.id === member.id)); if (sourceChannel?.id === targetChannelId) { memberMenu.value = null; @@ -2504,9 +2496,8 @@ async function moveMemberDirect(member: ChannelMember, targetChannelId: string): } function onMemberDragStart(member: ChannelMember, event: DragEvent): void { - if (member.isSelf || !voiceState.canMoveClients) { + if (member.isSelf) { event.preventDefault(); - if (!member.isSelf) showToast(t("movePermissionDenied")); return; } draggedMember.value = member; @@ -2521,7 +2512,7 @@ function onMemberDragEnd(): void { } function onMemberPointerDown(member: ChannelMember, event: PointerEvent): void { - if (member.isSelf || !voiceState.canMoveClients || event.button !== 0) return; + if (member.isSelf || event.button !== 0) return; const target = event.target instanceof Element ? event.target : null; if (target?.closest("input,button")) return; event.preventDefault(); @@ -2861,11 +2852,16 @@ function stopWhisperTalk(): void { .promise-item b, .promise-item small { display: block; } .promise-item b { color: #283431; font-size: 12px; } .promise-item small { margin-top: 3px; color: #87938f; font-size: 10px; } +.visitor-count { position: relative; display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-height: 42px; margin: 30px 0 0; padding: 7px 14px 7px 9px; overflow: hidden; color: #006a64; border: 1px solid rgba(86, 202, 185, .42); border-radius: 999px; background: linear-gradient(110deg, rgba(225, 250, 245, .94), rgba(244, 255, 252, .78)); box-shadow: 0 10px 24px rgba(0, 106, 100, .1), inset 0 0 0 1px rgba(255, 255, 255, .55); font-size: 12px; font-weight: 700; letter-spacing: .035em; } +.visitor-count::before { position: absolute; top: 0; bottom: 0; left: -45%; width: 38%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .62), transparent); content: ""; pointer-events: none; transform: skewX(-18deg); animation: visitor-shimmer 3.6s 1.5s ease-in-out infinite; } +.visitor-count-orbit { position: absolute; top: -20px; right: 12px; width: 51px; height: 51px; border: 1px solid rgba(71, 194, 174, .32); border-radius: 50%; pointer-events: none; animation: visitor-orbit 4s ease-in-out infinite; } +.visitor-count-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #006a64, #32cdb7); box-shadow: 0 0 0 4px rgba(55, 205, 182, .12), 0 0 18px rgba(55, 205, 182, .24); } +.visitor-count-label { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.visitor-count-spark { position: relative; z-index: 1; color: #35bea7; font-size: 15px; line-height: 1; animation: visitor-spark 2.1s ease-in-out infinite; } .join-card { padding: 30px; border: 1px solid rgba(214, 226, 223, .8); border-radius: 20px; background: rgba(255, 255, 255, .86); box-shadow: 0 20px 52px rgba(35, 68, 63, .08); backdrop-filter: blur(12px); } .card-kicker, .section-kicker { color: #79918c; font-size: 10px; font-weight: 700; letter-spacing: .16em; } .join-card h2 { margin: 10px 0 7px; color: #1b2825; font-size: 27px; letter-spacing: -.045em; } .card-lead { margin: 0 0 7px; color: #7b8885; font-size: 13px; } -.visitor-count { margin: 0 0 18px; color: #8a9894; font-size: 11px; letter-spacing: .02em; } .notice { display: flex; align-items: flex-start; gap: 10px; min-width: 0; margin: 0 0 10px; padding: 9px 10px; border-radius: 10px; font-size: 12px; line-height: 1.45; } .notice-content { min-width: 0; overflow-wrap: anywhere; } .notice-content code { display: block; max-width: 100%; margin-top: 3px; overflow: hidden; color: currentColor; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; opacity: .78; } @@ -2957,6 +2953,9 @@ function stopWhisperTalk(): void { @keyframes join-accent-breathe { 0%, 100% { transform: translateY(0); text-shadow: 0 0 0 rgba(0, 106, 100, 0); } 50% { transform: translateY(-2px); text-shadow: 0 5px 18px rgba(0, 106, 100, .16); } } @keyframes join-accent-breathe-dark { 0%, 100% { transform: translateY(0); text-shadow: 0 0 8px rgba(125, 255, 174, .28), 0 0 18px rgba(105, 210, 199, .14); } 50% { transform: translateY(-2px); text-shadow: 0 0 13px rgba(125, 255, 174, .5), 0 0 26px rgba(105, 210, 199, .22); } } @keyframes join-dot-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(144, 246, 145, .28); } 50% { transform: scale(1.18); box-shadow: 0 0 0 6px rgba(144, 246, 145, 0); } } +@keyframes visitor-shimmer { 0%, 42% { left: -45%; } 72%, 100% { left: 130%; } } +@keyframes visitor-spark { 0%, 100% { opacity: .58; transform: scale(.88) rotate(0deg); } 50% { opacity: 1; transform: scale(1.14) rotate(12deg); } } +@keyframes visitor-orbit { 0%, 100% { transform: rotate(-8deg) scale(.96); opacity: .48; } 50% { transform: rotate(12deg) scale(1.04); opacity: .9; } } .join-page .join-header { animation: join-fade-up .55s cubic-bezier(.22, 1, .36, 1) both; } .join-page .join-copy .eyebrow { animation: join-fade-up .55s .08s cubic-bezier(.22, 1, .36, 1) both; } @@ -2966,6 +2965,7 @@ function stopWhisperTalk(): void { .join-page .promise-list { animation: join-fade-up .58s .48s cubic-bezier(.22, 1, .36, 1) both; } .join-page .promise-item:nth-child(2) { animation: join-fade-up .58s .58s cubic-bezier(.22, 1, .36, 1) both; } .join-page .promise-item:nth-child(3) { animation: join-fade-up .58s .68s cubic-bezier(.22, 1, .36, 1) both; } +.join-page .visitor-count { animation: join-fade-up .58s .76s cubic-bezier(.22, 1, .36, 1) both; } .join-page .eyebrow-dot { animation: join-dot-pulse 2.8s .8s ease-in-out infinite; } .join-page .join-card { animation: join-fade-up .68s .24s cubic-bezier(.22, 1, .36, 1) both; } .join-page .join-footer { animation: join-fade-up .55s .72s cubic-bezier(.22, 1, .36, 1) both; } @@ -2976,7 +2976,7 @@ function stopWhisperTalk(): void { @media (max-width: 1200px) { .app-shell { grid-template-columns: 72px 255px minmax(0, 1fr) 218px; }.workspace-content { width: min(900px, calc(100% - 42px)); }.control-dock { padding-inline: 18px; }.dock-center { gap: 8px; }.mic-mode-switch button { padding-inline: 7px; }.member-panel { padding-inline: 12px; }.member-volume { display: none; } } @media (max-width: 980px) { .app-shell { grid-template-columns: 70px 245px minmax(0, 1fr); }.member-panel { display: none; }.room-hero { min-height: 180px; }.hero-visual { right: 24px; opacity: .55; }.join-content { gap: 40px; }.join-card { padding: 28px; } } -@media (max-width: 740px) { .join-header, .join-content, .join-footer { width: min(100% - 32px, 560px); }.join-header { min-height: 70px; }.header-note { display: none; }.join-content { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 35px; padding: 36px 0 48px; }.join-copy h1 { margin-top: 15px; font-size: 45px; }.join-description { font-size: 14px; }.promise-list { gap: 13px; margin-top: 27px; }.promise-item { min-width: 0; flex: 1 1 30%; }.promise-item small { display: none; }.join-card { padding: 24px 20px; }.join-footer { min-height: 53px; }.join-footer .footer-spacer { display: none; }.join-footer span:last-child { margin-left: auto; }.field-grid { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }.app-shell { display: block; height: 100dvh; }.nav-rail, .channel-sidebar, .member-panel { display: none; }.workspace { height: 100%; }.workspace-header { min-height: 61px; padding: 0 15px; }.mobile-brand { display: inline; }.crumb-muted, .breadcrumbs > .ui-icon, .breadcrumbs > strong { display: none; }.workspace-actions { gap: 3px; }.disconnect-button { margin-left: 2px; padding-inline: 9px; }.disconnect-button .ui-icon { display: none; }.workspace-content { width: calc(100% - 30px); padding-top: 18px; }.room-hero { min-height: 182px; padding: 23px 21px; }.room-hero h1 { font-size: 22px; }.room-hero p { max-width: 74%; font-size: 11px; }.hero-visual { right: -15px; bottom: 4px; transform: scale(.75); transform-origin: right bottom; }.voice-section, .chat-panel { margin-top: 25px; }.voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.voice-card { min-height: 143px; }.message-row { max-width: 92%; }.control-dock { min-height: 66px; padding: 8px 15px; }.dock-user { min-width: 0; }.dock-user > div:last-child { display: none; }.dock-center { flex: 1; justify-content: center; }.mic-mode-switch button { padding: 6px 7px; font-size: 9px; }.ptt-indicator { display: none; }.dock-actions { min-width: 75px; }.settings-modal { max-height: calc(100dvh - 28px); }.settings-nav { display: none; }.settings-content { padding: 24px 20px; }.settings-header { min-height: 62px; padding-inline: 20px; }.settings-header h2 { font-size: 19px; }.settings-footer { min-height: 61px; padding-inline: 20px; } } +@media (max-width: 740px) { .join-header, .join-content, .join-footer { width: min(100% - 32px, 560px); }.join-header { min-height: 70px; }.header-note { display: none; }.join-content { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 35px; padding: 36px 0 48px; }.join-copy h1 { margin-top: 15px; font-size: 45px; }.join-description { font-size: 14px; }.promise-list { gap: 13px; margin-top: 27px; }.promise-item { min-width: 0; flex: 1 1 30%; }.promise-item small { display: none; }.visitor-count { margin-top: 24px; }.join-card { padding: 24px 20px; }.join-footer { min-height: 53px; }.join-footer .footer-spacer { display: none; }.join-footer span:last-child { margin-left: auto; }.field-grid { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }.app-shell { display: block; height: 100dvh; }.nav-rail, .channel-sidebar, .member-panel { display: none; }.workspace { height: 100%; }.workspace-header { min-height: 61px; padding: 0 15px; }.mobile-brand { display: inline; }.crumb-muted, .breadcrumbs > .ui-icon, .breadcrumbs > strong { display: none; }.workspace-actions { gap: 3px; }.disconnect-button { margin-left: 2px; padding-inline: 9px; }.disconnect-button .ui-icon { display: none; }.workspace-content { width: calc(100% - 30px); padding-top: 18px; }.room-hero { min-height: 182px; padding: 23px 21px; }.room-hero h1 { font-size: 22px; }.room-hero p { max-width: 74%; font-size: 11px; }.hero-visual { right: -15px; bottom: 4px; transform: scale(.75); transform-origin: right bottom; }.voice-section, .chat-panel { margin-top: 25px; }.voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.voice-card { min-height: 143px; }.message-row { max-width: 92%; }.control-dock { min-height: 66px; padding: 8px 15px; }.dock-user { min-width: 0; }.dock-user > div:last-child { display: none; }.dock-center { flex: 1; justify-content: center; }.mic-mode-switch button { padding: 6px 7px; font-size: 9px; }.ptt-indicator { display: none; }.dock-actions { min-width: 75px; }.settings-modal { max-height: calc(100dvh - 28px); }.settings-nav { display: none; }.settings-content { padding: 24px 20px; }.settings-header { min-height: 62px; padding-inline: 20px; }.settings-header h2 { font-size: 19px; }.settings-footer { min-height: 61px; padding-inline: 20px; } } @media (max-width: 420px) { .join-copy h1 { font-size: 38px; }.promise-list { display: grid; grid-template-columns: 1fr; }.promise-item small { display: block; }.join-card { border-radius: 15px; }.voice-grid { gap: 8px; }.voice-card { padding-inline: 6px; }.section-counter { display: none; }.workspace-actions .header-action:first-child { display: none; }.dock-icon { display: none; }.dock-actions { min-width: 37px; }.room-stats { gap: 6px; }.room-stats span:last-child, .stat-divider { display: none; } } /* The connected view keeps only controls that have a working action. The @@ -3092,6 +3092,7 @@ function stopWhisperTalk(): void { .join-page .card-kicker { font-size: 12.5px; } .join-page .join-card h2 { font-size: 33.75px; } .join-page .card-lead { font-size: 16.25px; } +.join-page .visitor-count { font-size: 15px; } .join-page .notice { font-size: 15px; } .join-page .field-label { font-size: 13.75px; } .join-page .field-wrap input { font-size: 16.25px; } @@ -3230,7 +3231,7 @@ function stopWhisperTalk(): void { .room-hero { background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 18%, var(--surface-1)), var(--surface-1) 75%); } .voice-card, .member-panel, .settings-modal { box-shadow: 0 7px 18px color-mix(in srgb, var(--text-primary) 8%, transparent); } .section-heading h2, .room-hero h1, .join-card h2, .member-panel-heading h2, .message-meta strong, .member-copy strong { color: var(--text-primary); } -.section-kicker, .card-kicker, .settings-label, .header-note, .section-counter, .message-meta time, .member-copy span, .chat-empty, .join-description, .card-lead, .visitor-count { color: var(--text-muted); } +.section-kicker, .card-kicker, .settings-label, .header-note, .section-counter, .message-meta time, .member-copy span, .chat-empty, .join-description, .card-lead { color: var(--text-muted); } .chat-panel, .chat-heading, .settings-header, .settings-footer, .settings-separator { border-color: var(--border); } .message-bubble { color: var(--text-primary); background: var(--surface-2); } .settings-content, .settings-nav { background: var(--surface-1); } @@ -3253,10 +3254,12 @@ function stopWhisperTalk(): void { :global(html[data-theme="dark"] .join-page .join-description), :global(html[data-theme="dark"] .join-page .promise-item small), :global(html[data-theme="dark"] .join-page .card-lead), -:global(html[data-theme="dark"] .join-page .visitor-count), :global(html[data-theme="dark"] .join-page .field-hint), :global(html[data-theme="dark"] .join-page .join-meta), :global(html[data-theme="dark"] .join-page .join-footer) { color: var(--text-muted); } +:global(html[data-theme="dark"] .join-page .visitor-count) { color: #b7fff0; border-color: rgba(105, 210, 199, .42); background: linear-gradient(110deg, #173b36, #1c2d2a); box-shadow: 0 10px 28px rgba(0, 0, 0, .24), inset 0 0 0 1px rgba(105, 210, 199, .08); } +:global(html[data-theme="dark"] .join-page .visitor-count::before) { background: linear-gradient(105deg, transparent, rgba(125, 255, 174, .18), transparent); } +:global(html[data-theme="dark"] .join-page .visitor-count-orbit) { border-color: rgba(105, 210, 199, .34); } :global(html[data-theme="dark"] .join-page .join-copy h1), :global(html[data-theme="dark"] .join-page .join-card h2), :global(html[data-theme="dark"] .join-page .promise-item b),