From d2caaa8f3cfe46d8ecb892f8a215ee7a6159c5ec Mon Sep 17 00:00:00 2001 From: illusia <64828020+EchoSixHIYA@users.noreply.github.com> Date: Thu, 1 Oct 2026 18:45:56 +0800 Subject: [PATCH] refactor: extract settings dialogs and guard pending feedback --- CLAUDE.md | 2 + docs/CODE_REFACTOR_PLAN.zh-CN.md | 40 +++-- package.json | 2 +- .../web-client/AudioSettingsDialog.vue | 97 ++++++++++++ .../web-client/ChannelPasswordDialog.vue | 29 ++++ .../web-client/ServerPasswordDialog.vue | 29 ++++ web/src/composables/useDialogFocus.ts | 32 ++++ .../composables/useWebClientAudioControls.ts | 32 ++-- web/src/composables/useWebClientConnection.ts | 10 +- web/src/styles/web-client.css | 148 +++++++++--------- web/src/views/WebClient.vue | 90 ++++------- web/test/audio-controls.test.mjs | 82 ++++++++++ web/test/connection-dialogs.test.mjs | 59 +++++++ 13 files changed, 497 insertions(+), 155 deletions(-) create mode 100644 web/src/components/web-client/AudioSettingsDialog.vue create mode 100644 web/src/components/web-client/ChannelPasswordDialog.vue create mode 100644 web/src/components/web-client/ServerPasswordDialog.vue create mode 100644 web/src/composables/useDialogFocus.ts create mode 100644 web/test/audio-controls.test.mjs create mode 100644 web/test/connection-dialogs.test.mjs diff --git a/CLAUDE.md b/CLAUDE.md index f8eee7d..95af442 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -185,6 +185,8 @@ The public join form uses explicit named field models and emits page actions. Th The member panel and actions menu also share one page-owned member controller. The panel exposes an audio-dock slot; menu placement uses measured viewport bounds, converts through the page CSS zoom, and releases its resize observer/listener on unmount. Only desktop may open the move submenu on hover: mobile bottom-anchored menus change position when expanded and must open on click to avoid moving a member accidentally. Constrain short-window menus and allow scrolling. +Audio settings and password dialogs retain one page-owned media/connection state. Dialog focus supports initial focus, Tab cycling, Escape and return to the opener, with a connect-button fallback after pending connections disable that opener. Settings error feedback belongs to the current opening and latest request; closing synchronously stops recording tests, and scope disposal retires pending feedback and stops tests too. A non-password channel error must release the password dialog's pending state and preserve its draft for retry; reject duplicate submissions while pending. + Admin presentation components receive stable feature controllers; do not instantiate duplicate controllers in children. The welcome-language model remains page-owned and the skin file input belongs to its presentation component. Feature CSS crosses these boundaries with `:deep`, while shell and language-control selectors retain their existing scope. On narrow screens the brand and logout occupy the first row and all four navigation links share a separate row with at least 44 px high targets. Keep each repair batch tied to its current plan item. Combine related fixes before running the full verification command; use focused checks during diagnosis and repeat the full suite only when subsequent changes or failures warrant it. diff --git a/docs/CODE_REFACTOR_PLAN.zh-CN.md b/docs/CODE_REFACTOR_PLAN.zh-CN.md index 494fb84..c614d66 100644 --- a/docs/CODE_REFACTOR_PLAN.zh-CN.md +++ b/docs/CODE_REFACTOR_PLAN.zh-CN.md @@ -1,18 +1,18 @@ # WebSpeak 代码待修改清单与修改方向 -本文聚焦 `webspeak-webclient`,记录当前代码结构、待修改项、大致修改方向与验收条件。本批提取频道成员面板与成员菜单,修复移动端悬停导致误调度、短窗口菜单越界的问题;最终统一验证通过 390 项测试及前后端构建。待办分为结构整理、已有改动验收和真实环境验证;缺少验证证据的事项不直接认定为代码故障。 +本文聚焦 `webspeak-webclient`,记录当前代码结构、待修改项、大致修改方向与验收条件。本批提取音频设置、频道密码和服务器密码弹窗,修复设置异步错误串入新操作、频道密码提交遇普通错误后持续等待的问题;最终统一验证通过 398 项测试及前后端构建。待办分为结构整理、已有改动验收和真实环境验证;缺少验证证据的事项不直接认定为代码故障。 -按用户要求,每批仅处理当前节点相关问题,合并相关修复后统一验证,不扩展到无关模块。管理页主要交互与布局已检查,原生确认框阻塞的操作验收单独保留。加入、聊天、频道成员和成员菜单已拆分;后续处理音频设置及密码弹窗,样式格式整理单独进行。真实消息兼容、TeamSpeak 媒体、Android 真机及发布复现独立跟踪,可提前安排。媒体、连接、命令、诊断、消息、身份及公共皮肤状态已有独立模块,继续复用。当前待办和实施方向放在前部,历史修复及验证记录保留在后部。 +按用户要求,每批仅处理当前节点相关问题,合并相关修复后统一验证,不扩展到无关模块。管理页主要交互与布局已检查,原生确认框阻塞的操作验收单独保留。加入、聊天、频道成员、成员菜单、音频设置及密码弹窗已拆分;后续处理音频工具栏与剩余语音活动、屏幕共享展示,样式格式整理单独进行。真实消息兼容、TeamSpeak 媒体、Android 真机及发布复现独立跟踪,可提前安排。媒体、连接、命令、诊断、消息、身份及公共皮肤状态已有独立模块,继续复用。当前待办和实施方向放在前部,历史修复及验证记录保留在后部。 ## 范围与依据 - 记录日期:2026 年 10 月 1 日。 -- 当前记录基线:`dev` 分支,`1f5e7cc6ff810c14dd453d27ea6057932d98cf58`;应用版本 `0.2.5-preview`。以下现状包含当前工作区,不能全部归为该提交的内容。 -- 本批仅处理 06-C 的频道成员面板、成员菜单、定位及所属样式。成员业务状态仍由父页单一控制器拥有;协议、媒体、数据库和依赖未变。 -- 两个展示组件合并验证通过 385 项测试及前后端构建。浏览器随后复现菜单问题;相关定位和交互修复集中完成后,新增 5 项定位回归测试,最终 `npm run verify` 通过 390 项测试、后端编译及前端类型检查和生产构建。 +- 当前记录基线:`dev` 分支,`b1e5be2f540ca4c19478092baa027f666b7cbedf`;应用版本 `0.2.5-preview`。以下现状包含当前工作区,不能全部归为该提交的内容。 +- 本批仅处理 06-C 的音频设置、两个密码弹窗、焦点及相关错误反馈。业务状态和媒体资源仍由父页及现有控制模块拥有;协议、媒体实现、数据库和依赖未变。 +- 新增 5 项设置异步错误与清理测试、3 项频道密码等待与重试测试;前 5 项已在旧实现上复现失败。相关修复合并后,最终 `npm run verify` 通过 398 项测试、后端编译及前端类型检查和生产构建。 - 既有皮肤修复记录记载新增 23 项测试,以及 `npm run verify` 通过 385 项测试和前后端构建;其中 5 项先复现旧结果覆盖及失效归属问题。这些是此前批次的验证结果,不是本轮重新执行的结果。 -- 本批浏览器使用实际前端及 HTTP/WebSocket 桥接、模拟 TeamSpeak 客户端,覆盖搜索、频道切换、成员调度、私聊、私语目标、音量和桌面指针拖动;五语、三皮肤、三种窗口尺寸共 45 组边界检查通过。模拟服务结果不能证明生产权限、真实 TeamSpeak 或触屏兼容。此前表单/聊天及管理页的检查保留在各自记录。 -- 上批 `1f5e7cc` 的 CI 与 Docker 健康检查已确认成功(运行 36846402608);本批成员改动需使用自己的提交核对远端结果。 +- 本批浏览器使用实际前端及 HTTP/WebSocket 桥接、模拟 TeamSpeak 客户端,覆盖设置持久化、权限拒绝反馈、焦点循环、Esc、密码错误、等待、取消和普通错误后重试。三个弹窗共 45 组抽样布局检查通过,具体语言与皮肤配对见本批记录;模拟结果不能证明真实设备或 TeamSpeak 媒体可用。 +- 上批 `b1e5be2` 的 CI 与 Docker 健康检查已确认成功(运行 36848422682);本批弹窗改动需使用自己的提交核对远端结果。 - 下文“代码可确认”指控制流或配置可直接支持的判断;具体故障发生条件仍需回归用例验证。“待验收”表示证据尚缺,不等于已发生故障。P1/P2/P3 表示建议实施顺序,不代表安全漏洞等级。 - 后文身份、消息、媒体、皮肤等“实施记录”属于此前批次;其中“本批”指各记录对应的历史批次。当前待办以本页前部状态表为准。 @@ -31,7 +31,7 @@ | 浏览器连接与命令 | `web/src/voice/connection.ts`、`commands.ts` | 连接模块 132 行,拥有请求取消、期限、socket 与代次;命令模块 59 行,拥有确认等待及统一收尾 | | 浏览器诊断 | `web/src/voice/audio-diagnostics.ts`、`web/src/composables/useWebClientPerformance.ts` | 采样模块 168 行,拥有等待、来源范围与兼容计数;面板 composable 管理轮询和可比样本的展示 | | 会话消息状态 | `web/src/voice/session-state.ts` | 172 行;拥有成员与频道、聊天历史、事件、通知、会话范围和私聊身份映射 | -| 页面与业务状态 | `web/src/views/`、`web/src/composables/` | 主页面 917 行,管理页 251 行;聊天 composable 管理按会话和对象隔离的草稿、发送等待及反馈 | +| 页面与业务状态 | `web/src/views/`、`web/src/composables/` | 主页面 895 行,管理页 251 行;聊天 composable 管理按会话和对象隔离的草稿、发送等待及反馈 | | 管理展示组件 | `web/src/components/admin/` | 服务器设置 125 行、运维 39 行、皮肤 48 行;状态仍由父页创建,主要表单与路由交互已验收 | | 身份导入与导出 | `useWebClientIdentity.ts`、`components/web-client/IdentityImportDialog.vue` | 159 行状态模块与 53 行展示组件;异步操作、启动恢复与导出资源独立归属 | | 前端基础服务 | `web/src/services/`、`web/src/i18n/`、`web/src/skins/` | 请求、浏览器存储、身份导入、主题、皮肤及多语言;皮肤运行时的提交受取消和期限保护 | @@ -49,7 +49,7 @@ | 编号 | 优先级 | 待办及依据 | 大致修改方向 | 完成条件 | | --- | --- | --- | --- | --- | -| 06-C 客户端 | P2 | 加入、聊天、频道成员和成员菜单已提取;音频、设置、密码弹窗待提取,触屏拖动及原生输入框流程待验收 | 按区域提取,相关区域合并验收;页面保留连接和状态编排 | 表单、五语、主题、皮肤接口、键盘与窄屏布局保持一致 | +| 06-C 客户端 | P2 | 加入、聊天、频道成员、成员菜单、设置及密码弹窗已提取;音频工具栏与剩余语音活动、屏幕共享展示待整理,触屏拖动及原生输入框流程待验收 | 按区域提取,相关区域合并验收;页面保留连接和状态编排 | 表单、五语、主题、皮肤接口、键盘与窄屏布局保持一致 | | 06-C 管理页 | P2 | 展示拆分与主要交互已完成;移除皮肤时原生确认框使浏览器工具卡住,移除、断开会话及下载的完整浏览器流程仍缺记录 | 保留确认与业务逻辑,工具恢复或人工检查时补验,不为绕过工具问题重写功能 | 移除、断开与下载的实际结果有记录;状态及接口测试不能替代完整浏览器链路 | | 03 | P2 | 共享契约已落地,真实收发与旧客户端兼容仍缺验收证据 | 用脱敏的实际消息样本核对字段、默认值、非法输入及兼容范围 | 两端解析一致;非法消息受控处理,不误丢有效事件 | | 02-C | P2 | 本机与边界替身测试不能证明真实媒体链路 | 建立真实 TeamSpeak 双向语音、WebRTC 回退、伴奏和多用户验收步骤 | 记录版本、浏览器、网络、设备、步骤及实际结果 | @@ -80,7 +80,7 @@ ### 06-C 页面组件 -当前依据:[WebClient.vue](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/WebClient.vue:1) 有 917 行,加入表单、聊天面板、频道成员、成员菜单与身份导入已独立;父页仍承载语音活动、音频控制和多个弹窗。[AdminView.vue](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/AdminView.vue:41) 已由 400 行减至 251 行,三个管理模板迁移到独立组件。管理页剩余浏览器验收缺口见前表,客户端继续明确展示边界;不以文件长度推定运行故障。 +当前依据:[WebClient.vue](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/WebClient.vue:1) 有 895 行,加入表单、聊天面板、频道成员、成员菜单、身份导入、音频设置及密码弹窗已独立;父页仍承载语音活动、音频工具栏和屏幕共享展示。[AdminView.vue](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/AdminView.vue:41) 已由 400 行减至 251 行,三个管理模板迁移到独立组件。管理页剩余浏览器验收缺口见前表,客户端继续明确展示边界;不以文件长度推定运行故障。 以下名称为建议,实施时按实际接口确定。按稳定区域迁移,相关展示区域合并后统一验收,避免同时重写模板和业务状态。 @@ -89,12 +89,13 @@ | 加入页,已提取 | `JoinForm` 展示目标、昵称、频道、身份选项与连接状态 | 连接与历史仍由现有 composable 管理;表单用明确字段模型,提交、取消和导入用事件 | 固定与开放模式、收藏与历史、连接等待及取消、密码交互 | | 频道与成员,已提取 | `ChannelMemberPanel` 与 `MemberActionsMenu` 展示层级、成员状态和操作入口 | 复用父页单一 `useWebClientMembers`;面板保留音频工具栏插槽,菜单拥有定位观察器;动作仍交回现有控制层 | 搜索、频道切换、桌面指针拖动、调度及菜单边界已检查;真实触屏拖动及原生输入框仍待验收 | | 聊天,已提取 | `ChatPanel` 展示标签、历史、草稿和发送反馈 | 草稿与待确认状态继续由单一 `useWebClientChat` 实例管理;保留外部打开私聊的入口 | 切标签保留草稿、发送失败与重试、目标离线、滚动和移动端切页 | -| 音频与弹窗 | 身份导入已提取;继续拆音频工具栏、设置面板及密码弹窗 | 媒体仍由语音控制模块拥有;设置关闭触发现有清理;身份状态复用已完成的 06-H | 静音、音量、设备切换、试听、焦点、Esc 关闭及资源释放 | +| 设置与密码弹窗,已提取 | `AudioSettingsDialog`、`ChannelPasswordDialog`、`ServerPasswordDialog` 展示设置及连接反馈;身份导入此前已提取 | 复用父页单一媒体与连接状态;设置错误受打开代次和请求顺序保护;共享焦点工具管理循环、Esc 和返回 | 焦点、Esc、设置持久化、密码等待与重试已检查;真实设备切换与录音待媒体验收 | +| 音频及共享展示 | 继续拆音频工具栏、剩余语音活动与屏幕共享展示 | 媒体仍由语音控制模块拥有,页面保留连接编排 | 静音、音量、私语按键、活动展示及共享操作接线 | | 管理功能页,已提交 | `AdminServerSettings`、`AdminOperations`、`AdminSkins` 已提取,先验收这三个边界 | 父页创建三个管理 composable,通过稳定 `model` 对象传入;登录、CSRF、路由与总览仍在页面;欢迎词语言用具名模型传递,WebRTC 提示用事件返回 | 保存期间继续编辑、请求失败保留草稿、欢迎词语言、退出失败、路由切换、皮肤文件选择及操作互斥 | 接口只传该区域需要的状态和动作,避免把整页上下文塞进一个对象,也避免父子各自实例化同一个业务 composable。管理组件当前使用 `ReturnType` 描述功能控制器,并在 setup 中解构,因此依赖父页维持同一控制器实例;若后续支持替换实例,需要同步调整读取方式。可以用 `Pick` 或专用接口缩小暴露范围,但不为形式重写已明确的状态归属。展示辅助函数如头像、时间格式在确有多处复用时集中,不额外引入全局状态层。 -样式需要随组件边界一并核对。[客户端样式入口](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/WebClient.vue:917)和[管理页样式入口](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/AdminView.vue:251)均使用 `scoped`,当前 CSS 分别为 1,303 与 451 行。身份弹窗已有针对组件的 `:deep` 规则;管理页当前改动将大量功能区选择器改为 `:deep`,并保留部分外壳和语言控件选择器的原作用范围。不要把这项源码变化直接等同于视觉一致:需对比子组件内部、共享按钮与语言菜单的字体、间距、尺寸、折行,以及样式声明顺序和优先级。必要时改为组件自有样式或更窄的区域选择器,保留明暗主题、`data-ws-part` 和路由隔离,管理页保持独立于公开皮肤。 +样式需要随组件边界一并核对。[客户端样式入口](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/WebClient.vue:895)和[管理页样式入口](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/views/AdminView.vue:251)均使用 `scoped`,当前 CSS 分别为 1,303 与 451 行。身份弹窗已有针对组件的 `:deep` 规则;管理页当前改动将大量功能区选择器改为 `:deep`,并保留部分外壳和语言控件选择器的原作用范围。不要把这项源码变化直接等同于视觉一致:需对比子组件内部、共享按钮与语言菜单的字体、间距、尺寸、折行,以及样式声明顺序和优先级。必要时改为组件自有样式或更窄的区域选择器,保留明暗主题、`data-ws-part` 和路由隔离,管理页保持独立于公开皮肤。 测试也需跟随边界调整:[皮肤节点检查](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/src/services/skin-pack.test.ts:80)在当前工作区已递归读取 `components/web-client` 和 `components/admin` 下的 Vue 文件,保留公开节点契约及管理页隔离检查。[管理页状态测试](/Desktop/othercode/teamspeakclient4web/webspeak-webclient/web/test/admin-view.test.mjs:79)已改为读取父页功能模型,仍用 `render: () => null` 替换模板,不能单独证明子组件的字段与事件接线正确。后续验收必须覆盖真实渲染的表单、按钮和路由交互;这属于测试覆盖边界,不能推定测试已发现业务故障。 @@ -102,7 +103,17 @@ 每个区域验收包括桌面与窄屏、五语长文案、明暗主题和自定义皮肤;对比布局、滚动、弹层遮挡及键盘操作。编译通过和源码正则匹配不能替代实际渲染检查。 -### 频道成员与菜单的本批结果 +### 音频设置与密码弹窗的本批结果 + +- 三个展示组件复用父页现有状态,设置仅接收所需语音引用与控制动作,两个密码弹窗使用字段模型及提交/取消事件。共享焦点工具处理初始焦点、Tab 循环、Esc 和关闭后返回;服务器连接等待会使原按钮失焦,因此增加返回连接按钮的回退。 +- 设置准备、设备选择和录音测试的错误只允许当前打开代次及最新请求发布;关闭同步停止录音测试,作用域释放也停止并使迟到反馈失效。5 项测试先在旧实现全部失败,再验证修复;没有改写底层媒体事务。 +- 频道密码提交遇普通错误原先可能持续禁用输入。现在显示本次错误、解除等待、保留密码供重试,并阻止等待期间重复提交。3 项测试覆盖重复提交、普通错误重试和成功关闭。 +- 设置提取前后对比 88 个可见元素,发现权限拒绝颜色未跨组件边界生效并修正;最终拒绝颜色与基线一致。通知音量、VOX 阈值关闭再打开仍保留;权限拒绝提示、Tab 首尾循环、Esc 及返回焦点通过。当前浏览器无麦克风授权,不能将这些检查当作真实录音或设备切换验收。 +- 两个密码流程检查必填提示、错误密码、正确密码及取消。频道提交受控等待期间输入与按钮禁用;普通权限错误后恢复输入,撤除模拟故障后不重填密码即可成功重试。频道取消恢复原选择,服务器取消返回连接按钮。 +- 三个弹窗分别检查 zh/浅色、en/深色、de/ILLUSIA、ru/浅色、ja/深色五组配对,每组使用 1280×720、390×844、320×568,合计 45 组边界检查通过。这是抽样配对,不是五语言与三皮肤的完整交叉组合。最终浏览器错误与警告记录为空。 +- 最终统一 `npm run verify`:398 项测试全部通过,后端编译、前端类型检查和生产构建通过。真实媒体、触屏及原生输入框等缺口仍按原节点跟踪。 + +### 此前频道成员与菜单的结果 - `ChannelMemberPanel.vue` 接收频道投影、明确字段模型及成员控制器的展示子集;音频工具栏通过插槽保留在父页。`MemberActionsMenu.vue` 共用同一控制器,私聊和音量通过事件交回父页,不复制成员状态。 - 组件提取前后 90 个成员面板可见元素的尺寸、字体、间距及颜色一致。按成员名/频道名搜索、空结果、键盘清空搜索、嵌套频道切换、菜单调度、私语目标增删、私聊入口、成员音量回传和桌面指针拖动已检查。模拟客户端按实际移动事件广播目录变化。 @@ -171,6 +182,7 @@ Android 记录具体设备和系统,验收连接、双向语音、输入输出 | 原事项或范围 | 当前状态 | | --- | --- | +| 06-C 设置与密码弹窗 | 三个展示组件已提取;修复迟到设置错误及频道密码普通错误后卡等待,新增 8 项回归;398 项测试与 45 组抽样布局检查通过,真实媒体验收另行保留 | | 06-K 管理页导航 | 窄屏改为品牌与退出、四项导航两行布局;五语四路由四宽度共 80 组边界检查通过 | | 06-C 频道成员与菜单 | 两个展示组件已提取;修复移动端误调度及短窗口菜单越界,390 项测试与 45 组边界检查通过;触屏及原生输入框验收仍保留 | | 06-C 加入与聊天 | 两个展示组件已提取;修复开放表单长文案撑宽,表单与聊天共 90 组语言/皮肤/宽度边界检查通过 | @@ -183,7 +195,7 @@ Android 记录具体设备和系统,验收连接、双向语音、输入输出 | 04-E 至 04-J 浏览器媒体、连接与诊断 | 伴奏切换及取消、电平监测、命令等待、凭证取消和诊断来源隔离已有实现;此前验证结果保留于对应章节 | | 05-A 服务端会话音频 | `SessionAudioTransport` 已接入 PCM、WebRTC 和 TeamSpeak 下行,统一路由、背压与统计 | | 05-B、05-C WebRTC 关闭 | 已逐项容错释放资源,重复关闭共享完成 Promise,包括失败结果 | -| 02-B 测试入口遗漏 | WebRTC、诊断、身份、皮肤和存储回归均进入统一命令;当前 38 个列出的测试文件均存在 | +| 02-B 测试入口遗漏 | WebRTC、诊断、身份、皮肤和存储回归均进入统一命令;当前 41 个列出的测试文件均存在 | | 05-D SDK 事件与目录 | `SessionEventCoordinator` 已提取;旧 SDK 来源、关闭等待、重连等待及踢出到达顺序已有实现和回归记录 | | 成员头像 | 下载控制器与 SDK 异步阶段均绑定连接代次;批次、缓存、监听及迟到结果有生命周期限制 | | 前端基础整理 | 共享消息契约、管理请求与三个状态模块、五语管理文案、头部组件及路由延迟加载已实现 | diff --git a/package.json b/package.json index 188ae43..3791504 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "dev": "tsx src/index.ts", "build": "tsc", - "test": "node --import tsx --test src/admin/skin-registry.test.ts web/test/admin-api.integration.test.ts web/test/admin-view.test.mjs web/src/services/admin-api.test.ts src/security/open-target-policy.test.ts src/server/visitor-count.test.ts src/server/voice-protocol.test.ts src/server/teamspeak-resolver.test.ts src/server/ts-client.test.ts src/server/join-ticket.test.ts src/server/identity-lease.test.ts src/server/session-manager.test.ts src/server/directory-sync.test.ts src/server/session-events.test.ts src/server/reconnect-policy.test.ts src/server/voice-commands.test.ts src/server/voice-bridge.test.ts src/server/session-audio.test.ts src/server/voice-bridge.integration.test.ts src/server/webrtc-audio.test.ts src/server/audio-stats.test.ts src/server/directory-view.test.ts src/server/member-avatars.test.ts src/server/screen-share-coordinator.test.ts src/shared/client-commands.test.ts src/shared/server-messages.test.ts src/shared/webrtc.test.ts scripts/docker-healthcheck.test.mjs web/test/voice-session.test.mjs web/test/voice-performance.test.mjs web/test/screen-share.test.ts web/test/android-gateway.test.ts web/src/services/skin-catalog.test.ts web/src/services/member-menu-placement.test.ts web/src/services/skin-pack.test.ts web/src/services/identity-import.test.ts web/test/identity-dialog.test.mjs web/test/skin-lifecycle.test.mjs web/src/services/local-persistence.test.ts", + "test": "node --import tsx --test src/admin/skin-registry.test.ts web/test/admin-api.integration.test.ts web/test/admin-view.test.mjs web/src/services/admin-api.test.ts src/security/open-target-policy.test.ts src/server/visitor-count.test.ts src/server/voice-protocol.test.ts src/server/teamspeak-resolver.test.ts src/server/ts-client.test.ts src/server/join-ticket.test.ts src/server/identity-lease.test.ts src/server/session-manager.test.ts src/server/directory-sync.test.ts src/server/session-events.test.ts src/server/reconnect-policy.test.ts src/server/voice-commands.test.ts src/server/voice-bridge.test.ts src/server/session-audio.test.ts src/server/voice-bridge.integration.test.ts src/server/webrtc-audio.test.ts src/server/audio-stats.test.ts src/server/directory-view.test.ts src/server/member-avatars.test.ts src/server/screen-share-coordinator.test.ts src/shared/client-commands.test.ts src/shared/server-messages.test.ts src/shared/webrtc.test.ts scripts/docker-healthcheck.test.mjs web/test/voice-session.test.mjs web/test/audio-controls.test.mjs web/test/connection-dialogs.test.mjs web/test/voice-performance.test.mjs web/test/screen-share.test.ts web/test/android-gateway.test.ts web/src/services/skin-catalog.test.ts web/src/services/member-menu-placement.test.ts web/src/services/skin-pack.test.ts web/src/services/identity-import.test.ts web/test/identity-dialog.test.mjs web/test/skin-lifecycle.test.mjs web/src/services/local-persistence.test.ts", "verify": "npm test && npm run build && npm run web:build", "start": "node dist/index.js", "web:dev": "cd web && npx vite --host", diff --git a/web/src/components/web-client/AudioSettingsDialog.vue b/web/src/components/web-client/AudioSettingsDialog.vue new file mode 100644 index 0000000..5c526e0 --- /dev/null +++ b/web/src/components/web-client/AudioSettingsDialog.vue @@ -0,0 +1,97 @@ + + + diff --git a/web/src/components/web-client/ChannelPasswordDialog.vue b/web/src/components/web-client/ChannelPasswordDialog.vue new file mode 100644 index 0000000..40b4294 --- /dev/null +++ b/web/src/components/web-client/ChannelPasswordDialog.vue @@ -0,0 +1,29 @@ + + + diff --git a/web/src/components/web-client/ServerPasswordDialog.vue b/web/src/components/web-client/ServerPasswordDialog.vue new file mode 100644 index 0000000..d452b41 --- /dev/null +++ b/web/src/components/web-client/ServerPasswordDialog.vue @@ -0,0 +1,29 @@ + + + diff --git a/web/src/composables/useDialogFocus.ts b/web/src/composables/useDialogFocus.ts new file mode 100644 index 0000000..d9637bd --- /dev/null +++ b/web/src/composables/useDialogFocus.ts @@ -0,0 +1,32 @@ +import { onMounted, onUnmounted, type Ref } from "vue"; + +export function useDialogFocus(dialog: Ref, close: () => void, fallbackFocus?: () => HTMLElement | null) { + let previousFocus: HTMLElement | null = null; + onMounted(() => { + previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null; + const autofocus = dialog.value?.querySelector("[autofocus]:not(:disabled)"); + (autofocus ?? dialog.value)?.focus(); + }); + onUnmounted(() => { + const target = previousFocus?.isConnected && previousFocus !== document.body ? previousFocus : fallbackFocus?.(); + target?.focus(); + }); + + function onDialogKeydown(event: KeyboardEvent): void { + if (event.key === "Escape") { + event.preventDefault(); + event.stopPropagation(); + close(); + } else if (event.key === "Tab" && dialog.value) { + const controls = Array.from(dialog.value.querySelectorAll( + 'button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), a[href], audio[controls], [tabindex="0"]', + )).filter(element => element.getClientRects().length && getComputedStyle(element).visibility !== "hidden"); + const current = controls.indexOf(document.activeElement as HTMLElement); + if (!controls.length || current < 0 || (event.shiftKey ? current === 0 : current === controls.length - 1)) { + event.preventDefault(); + (event.shiftKey ? controls.at(-1) : controls[0])?.focus(); + } + } + } + return { onDialogKeydown }; +} diff --git a/web/src/composables/useWebClientAudioControls.ts b/web/src/composables/useWebClientAudioControls.ts index 731eb51..c87452f 100644 --- a/web/src/composables/useWebClientAudioControls.ts +++ b/web/src/composables/useWebClientAudioControls.ts @@ -1,4 +1,4 @@ -import { computed, ref, watch, type Ref } from "vue"; +import { computed, onScopeDispose, ref, watch, type Ref } from "vue"; interface UseWebClientAudioControlsOptions { settingsOpen: Ref; @@ -62,6 +62,15 @@ export function useWebClientAudioControls({ const settingsError = ref(""); const whisperPttActive = ref(false); const micMeterBars = computed(() => Math.round(micLevel.value * 24)); + let settingsGeneration = 0; + let settingsRequest = 0; + + function beginSettingsRequest(): () => boolean { + settingsError.value = ""; + const generation = settingsGeneration; + const request = ++settingsRequest; + return () => settingsOpen.value && generation === settingsGeneration && request === settingsRequest; + } function microphoneErrorMessage(error: unknown, fallback = "请检查浏览器权限"): string { const name = error instanceof DOMException ? error.name : ""; @@ -96,30 +105,30 @@ export function useWebClientAudioControls({ } async function onInputDeviceChange(event: Event): Promise { - settingsError.value = ""; + const isCurrent = beginSettingsRequest(); try { await setInputDevice((event.target as HTMLSelectElement).value); } catch (error: unknown) { - settingsError.value = microphoneErrorMessage(error, "无法切换麦克风"); + if (isCurrent()) settingsError.value = microphoneErrorMessage(error, "无法切换麦克风"); } } async function onOutputDeviceChange(event: Event): Promise { - settingsError.value = ""; + const isCurrent = beginSettingsRequest(); try { await setOutputDevice((event.target as HTMLSelectElement).value); } catch (error: unknown) { - settingsError.value = localizedMessage(error instanceof Error ? error.message : "无法切换扬声器"); + if (isCurrent()) settingsError.value = localizedMessage(error instanceof Error ? error.message : "无法切换扬声器"); } } async function toggleMicTest(): Promise { - settingsError.value = ""; + const isCurrent = beginSettingsRequest(); try { if (microphoneTestActive.value) stopMicrophoneTest(); else await startMicrophoneTest(); } catch (error: unknown) { - settingsError.value = microphoneErrorMessage(error); + if (isCurrent()) settingsError.value = microphoneErrorMessage(error); } } @@ -178,14 +187,19 @@ export function useWebClientAudioControls({ } watch(settingsOpen, (open) => { + settingsGeneration++; if (open) { - settingsError.value = ""; + const isCurrent = beginSettingsRequest(); prepareInputDevices().catch((error: unknown) => { - settingsError.value = microphoneErrorMessage(error); + if (isCurrent()) settingsError.value = microphoneErrorMessage(error); }); } else { stopMicrophoneTest(); } + }, { flush: "sync" }); + onScopeDispose(() => { + settingsGeneration++; + stopMicrophoneTest(); }); return { diff --git a/web/src/composables/useWebClientConnection.ts b/web/src/composables/useWebClientConnection.ts index b028b1a..af89edd 100644 --- a/web/src/composables/useWebClientConnection.ts +++ b/web/src/composables/useWebClientConnection.ts @@ -22,6 +22,7 @@ interface UseWebClientConnectionOptions { accessMode: Readonly>; isConnecting: Readonly>; errorCode: Readonly>; + errorMessage: Readonly>; channelSwitchedChannelId: Readonly>; nickname: Ref; channelName: Ref; @@ -52,6 +53,7 @@ export function useWebClientConnection({ accessMode, isConnecting, errorCode, + errorMessage, channelSwitchedChannelId, nickname, channelName, @@ -140,7 +142,7 @@ export function useWebClientConnection({ } function submitChannelPassword(): void { - if (!channelPasswordDialog.open || !channelPasswordDialog.channelId || !channelPasswordDialog.password) return; + if (!channelPasswordDialog.open || channelPasswordDialog.submitting || !channelPasswordDialog.channelId || !channelPasswordDialog.password) return; channelPasswordDialog.error = ""; channelPasswordDialog.submitting = true; switchChannel(channelPasswordDialog.channelId, channelPasswordDialog.password); @@ -163,6 +165,12 @@ export function useWebClientConnection({ } watch(errorCode, (code) => { + if (code && code !== "CHANNEL_PASSWORD_REQUIRED" && channelPasswordDialog.open && channelPasswordDialog.submitting) { + channelPasswordDialog.error = errorMessage.value; + channelPasswordDialog.submitting = false; + clearError(); + return; + } if (code !== "CHANNEL_PASSWORD_REQUIRED" || !selectedChannelId.value) return; channelPasswordDialog.open = true; channelPasswordDialog.channelId = selectedChannelId.value; diff --git a/web/src/styles/web-client.css b/web/src/styles/web-client.css index 84a0543..b8d89da 100644 --- a/web/src/styles/web-client.css +++ b/web/src/styles/web-client.css @@ -57,13 +57,13 @@ .visitor-count-total { position: relative; z-index: 1; min-width: 0; overflow: hidden; color: inherit; font-size: .92em; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; opacity: .78; } .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, :deep(.section-kicker) { color: #79918c; font-size: 10px; font-weight: 700; letter-spacing: .16em; } +:deep(.card-kicker), :deep(.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; } :deep(.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; } -.error-notice { color: #a53c38; background: #fff0ef; border: 1px solid #f7d4d1; } +:deep(.error-notice) { color: #a53c38; background: #fff0ef; border: 1px solid #f7d4d1; } :deep(.warning-notice) { color: #8a6537; background: #fff8e9; border: 1px solid #f2dfb3; } :deep(.notice-symbol) { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: currentColor; color: #fff; font-size: 10px; font-weight: 800; } :deep(.error-notice .notice-symbol) { background: #d95d55; } @@ -73,7 +73,7 @@ :deep(.field-grid .field-label) { display: block; } :deep(.field-grid .field-label:not(:first-child)) { margin-top: 0; } .field-hint { margin: 1px 0 5px; color: #879590; font-size: 10px; line-height: 1.5; } -:deep(.field-label), .settings-label { color: #43514d; font-size: 11px; font-weight: 600; } +:deep(.field-label), :deep(.settings-label) { color: #43514d; font-size: 11px; font-weight: 600; } :deep(.field-label:not(:first-child)) { margin-top: 6px; } :deep(.field-label span) { color: #a2aaa7; font-weight: 400; } :deep(.field-wrap) { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; color: #8b9b96; border-radius: 10px; background: #f3f6f5; transition: .2s ease; } @@ -104,7 +104,7 @@ .sidebar-server { display: flex; align-items: center; gap: 10px; min-height: 73px; padding: 15px 15px 12px; border-bottom: 1px solid #e6ecea; } .server-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; color: #006a64; background: #d8f0ed; border-radius: 10px; } .server-heading { min-width: 0; flex: 1; }.server-heading strong, .server-heading span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.server-heading strong { color: #24312f; font-size: 12px; }.server-heading span { margin-top: 4px; color: #84918d; font-size: 10px; }.server-heading i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #65d879; } -.round-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; color: #71817c; background: transparent; border-radius: 8px; cursor: pointer; transition: .18s; }.round-icon:hover { color: #006a64; background: #e4efec; } +:deep(.round-icon) { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; color: #71817c; background: transparent; border-radius: 8px; cursor: pointer; transition: .18s; }:deep(.round-icon:hover) { color: #006a64; background: #e4efec; } .sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 18px 17px 14px; }.profile-avatar, .dock-avatar { display: grid; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 11px; font-weight: 700; }.profile-avatar { width: 38px; height: 38px; font-size: 12px; }.profile-copy { min-width: 0; flex: 1; }.profile-copy strong, .profile-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.profile-copy strong { color: #263530; font-size: 12px; }.profile-copy span { margin-top: 4px; color: #7d8e88; font-size: 10px; }.profile-settings { display: grid; place-items: center; color: #7d8e88; background: transparent; cursor: pointer; }.profile-settings:hover { color: #006a64; } .channel-search, :deep(.member-search) { display: flex; align-items: center; gap: 8px; color: #85928e; background: #eef3f1; border-radius: 8px; }.channel-search { margin: 0 14px 18px; padding: 0 10px; min-height: 34px; }.channel-search input, :deep(.member-search input) { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: #40504b; font-size: 11px; }.channel-search input::placeholder, :deep(.member-search input::placeholder) { color: #9ba6a3; }.channel-search kbd { padding: 2px 5px; color: #9aa7a3; background: #fff; border: 1px solid #dbe4e0; border-radius: 4px; font-size: 9px; } .sidebar-scroll { flex: 1; overflow-y: auto; padding-bottom: 14px; }.channel-section-title { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 8px; color: #82908c; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }.channel-section-title button { display: grid; place-items: center; padding: 2px; color: #87958f; background: transparent; cursor: pointer; }.channel-section-title button:hover { color: #006a64; } @@ -117,26 +117,26 @@ .chat-panel { margin-top: 34px; padding: 0 clamp(14px, 1.8vw, 24px) 20px; border-top: 1px solid #eef2f0; }:deep(.chat-heading) { padding-top: 25px; }:deep(.chat-heading h2 .ui-icon) { color: #006a64; }:deep(.message-list) { display: flex; flex-direction: column; gap: 18px; min-height: 170px; max-height: 360px; overflow-y: auto; padding: 22px 8px 10px 3px; }:deep(.chat-empty) { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 145px; color: #9aa6a2; text-align: center; }:deep(.chat-empty-icon) { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 11px; color: #6fa8a2; background: #e5f3f1; border-radius: 14px; }:deep(.chat-empty strong) { color: #556761; font-size: 12px; }:deep(.chat-empty span) { margin-top: 5px; font-size: 10px; }:deep(.message-row) { display: flex; align-items: flex-start; gap: 11px; max-width: 78%; }:deep(.message-row.mine) { align-self: flex-end; flex-direction: row-reverse; }:deep(.message-avatar) { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; }:deep(.message-body) { min-width: 0; }:deep(.message-meta) { display: flex; align-items: baseline; gap: 8px; margin: 1px 0 6px; }:deep(.message-row.mine .message-meta) { justify-content: flex-end; }:deep(.message-meta strong) { color: #384843; font-size: 11px; }:deep(.message-meta time) { color: #a1ada9; font-size: 9px; }:deep(.message-bubble) { padding: 10px 13px; color: #43534e; background: #f1f5f3; border-radius: 4px 13px 13px 13px; font-size: 12px; line-height: 1.55; }:deep(.message-row.mine .message-bubble) { color: #fff; background: #006a64; border-radius: 13px 4px 13px 13px; }:deep(.message-composer) { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 6px 8px 6px 12px; background: #f3f6f5; border-radius: 11px; }:deep(.message-composer input) { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: #3a4944; font-size: 12px; }:deep(.message-composer input::placeholder) { color: #9aa6a2; }.composer-tool { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; color: #94a19d; background: transparent; border-radius: 7px; }.composer-tool:not(:disabled) { cursor: pointer; }.composer-tool:disabled { opacity: .6; }:deep(.send-button) { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; color: #fff; background: #006a64; border-radius: 9px; cursor: pointer; }:deep(.send-button:disabled) { cursor: not-allowed; opacity: .35; } .control-dock { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; padding: 10px 29px; border-top: 1px solid #e9efec; background: rgba(255,255,255,.94); box-shadow: 0 -5px 18px rgba(23,52,47,.03); }.dock-user { display: flex; align-items: center; gap: 9px; min-width: 140px; }.dock-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; }.dock-user strong, .dock-user span { display: block; }.dock-user strong { max-width: 125px; overflow: hidden; color: #33423d; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.dock-user span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #7e8d87; font-size: 9px; }.dock-user span i { width: 5px; height: 5px; border-radius: 50%; background: #65d879; }.dock-center { display: flex; align-items: center; gap: 14px; }.mic-mode-switch { display: flex; padding: 3px; background: #eef3f1; border-radius: 8px; }.mic-mode-switch button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: #8b9894; background: transparent; border-radius: 6px; font-size: 10px; cursor: pointer; }.mic-mode-switch button.active { color: #006a64; background: #fff; box-shadow: 0 2px 5px rgba(21,54,48,.08); font-weight: 700; }.ptt-indicator { display: inline-flex; align-items: center; gap: 7px; color: #7c8b86; font-size: 10px; }.ptt-indicator span { width: 7px; height: 7px; border-radius: 50%; background: #b2bfbb; }.ptt-indicator.active { color: #278c3b; }.ptt-indicator.active span { background: #65d879; box-shadow: 0 0 0 4px rgba(101,216,121,.15); }.dock-actions { min-width: 140px; justify-content: flex-end; }.dock-icon { width: 34px; height: 34px; }.dock-end { display: grid; place-items: center; width: 37px; height: 37px; color: #fff; background: #c95a54; border-radius: 10px; cursor: pointer; }.dock-end:hover { background: #b84c47; } -:deep(.member-panel) { min-width: 0; padding: 26px 16px; color: #2c3935; background: #fbfcfc; border-left: 1px solid #eef2f0; }:deep(.member-panel-heading) { display: flex; align-items: flex-start; justify-content: space-between; }:deep(.member-panel-heading h2) { margin: 5px 0 0; color: #25322e; font-size: 19px; letter-spacing: -.04em; }:deep(.member-search) { margin-top: 18px; padding: 0 10px; min-height: 33px; }.member-group { margin-top: 24px; }.member-group-title { display: flex; align-items: center; gap: 8px; color: #85928e; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }.group-line { height: 1px; flex: 1; background: #e6edeb; }:deep(.member-list) { display: flex; flex-direction: column; gap: 17px; margin-top: 17px; }:deep(.member-row) { display: flex; align-items: center; gap: 8px; min-width: 0; }:deep(.member-avatar) { position: relative; display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; }:deep(.member-avatar.speaking) { box-shadow: 0 0 0 2px #90f691, 0 0 10px rgba(144,246,145,.35); }:deep(.member-presence) { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #fbfcfc; border-radius: 50%; background: #65d879; }:deep(.member-copy) { min-width: 0; flex: 1; }:deep(.member-copy strong), :deep(.member-copy span) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }:deep(.member-copy strong) { color: #34423d; font-size: 10px; }:deep(.member-copy span) { margin-top: 4px; color: #96a29e; font-size: 9px; }:deep(.member-volume) { display: flex; align-items: center; gap: 5px; color: #a1afaa; width: 64px; }:deep(.member-volume input) { width: 45px; height: 4px; appearance: none; border-radius: 99px; outline: none; cursor: pointer; }:deep(.member-volume input::-webkit-slider-thumb), .settings-range::-webkit-slider-thumb { width: 14px; height: 14px; appearance: none; border: 2px solid #81d8d0; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.12); cursor: pointer; }:deep(.member-volume input::-moz-range-thumb), .settings-range::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #81d8d0; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.12); cursor: pointer; }:deep(.member-empty) { margin-top: 22px; color: #98a49f; font-size: 10px; text-align: center; }.member-panel-tip { display: flex; gap: 8px; margin-top: 36px; padding: 12px; color: #72827c; background: #eef5f2; border-radius: 9px; font-size: 9px; line-height: 1.5; }.member-panel-tip .ui-icon { color: #5e9e96; } +:deep(.member-panel) { min-width: 0; padding: 26px 16px; color: #2c3935; background: #fbfcfc; border-left: 1px solid #eef2f0; }:deep(.member-panel-heading) { display: flex; align-items: flex-start; justify-content: space-between; }:deep(.member-panel-heading h2) { margin: 5px 0 0; color: #25322e; font-size: 19px; letter-spacing: -.04em; }:deep(.member-search) { margin-top: 18px; padding: 0 10px; min-height: 33px; }.member-group { margin-top: 24px; }.member-group-title { display: flex; align-items: center; gap: 8px; color: #85928e; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }.group-line { height: 1px; flex: 1; background: #e6edeb; }:deep(.member-list) { display: flex; flex-direction: column; gap: 17px; margin-top: 17px; }:deep(.member-row) { display: flex; align-items: center; gap: 8px; min-width: 0; }:deep(.member-avatar) { position: relative; display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; }:deep(.member-avatar.speaking) { box-shadow: 0 0 0 2px #90f691, 0 0 10px rgba(144,246,145,.35); }:deep(.member-presence) { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid #fbfcfc; border-radius: 50%; background: #65d879; }:deep(.member-copy) { min-width: 0; flex: 1; }:deep(.member-copy strong), :deep(.member-copy span) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }:deep(.member-copy strong) { color: #34423d; font-size: 10px; }:deep(.member-copy span) { margin-top: 4px; color: #96a29e; font-size: 9px; }:deep(.member-volume) { display: flex; align-items: center; gap: 5px; color: #a1afaa; width: 64px; }:deep(.member-volume input) { width: 45px; height: 4px; appearance: none; border-radius: 99px; outline: none; cursor: pointer; }:deep(.member-volume input::-webkit-slider-thumb), :deep(.settings-range::-webkit-slider-thumb) { width: 14px; height: 14px; appearance: none; border: 2px solid #81d8d0; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.12); cursor: pointer; }:deep(.member-volume input::-moz-range-thumb), :deep(.settings-range::-moz-range-thumb) { width: 14px; height: 14px; border: 2px solid #81d8d0; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.12); cursor: pointer; }:deep(.member-empty) { margin-top: 22px; color: #98a49f; font-size: 10px; text-align: center; }.member-panel-tip { display: flex; gap: 8px; margin-top: 36px; padding: 12px; color: #72827c; background: #eef5f2; border-radius: 9px; font-size: 9px; line-height: 1.5; }.member-panel-tip .ui-icon { color: #5e9e96; } -.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(25, 33, 31, .42); backdrop-filter: blur(5px); }.settings-modal { display: flex; width: min(920px, 100%); max-height: min(760px, calc(100dvh - 56px)); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.2); }.settings-nav { display: flex; flex-direction: column; width: 215px; flex: 0 0 auto; padding: 28px 12px 20px; background: #f8faf9; border-right: 1px solid #e6ecea; }.settings-title { padding: 0 13px 20px; color: #25322e; font-size: 19px; font-weight: 700; }.settings-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: #65736f; background: transparent; border-left: 3px solid transparent; border-radius: 8px; font-size: 11px; text-align: left; cursor: pointer; }.settings-nav-item.active { color: #006a64; background: #e2efec; border-left-color: #006a64; font-weight: 700; }.settings-version { margin-top: auto; padding: 20px 13px 0; color: #98a5a0; border-top: 1px solid #e4ebe8; font-size: 10px; line-height: 1.7; }.settings-version span { color: #b0bbb7; }.settings-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }.settings-header { display: flex; align-items: center; justify-content: space-between; min-height: 75px; padding: 0 28px; border-bottom: 1px solid #edf1ef; }.settings-header h2 { margin: 0; color: #202c29; font-size: 22px; letter-spacing: -.045em; }.settings-content { flex: 1; overflow-y: auto; padding: 28px 40px; }.settings-section { max-width: 620px; margin: 0 auto; }.settings-section h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 21px; color: #293631; font-size: 16px; }.settings-section h3 .ui-icon { color: #006a64; }.settings-label { display: block; margin-bottom: 8px; color: #5e6d67; font-size: 10px; font-weight: 500; }.select-like { display: flex; align-items: center; justify-content: space-between; min-height: 39px; margin-bottom: 19px; padding: 0 13px; color: #394742; background: #f4f7f6; border-radius: 8px; font-size: 11px; }.select-like .ui-icon { color: #677671; }.settings-range-row { display: flex; align-items: center; justify-content: space-between; }.settings-range-row .settings-label { margin: 0; }.settings-range-row strong { color: #006a64; font-size: 10px; }.settings-range { width: 100%; height: 6px; margin: 11px 0 20px; appearance: none; border-radius: 999px; outline: none; cursor: pointer; }.settings-range::-webkit-slider-thumb { width: 19px; height: 19px; }.settings-range::-moz-range-thumb { width: 19px; height: 19px; }.mic-test { padding: 15px; border: 1px solid #e5ece9; border-radius: 11px; background: #fafcfb; }.mic-test-header { display: flex; align-items: center; justify-content: space-between; }.mic-test-header strong { color: #36453f; font-size: 11px; }.mic-test-header button { padding: 6px 9px; color: #006a64; background: #e0f1ee; border-radius: 5px; font-size: 10px; cursor: pointer; }.meter { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 39px; margin-top: 12px; padding: 0 4px 4px; border-bottom: 1px solid #dce6e2; }.meter i { width: 5px; min-height: 4px; border-radius: 3px 3px 0 0; background: #dfe6e3; }.meter i.active { background: #81ed8b; box-shadow: 0 0 7px rgba(129,237,139,.45); animation: meter 1s ease-in-out infinite alternate; }.meter-labels { display: flex; justify-content: space-between; margin-top: 6px; color: #9ba6a2; font-size: 8px; }.settings-separator { max-width: 620px; margin: 32px auto; border-top: 1px solid #edf1ef; }.mode-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px; color: #66817a; background: #eef7f4; border-radius: 8px; font-size: 10px; line-height: 1.5; }.mode-note .ui-icon { color: #4f9c91; }.settings-footer { display: flex; justify-content: flex-end; gap: 16px; min-height: 67px; padding: 15px 28px; border-top: 1px solid #edf1ef; }.text-button, :deep(.identity-import-cancel) { padding: 0 6px; color: #63716c; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }.save-button { padding: 0 23px; }.qq-modal-card { position: relative; width: min(460px, 100%); max-height: min(90dvh, 720px); overflow-y: auto; padding: 30px; color: #263431; border: 1px solid #d9e7e3; border-radius: 20px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); text-align: center; }.qq-modal-heading { padding: 0 24px 18px; }.qq-modal-heading h2 { margin: 8px 0 0; color: #1d2d29; font-size: 25px; letter-spacing: -.04em; }.qq-modal-close, :deep(.identity-import-close) { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #6d7d78; background: #f1f6f4; border: 1px solid #e1ebe8; border-radius: 50%; cursor: pointer; }.qq-modal-close:hover, :deep(.identity-import-close:hover) { color: #006a64; background: #e2f2ef; border-color: #c8e6e1; }.qq-qr-image { display: block; width: min(100%, 360px); max-height: min(55vh, 520px); margin: 0 auto; object-fit: contain; border-radius: 12px; }.qq-direct-join { margin: 18px 0 9px; color: #667773; font-size: 13px; }.qq-join-link { display: block; padding: 11px 14px; color: #006a64; background: #edf8f5; border: 1px solid #cfe9e4; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }.qq-join-link:hover { color: #fff; background: #006a64; border-color: #006a64; }.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 8px; padding: 11px 15px; color: #fff; background: #263e39; border-radius: 9px; box-shadow: 0 10px 24px rgba(16,48,42,.2); font-size: 11px; animation: toast-in .25s ease-out; } +:deep(.modal-backdrop) { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(25, 33, 31, .42); backdrop-filter: blur(5px); }:deep(.settings-modal) { display: flex; width: min(920px, 100%); max-height: min(760px, calc(100dvh - 56px)); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.2); }.settings-nav { display: flex; flex-direction: column; width: 215px; flex: 0 0 auto; padding: 28px 12px 20px; background: #f8faf9; border-right: 1px solid #e6ecea; }.settings-title { padding: 0 13px 20px; color: #25322e; font-size: 19px; font-weight: 700; }.settings-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: #65736f; background: transparent; border-left: 3px solid transparent; border-radius: 8px; font-size: 11px; text-align: left; cursor: pointer; }.settings-nav-item.active { color: #006a64; background: #e2efec; border-left-color: #006a64; font-weight: 700; }.settings-version { margin-top: auto; padding: 20px 13px 0; color: #98a5a0; border-top: 1px solid #e4ebe8; font-size: 10px; line-height: 1.7; }.settings-version span { color: #b0bbb7; }:deep(.settings-main) { display: flex; min-width: 0; flex: 1; flex-direction: column; }:deep(.settings-header) { display: flex; align-items: center; justify-content: space-between; min-height: 75px; padding: 0 28px; border-bottom: 1px solid #edf1ef; }:deep(.settings-header h2) { margin: 0; color: #202c29; font-size: 22px; letter-spacing: -.045em; }:deep(.settings-content) { flex: 1; overflow-y: auto; padding: 28px 40px; }:deep(.settings-section) { max-width: 620px; margin: 0 auto; }:deep(.settings-section h3) { display: flex; align-items: center; gap: 9px; margin: 0 0 21px; color: #293631; font-size: 16px; }:deep(.settings-section h3 .ui-icon) { color: #006a64; }:deep(.settings-label) { display: block; margin-bottom: 8px; color: #5e6d67; font-size: 10px; font-weight: 500; }.select-like { display: flex; align-items: center; justify-content: space-between; min-height: 39px; margin-bottom: 19px; padding: 0 13px; color: #394742; background: #f4f7f6; border-radius: 8px; font-size: 11px; }.select-like .ui-icon { color: #677671; }:deep(.settings-range-row) { display: flex; align-items: center; justify-content: space-between; }:deep(.settings-range-row .settings-label) { margin: 0; }:deep(.settings-range-row strong) { color: #006a64; font-size: 10px; }:deep(.settings-range) { width: 100%; height: 6px; margin: 11px 0 20px; appearance: none; border-radius: 999px; outline: none; cursor: pointer; }:deep(.settings-range::-webkit-slider-thumb) { width: 19px; height: 19px; }:deep(.settings-range::-moz-range-thumb) { width: 19px; height: 19px; }:deep(.mic-test) { padding: 15px; border: 1px solid #e5ece9; border-radius: 11px; background: #fafcfb; }:deep(.mic-test-header) { display: flex; align-items: center; justify-content: space-between; }:deep(.mic-test-header strong) { color: #36453f; font-size: 11px; }:deep(.mic-test-header button) { padding: 6px 9px; color: #006a64; background: #e0f1ee; border-radius: 5px; font-size: 10px; cursor: pointer; }:deep(.meter) { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 39px; margin-top: 12px; padding: 0 4px 4px; border-bottom: 1px solid #dce6e2; }:deep(.meter i) { width: 5px; min-height: 4px; border-radius: 3px 3px 0 0; background: #dfe6e3; }:deep(.meter i.active) { background: #81ed8b; box-shadow: 0 0 7px rgba(129,237,139,.45); animation: meter 1s ease-in-out infinite alternate; }:deep(.meter-labels) { display: flex; justify-content: space-between; margin-top: 6px; color: #9ba6a2; font-size: 8px; }:deep(.settings-separator) { max-width: 620px; margin: 32px auto; border-top: 1px solid #edf1ef; }:deep(.mode-note) { display: flex; align-items: flex-start; gap: 8px; padding: 12px; color: #66817a; background: #eef7f4; border-radius: 8px; font-size: 10px; line-height: 1.5; }:deep(.mode-note .ui-icon) { color: #4f9c91; }:deep(.settings-footer) { display: flex; justify-content: flex-end; gap: 16px; min-height: 67px; padding: 15px 28px; border-top: 1px solid #edf1ef; }:deep(.text-button), :deep(.identity-import-cancel) { padding: 0 6px; color: #63716c; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; }:deep(.save-button) { padding: 0 23px; }.qq-modal-card { position: relative; width: min(460px, 100%); max-height: min(90dvh, 720px); overflow-y: auto; padding: 30px; color: #263431; border: 1px solid #d9e7e3; border-radius: 20px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); text-align: center; }.qq-modal-heading { padding: 0 24px 18px; }.qq-modal-heading h2 { margin: 8px 0 0; color: #1d2d29; font-size: 25px; letter-spacing: -.04em; }:deep(.qq-modal-close), :deep(.identity-import-close) { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #6d7d78; background: #f1f6f4; border: 1px solid #e1ebe8; border-radius: 50%; cursor: pointer; }:deep(.qq-modal-close:hover), :deep(.identity-import-close:hover) { color: #006a64; background: #e2f2ef; border-color: #c8e6e1; }.qq-qr-image { display: block; width: min(100%, 360px); max-height: min(55vh, 520px); margin: 0 auto; object-fit: contain; border-radius: 12px; }.qq-direct-join { margin: 18px 0 9px; color: #667773; font-size: 13px; }.qq-join-link { display: block; padding: 11px 14px; color: #006a64; background: #edf8f5; border: 1px solid #cfe9e4; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.45; text-decoration: none; overflow-wrap: anywhere; }.qq-join-link:hover { color: #fff; background: #006a64; border-color: #006a64; }.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 8px; padding: 11px 15px; color: #fff; background: #263e39; border-radius: 9px; box-shadow: 0 10px 24px rgba(16,48,42,.2); font-size: 11px; animation: toast-in .25s ease-out; } -.channel-password-modal { position: relative; width: min(420px, 100%); padding: 31px 32px 28px; color: #263431; border: 1px solid #d9e7e3; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); } -.channel-password-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; color: #006a64; background: #e4f4f0; border-radius: 14px; } -.channel-password-modal h2 { margin: 7px 0 8px; color: #1d2d29; font-size: 24px; letter-spacing: -.04em; } -.channel-password-modal > p { margin: 0 0 23px; color: #70817b; font-size: 12px; line-height: 1.6; } +:deep(.channel-password-modal) { position: relative; width: min(420px, 100%); padding: 31px 32px 28px; color: #263431; border: 1px solid #d9e7e3; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(16,40,35,.22); } +:deep(.channel-password-icon) { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; color: #006a64; background: #e4f4f0; border-radius: 14px; } +:deep(.channel-password-modal h2) { margin: 7px 0 8px; color: #1d2d29; font-size: 24px; letter-spacing: -.04em; } +:deep(.channel-password-modal > p) { margin: 0 0 23px; color: #70817b; font-size: 12px; line-height: 1.6; } :deep(.channel-password-form .field-label) { margin-bottom: 8px; } :deep(.channel-password-form .field-wrap) { margin-bottom: 12px; } -.channel-password-error { margin: 0 0 14px; } -.channel-password-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-top: 21px; } -.channel-password-submit { min-height: 40px; padding: 0 16px; } +:deep(.channel-password-error) { margin: 0 0 14px; } +:deep(.channel-password-actions) { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-top: 21px; } +:deep(.channel-password-submit) { min-height: 40px; padding: 0 16px; } :deep(.channel-password-submit .button-spinner) { width: 14px; height: 14px; } -.channel-password-submit:disabled { cursor: wait; opacity: .7; } +:deep(.channel-password-submit:disabled) { cursor: wait; opacity: .7; } @media (max-width: 740px) { - .channel-password-backdrop { align-items: flex-end; padding: 0; } - .channel-password-modal { width: 100%; padding: 27px 22px calc(23px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; } - .channel-password-modal h2 { font-size: 22px; } + :deep(.channel-password-backdrop) { align-items: flex-end; padding: 0; } + :deep(.channel-password-modal) { width: 100%; padding: 27px 22px calc(23px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; } + :deep(.channel-password-modal h2) { font-size: 22px; } } @keyframes spin { to { transform: rotate(360deg); } } @keyframes wave { from { transform: scaleY(.68); opacity: .65; } to { transform: scaleY(1.08); opacity: 1; } } @keyframes meter { from { transform: scaleY(.65); } to { transform: scaleY(1); } } @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } @@ -170,7 +170,7 @@ @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; }:deep(.member-panel) { padding-inline: 12px; }:deep(.member-volume) { display: none; } } @media (max-width: 980px) { .app-shell { grid-template-columns: 70px 245px minmax(0, 1fr); }:deep(.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; }:deep(.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; }:deep(.field-grid) { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }.app-shell { display: block; height: 100dvh; }.nav-rail, .channel-sidebar, :deep(.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; }:deep(.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; }:deep(.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; }:deep(.field-grid) { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }.app-shell { display: block; height: 100dvh; }.nav-rail, .channel-sidebar, :deep(.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; }:deep(.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; }:deep(.settings-modal) { max-height: calc(100dvh - 28px); }.settings-nav { display: none; }:deep(.settings-content) { padding: 24px 20px; }:deep(.settings-header) { min-height: 62px; padding-inline: 20px; }:deep(.settings-header h2) { font-size: 19px; }:deep(.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; }:deep(.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; } } @media (max-width: 740px) { @@ -217,14 +217,14 @@ :deep(.member-volume) { display: flex; } :deep(.channel-no-members) { margin: 7px 4px 0 31px; color: #a0ada8; font-size: 10px; } .member-panel-tip { flex: 0 0 auto; margin-top: 15px; } -.settings-modal { width: min(760px, 100%); } +:deep(.settings-modal) { width: min(760px, 100%); } .settings-nav { display: none; } -.settings-content { padding: 30px 42px; } -.settings-select { display: block; width: 100%; min-height: 42px; margin-bottom: 19px; padding: 0 13px; color: #394742; border: 1px solid #e0eae6; border-radius: 8px; outline: none; background: #f4f7f6; font-size: 11px; cursor: pointer; } -.settings-select:focus { border-color: #81d8d0; box-shadow: 0 0 0 2px rgba(129,216,208,.2); } -.settings-select:disabled { cursor: wait; opacity: .65; } -.settings-error { margin: -9px 0 15px; color: #b14e47; font-size: 10px; line-height: 1.5; } -.settings-footer { justify-content: flex-end; } +:deep(.settings-content) { padding: 30px 42px; } +:deep(.settings-select) { display: block; width: 100%; min-height: 42px; margin-bottom: 19px; padding: 0 13px; color: #394742; border: 1px solid #e0eae6; border-radius: 8px; outline: none; background: #f4f7f6; font-size: 11px; cursor: pointer; } +:deep(.settings-select:focus) { border-color: #81d8d0; box-shadow: 0 0 0 2px rgba(129,216,208,.2); } +:deep(.settings-select:disabled) { cursor: wait; opacity: .65; } +:deep(.settings-error) { margin: -9px 0 15px; color: #b14e47; font-size: 10px; line-height: 1.5; } +:deep(.settings-footer) { justify-content: flex-end; } .reconnect-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px auto 0; width: min(950px, calc(100% - 64px)); padding: 12px 16px; color: #6c5a2c; border: 1px solid #f0dfae; border-radius: 10px; background: #fff9e8; } .reconnect-banner.failed { color: #8f4540; border-color: #f2d1cd; background: #fff2f1; } .reconnect-banner.degraded { color: #7a4d1d; border-color: #f3d9a9; background: #fff7ec; } /* 降级/告警级提示(如音频链路降级) */ @@ -277,7 +277,7 @@ .clear-local-button { padding: 0; color: #85928d; background: transparent; border: 0; font-size: 10px; cursor: pointer; } .clear-local-button:hover { color: #b14e47; text-decoration: underline; } @media (max-width: 740px) { .reconnect-banner { align-items: flex-start; flex-direction: column; gap: 10px; width: calc(100% - 30px); }.reconnect-copy { align-items: flex-start; flex-direction: column; gap: 4px; }.reconnect-actions { width: 100%; justify-content: flex-end; } } -.save-button { min-height: 38px; } +:deep(.save-button) { min-height: 38px; } /* Increase connected-view typography by 25% while keeping the layout compact. */ .app-shell .breadcrumbs { font-size: 15px; } @@ -307,14 +307,14 @@ :deep(.app-shell .member-copy strong) { font-size: 12.5px; } :deep(.app-shell .member-copy span), :deep(.app-shell .channel-no-members) { font-size: 11.25px; } :deep(.app-shell .member-empty), .app-shell .member-panel-tip { font-size: 12.5px; } -.settings-modal .settings-header h2 { font-size: 27.5px; } -.settings-modal .settings-section h3 { font-size: 20px; } -.settings-modal .settings-label, .settings-modal .settings-range-row strong, .settings-modal .settings-error { font-size: 12.5px; } -.settings-modal .settings-select { font-size: 13.75px; } -.settings-modal .mic-test-header strong { font-size: 13.75px; } -.settings-modal .mic-test-header button { font-size: 12.5px; } -.settings-modal .meter-labels { font-size: 10px; } -.settings-modal .mode-note { font-size: 12.5px; } +:deep(.settings-modal .settings-header h2) { font-size: 27.5px; } +:deep(.settings-modal .settings-section h3) { font-size: 20px; } +:deep(.settings-modal .settings-label), :deep(.settings-modal .settings-range-row strong), :deep(.settings-modal .settings-error) { font-size: 12.5px; } +:deep(.settings-modal .settings-select) { font-size: 13.75px; } +:deep(.settings-modal .mic-test-header strong) { font-size: 13.75px; } +:deep(.settings-modal .mic-test-header button) { font-size: 12.5px; } +:deep(.settings-modal .meter-labels) { font-size: 10px; } +:deep(.settings-modal .mode-note) { font-size: 12.5px; } .join-page :deep(.brand-lockup strong) { font-size: 22.5px; } .join-page :deep(.brand-lockup small), .join-page :deep(.header-note) { font-size: 12.5px; } .join-page .language-switch { font-size: 12.5px; } @@ -323,7 +323,7 @@ .join-page .join-description { font-size: 21.25px; } .join-page .promise-item b { font-size: 15px; } .join-page .promise-item small { font-size: 12.5px; } -.join-page .card-kicker { font-size: 12.5px; } +:deep(.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; } @@ -336,7 +336,7 @@ @media (min-width: 741px) and (max-width: 980px) { .app-shell { grid-template-columns: minmax(0, 1fr); }:deep(.member-panel) { display: none; } } @media (max-width: 980px) { .app-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(210px, 35dvh); }.workspace { height: auto; min-height: 0; }:deep(.member-panel) { display: flex; border-top: 1px solid #eef2f0; border-left: 0; padding: 16px 18px; }:deep(.member-tree) { margin-top: 10px; } } -@media (max-width: 740px) { .app-shell { display: grid; grid-template-rows: minmax(0, 1fr) 220px; }.app-shell .room-hero h1 { font-size: 27.5px; }.app-shell .room-hero p { font-size: 13.75px; }:deep(.app-shell .section-heading h2) { font-size: 21.25px; }:deep(.app-shell .message-bubble), :deep(.app-shell .message-composer input) { font-size: 13.75px; }.app-shell .mic-mode-switch button { font-size: 11.25px; }.settings-modal .settings-content { padding: 24px 20px; }.settings-modal .settings-header h2 { font-size: 23.75px; } } +@media (max-width: 740px) { .app-shell { display: grid; grid-template-rows: minmax(0, 1fr) 220px; }.app-shell .room-hero h1 { font-size: 27.5px; }.app-shell .room-hero p { font-size: 13.75px; }:deep(.app-shell .section-heading h2) { font-size: 21.25px; }:deep(.app-shell .message-bubble), :deep(.app-shell .message-composer input) { font-size: 13.75px; }.app-shell .mic-mode-switch button { font-size: 11.25px; }:deep(.settings-modal .settings-content) { padding: 24px 20px; }:deep(.settings-modal .settings-header h2) { font-size: 23.75px; } } /* Keep the connected workspace sized to the browser viewport and let the workspace and member tree own their scroll areas when the window shrinks. */ @@ -370,7 +370,7 @@ stays focused on navigation. Mobile keeps its existing controls below the voice cards and in the More panel. */ :deep(.header-tools) { align-items: center; } -.header-action, .round-icon { line-height: 0; } +.header-action, :deep(.round-icon) { line-height: 0; } :deep(.guide-button) { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; color: #006a64; background: #edf7f4; border: 1px solid #d7ebe6; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; } :deep(.guide-button:hover) { color: #fff; background: #006a64; border-color: #006a64; } .workspace-actions { align-items: center; flex-wrap: nowrap; } @@ -387,7 +387,7 @@ .dock-audio-button.muted { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface-1)); } .dock-audio-button.accompaniment-toggle.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-1)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); } .settings-mode-switch { width: fit-content; margin: 0 0 7px; } -.settings-hint { margin: -1px 0 19px; color: #8b9994; font-size: 11px; } +:deep(.settings-hint) { margin: -1px 0 19px; color: #8b9994; font-size: 11px; } @media (max-width: 740px) { :deep(.header-tools) { gap: 7px; } @@ -435,13 +435,13 @@ .poke-banner small { font-size: inherit; } .poke-banner button { display: grid; place-items: center; padding: 3px; color: #9b8a6e; background: transparent; border-radius: 5px; cursor: pointer; } .poke-banner button:hover { color: #735020; background: #f9eed9; } -.audio-diagnostic, .audio-level-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: #7b8a85; font-size: 11px; } -.audio-diagnostic strong, .audio-level-row strong { color: #3c625b; font-size: 11px; } -.permission-denied { color: #b3514b !important; } -.permission-granted { color: #2d8547 !important; } -.audio-level-track { height: 7px; margin: 7px 0 17px; overflow: hidden; background: #e8efec; border-radius: 999px; } -.audio-level-track i { display: block; height: 100%; min-width: 0; background: linear-gradient(90deg, #69c8bb, #58d675); border-radius: inherit; transition: width .08s linear; } -.test-audio { display: block; width: 100%; height: 34px; margin-top: 11px; } +:deep(.audio-diagnostic), :deep(.audio-level-row) { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; color: #7b8a85; font-size: 11px; } +:deep(.audio-diagnostic strong), :deep(.audio-level-row strong) { color: #3c625b; font-size: 11px; } +:deep(.permission-denied) { color: #b3514b !important; } +:deep(.permission-granted) { color: #2d8547 !important; } +:deep(.audio-level-track) { height: 7px; margin: 7px 0 17px; overflow: hidden; background: #e8efec; border-radius: 999px; } +:deep(.audio-level-track i) { display: block; height: 100%; min-width: 0; background: linear-gradient(90deg, #69c8bb, #58d675); border-radius: inherit; transition: width .08s linear; } +:deep(.test-audio) { display: block; width: 100%; height: 34px; margin-top: 11px; } /* Shared interaction/layout rules; appearance is supplied by a built-in skin package. */ .join-page .join-card { position: relative; } @@ -505,7 +505,7 @@ .whisper-strip { align-items: stretch; flex-wrap: wrap; gap: 8px; } .whisper-strip-copy { width: 100%; flex: 1 0 100%; } .whisper-ptt-button { flex: 1; min-height: 46px; } - .whisper-strip > .text-button { min-height: 38px; } + :deep(.whisper-strip > .text-button) { min-height: 38px; } } /* Keep the desktop join card comfortable without making the welcome page @@ -562,11 +562,11 @@ mobile surface its own touch-friendly scroll area. */ .mobile-voice-controls, .voice-member-action, :deep(.member-action-button), :deep(.member-menu-backdrop) { display: none; } .microphone-header-toggle.muted { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); } -.microphone-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; } -.microphone-control .settings-label { margin-bottom: 4px; } -.microphone-control .settings-hint { max-width: 390px; margin: 0; } -.microphone-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; flex: 0 0 auto; padding: 0 12px; color: #fff; background: var(--accent); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; } -.microphone-toggle.muted { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, var(--surface-1)); } +:deep(.microphone-control) { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; } +:deep(.microphone-control .settings-label) { margin-bottom: 4px; } +:deep(.microphone-control .settings-hint) { max-width: 390px; margin: 0; } +:deep(.microphone-toggle) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; flex: 0 0 auto; padding: 0 12px; color: #fff; background: var(--accent); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; } +:deep(.microphone-toggle.muted) { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, var(--surface-1)); } :deep(.member-menu-header) { display: flex; align-items: center; justify-content: space-between; gap: 8px; } :deep(.member-menu-close) { display: none; } @@ -662,18 +662,18 @@ :deep(.menu-volume) { padding: 5px 8px 11px; font-size: 12px; } :deep(.menu-volume input) { height: 7px; } - .modal-backdrop { align-items: flex-end; padding: 0; } - .settings-modal { width: 100%; max-height: calc(100svh - env(safe-area-inset-top, 0px)); border-radius: 22px 22px 0 0; } + :deep(.modal-backdrop) { align-items: flex-end; padding: 0; } + :deep(.settings-modal) { width: 100%; max-height: calc(100svh - env(safe-area-inset-top, 0px)); border-radius: 22px 22px 0 0; } .qq-modal-card { width: 100%; max-height: calc(100svh - env(safe-area-inset-top, 0px)); padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; } .qq-qr-image { width: min(100%, 330px); max-height: 52svh; } - .settings-main { min-height: 0; overflow: hidden; } - .settings-header { min-height: 64px; padding-inline: 18px; } - .settings-content { min-height: 0; padding: 20px 18px; overflow-y: auto; } - .settings-footer { min-height: 68px; padding: 8px 18px calc(8px + env(safe-area-inset-bottom, 0px)); } - .settings-footer .save-button { min-height: 48px; } - .microphone-control { align-items: stretch; flex-direction: column; gap: 10px; } - .microphone-control .settings-hint { max-width: none; } - .microphone-toggle { width: 100%; min-height: 44px; } + :deep(.settings-main) { min-height: 0; overflow: hidden; } + :deep(.settings-header) { min-height: 64px; padding-inline: 18px; } + :deep(.settings-content) { min-height: 0; padding: 20px 18px; overflow-y: auto; } + :deep(.settings-footer) { min-height: 68px; padding: 8px 18px calc(8px + env(safe-area-inset-bottom, 0px)); } + :deep(.settings-footer .save-button) { min-height: 48px; } + :deep(.microphone-control) { align-items: stretch; flex-direction: column; gap: 10px; } + :deep(.microphone-control .settings-hint) { max-width: none; } + :deep(.microphone-toggle) { width: 100%; min-height: 44px; } .join-page { height: 100dvh; height: 100svh; min-height: 100dvh; min-height: 100svh; max-height: 100dvh; max-height: 100svh; } .join-header { min-height: calc(62px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); box-sizing: border-box; } @@ -831,8 +831,8 @@ .web-client.language-de .join-page .promise-item b { font-size: 13.2px; } .web-client.language-en .join-page .promise-item small, .web-client.language-de .join-page .promise-item small { font-size: 11px; } -.web-client.language-en .join-page .card-kicker, -.web-client.language-de .join-page .card-kicker { font-size: 11px; } +.web-client.language-en :deep(.join-page .card-kicker), +.web-client.language-de :deep(.join-page .card-kicker) { font-size: 11px; } .web-client.language-en .join-page .join-card h2, .web-client.language-de .join-page .join-card h2 { font-size: 29.7px; } .web-client.language-en .join-page .card-lead, @@ -933,16 +933,16 @@ .dock-slider::-webkit-slider-thumb { width: 14px; height: 14px; appearance: none; border: 2px solid #81d8d0; border-radius: 50%; background: var(--surface-1); box-shadow: 0 2px 4px color-mix(in srgb, var(--text-primary) 14%, transparent); cursor: pointer; } .dock-slider::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #81d8d0; border-radius: 50%; background: var(--surface-1); box-shadow: 0 2px 4px color-mix(in srgb, var(--text-primary) 14%, transparent); cursor: pointer; } .dock-panel-divider { height: 1px; margin: 12px 0; background: var(--border); } -.dock-switch-row, .mobile-noise-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; } -.dock-switch-row > span, .mobile-noise-toggle > span { min-width: 0; } -.dock-switch-row strong, .mobile-noise-toggle strong { display: block; color: var(--text-primary); font-size: 11px; } -.mobile-noise-toggle { margin-bottom: 18px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; } -.mobile-noise-toggle small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.4; } -.dock-switch-row input, .mobile-noise-toggle input { position: relative; width: 34px; height: 20px; flex: 0 0 34px; margin: 0; padding: 0; appearance: none; border: 2px solid var(--border); border-radius: 999px; outline: none; background: var(--surface-2); cursor: pointer; transition: background .16s ease, border-color .16s ease; } -.dock-switch-row input::before, .mobile-noise-toggle input::before { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); transition: transform .16s ease, background .16s ease; } -.dock-switch-row input:checked, .mobile-noise-toggle input:checked { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 72%, var(--surface-2)); } -.dock-switch-row input:checked::before, .mobile-noise-toggle input:checked::before { background: var(--surface-1); transform: translateX(14px); } -.dock-switch-row input:focus-visible, .mobile-noise-toggle input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; } +.dock-switch-row, :deep(.mobile-noise-toggle) { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; } +.dock-switch-row > span, :deep(.mobile-noise-toggle > span) { min-width: 0; } +.dock-switch-row strong, :deep(.mobile-noise-toggle strong) { display: block; color: var(--text-primary); font-size: 11px; } +:deep(.mobile-noise-toggle) { margin-bottom: 18px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; } +:deep(.mobile-noise-toggle small) { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; line-height: 1.4; } +.dock-switch-row input, :deep(.mobile-noise-toggle input) { position: relative; width: 34px; height: 20px; flex: 0 0 34px; margin: 0; padding: 0; appearance: none; border: 2px solid var(--border); border-radius: 999px; outline: none; background: var(--surface-2); cursor: pointer; transition: background .16s ease, border-color .16s ease; } +.dock-switch-row input::before, :deep(.mobile-noise-toggle input::before) { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); transition: transform .16s ease, background .16s ease; } +.dock-switch-row input:checked, :deep(.mobile-noise-toggle input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 72%, var(--surface-2)); } +.dock-switch-row input:checked::before, :deep(.mobile-noise-toggle input:checked::before) { background: var(--surface-1); transform: translateX(14px); } +.dock-switch-row input:focus-visible, :deep(.mobile-noise-toggle input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; } :deep(.member-row[draggable="true"]) { cursor: grab; touch-action: none; } :deep(.member-row[draggable="true"]:active) { cursor: grabbing; } @@ -951,7 +951,7 @@ :deep(.member-channel-group.drag-over .member-channel-heading) { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface-1)); } @media (prefers-reduced-motion: reduce) { - .dock-hover-panel, .dock-switch-row input, .mobile-noise-toggle input { transition-duration: .01ms; } + .dock-hover-panel, .dock-switch-row input, :deep(.mobile-noise-toggle input) { transition-duration: .01ms; } } .screen-share-inline-error { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; padding: 8px 10px; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); border-radius: 9px; background: color-mix(in srgb, var(--danger) 12%, var(--surface-1)); font-size: 10px; line-height: 1.4; } diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index a3f4125..ebc6e62 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -259,47 +259,19 @@ :range-style="rangeStyle" :t="t" @private-chat="openPrivateChat" @volume-input="onVolInput" /> - + - + - +
{{ toast }}
@@ -308,6 +280,9 @@