mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat: restore channel-tree member drag and drop
This commit is contained in:
1 parent
3476d4716a
commit
e800d75b7b
16 files changed
+118
-14
No files matched your search
@@ -12,7 +12,7 @@
|
||||
|
||||
## 当前检查点(2026-10-11)
|
||||
|
||||
- KAAK 当前源码版本为 3.1.70;最近新增 TeamSpeak 服务器横幅与欢迎语展示,沿用客户端握手携带的真实服务器信息并在缺少内容时隐藏卡片;同时保留真实服务器名与收藏/历史快速切换入口,并以宿主频道树呈现嵌套语音频道、频道成员头像和状态。服务器显示名过滤像地址的内容;快速切换不向皮肤暴露连接目标。控制坞保留 WebSpeak 现有分享、降噪、伴奏、麦克风、扬声器和设置操作;已移除无效的录制占位,仅保留屏幕共享和伴奏入口。频道树成员行与成员卡片右键均使用 KOOK 深色浮层格式,菜单项和行为仍为 WebSpeak 原有操作。3.1.55 的横向单行方案已被用户明确否决,不再沿用;3.1.53 已移除皮肤布局运行时对宿主控件强加的 44px 尺寸。
|
||||
- KAAK 当前源码版本为 3.1.71;最近新增 TeamSpeak 服务器横幅与欢迎语展示,沿用客户端握手携带的真实服务器信息并在缺少内容时隐藏卡片;同时保留真实服务器名与收藏/历史快速切换入口,并以宿主频道树呈现嵌套语音频道、频道成员头像和状态。服务器显示名过滤像地址的内容;快速切换不向皮肤暴露连接目标。控制坞保留 WebSpeak 现有分享、降噪、伴奏、麦克风、扬声器和设置操作;已移除无效的录制占位,仅保留屏幕共享和伴奏入口。频道树成员行与成员卡片右键均使用 KOOK 深色浮层格式,菜单项和行为仍为 WebSpeak 原有操作;频道树成员行支持悬停反馈和跨频道拖放移动。3.1.55 的横向单行方案已被用户明确否决,不再沿用;3.1.53 已移除皮肤布局运行时对宿主控件强加的 44px 尺寸。
|
||||
- 语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均已有对应实现;音频设置标签为 KOOK 已记录的 14px/400,表单卡与字段行按实测宽度/行高调整。
|
||||
- 直接观察记录覆盖语音侧栏/频道树、成员卡与悬停姓名、当前语音频道聊天开合、语音坞、音频设置字体及设备列表尺寸和状态。独立文字频道不复刻;KOOK 的付费分享呈现不复刻,WebSpeak 自带屏幕分享入口和播放器保留。
|
||||
- 设备选择菜单已按皮肤实际高度限位;KAAK 音频滑杆、性能反馈、字体和成员卡交互均有对应实现。3.1.66 完整验证为 680/680,服务端 TypeScript 构建、前端类型检查和生产构建通过。用户已明确 KOOK 音乐语音频道附带聊天默认收起、普通语音频道默认展开。TeamSpeak `ChannelInfo` 与皮肤上下文没有音乐类别字段;当前实现按频道分别记住聊天开合,尚不能判断从未设置过的频道是否为音乐频道。
|
||||
@@ -513,3 +513,11 @@
|
||||
- 分发与文档:KAAK 升至 3.1.70,同步示例、目录和内置皮肤包;补充开放皮肤选项说明,明确树成员行右键与成员卡入口的区别。
|
||||
- 验证:KAAK 皮肤包构建通过;完整 `npm run verify` 通过(682/682 测试、服务端 TypeScript 构建、前端类型检查与 Vite 生产构建);`git diff --check` 通过。3040 返回 HTTP 200,且 WebClient 生产资源包含频道树成员右键事件与既有菜单部件;未打断活动页面或语音会话做浏览器手动点击。
|
||||
- 当前状态:功能、文档、皮肤包构建和自动验证完成,已一并提交并推送到 `dev`。
|
||||
|
||||
## 本轮修复节点(2026-10-11,KAAK 3.1.71 频道树成员交互)
|
||||
|
||||
- 用户反馈:频道树成员行需要像频道行一样有悬停高亮和手型光标,并恢复拖放成员到目标频道的移动操作。
|
||||
- 根因:右键菜单修复只接回了成员菜单入口;旧成员面板仍保留 `onMemberDragStart`、`onChannelDragOver`、`onChannelDrop` 等宿主处理函数,但声明式频道树没有绑定这些事件,成员行也没有 `draggable` 属性。
|
||||
- 修改范围:给 `voice.channel-tree` 增加默认关闭的 `memberDragDrop` 选项;成员行标记可拖动(本人行除外),目标频道行接入现有宿主拖放/移动逻辑并展示拖入状态。KAAK 单独开启;所有高亮和光标样式均限于 KAAK 频道树,其他皮肤默认不变。未新增移动 API、皮肤动作或服务器权限绕过。
|
||||
- 验证:KAAK 示例包与内置包已从同一组件/样式源重建;`npm run verify` 通过(682/682 测试、服务端 TypeScript 构建、前端类型检查及 Vite 生产构建),`git diff --check` 通过。自动验证确认新的 widget 选项经 schema 校验且 KAAK 包启用;没有在真实语音房间拖动成员,避免实际移动在线用户。
|
||||
- 当前状态:实现和构建已完成;待提交并推送至 `dev`。3040 使用新生产构建,浏览器已有的活动语音标签未刷新。
|
||||
@@ -150,7 +150,7 @@ components.json 顶层接受 schemaVersion 1、2 或 3 和 components 数组。s
|
||||
}
|
||||
```
|
||||
|
||||
当前可选宿主控件 ID:`home.connection-form`、`app.skin-switcher`、`app.language-switcher`、`voice.channel-panel`、`voice.member-cards`、`voice.chat-panel`、`voice.audio-controls`、`voice.screen-share-player`、`voice.screen-share-start`、`voice.whisper-controls`、`voice.performance-panel`、`voice.connection-controls`、`voice.disconnect-control`、`voice.server-header`、`voice.server-banner`、`voice.server-switcher`、`voice.channel-tree`。未知控件和同页重复控件会被拒绝;每个控件的状态和业务动作仍由 WebSpeak 内部处理。schema v3 会检查受保护控件所需权限:音频控件需 `audio.status.read`、`audio.microphone.control` 和 `audio.output.control`;聊天需 `chat.channel.read` 与 `chat.channel.send`;成员卡片始终需 `session.members.read` 和 `session.memberAvatars.read`;schema v3 可为成员卡片设置 `options.memberActions: true`,在非本人卡片上显示可信宿主成员操作入口(包含现有个人音量控件);也可为 `voice.channel-tree` 设置该选项,在非本人频道树成员行上启用右键菜单;菜单仍由 WebSpeak 宿主处理,皮肤不获得额外动作或数据接口;成员卡片或性能卡片可设置 `options.screenShare: false`,同时隐藏共享 UI/指标并免除成员卡片所需的屏幕共享权限;默认成员共享操作仍需屏幕共享读取/控制权限;头像只在可信宿主控件内显示,不暴露给皮肤代码;屏幕共享播放器需 `voice.screenShare.read` 与 `voice.screenShare.control`;悄悄话控件需对应状态读取和控制权限;断开/连接控件需 `voice.disconnect`。既有 v2 包维持旧校验行为,`voice.screen-share-start` 仍像此前一样要求 `voice.screenShare.control`。该控件仅能放在语音页;宿主按钮在可信点击处理器内直接启动屏幕采集,避免异步 Wasm 回调丢失浏览器瞬时用户激活。自定义 UI 可以完全用普通声明式节点搭建,不需要采用这些控件。只显示收藏时可用 `favorites.items` 和 `favorites.switch`;若要将收藏与最近连接放在同一自定义栏,可用 `servers.quickList` 数据与 `quickServers.switch` 动作。服务器目标始终使用本机生成的不透明令牌,不把地址、密码或身份材料交给组件。频道行也可把 `voice.joinChannel` 绑定到双击事件,切房继续走 TeamSpeak 原有权限和密码流程。v3 还提供经独立权限保护的麦克风/扬声器、输出音量、离开状态、悄悄话、断开连接和屏幕共享动作;它们只调用 WebSpeak 已有操作,屏幕采集仍由浏览器或操作系统询问用户。
|
||||
当前可选宿主控件 ID:`home.connection-form`、`app.skin-switcher`、`app.language-switcher`、`voice.channel-panel`、`voice.member-cards`、`voice.chat-panel`、`voice.audio-controls`、`voice.screen-share-player`、`voice.screen-share-start`、`voice.whisper-controls`、`voice.performance-panel`、`voice.connection-controls`、`voice.disconnect-control`、`voice.server-header`、`voice.server-banner`、`voice.server-switcher`、`voice.channel-tree`。未知控件和同页重复控件会被拒绝;每个控件的状态和业务动作仍由 WebSpeak 内部处理。schema v3 会检查受保护控件所需权限:音频控件需 `audio.status.read`、`audio.microphone.control` 和 `audio.output.control`;聊天需 `chat.channel.read` 与 `chat.channel.send`;成员卡片始终需 `session.members.read` 和 `session.memberAvatars.read`;schema v3 可为成员卡片设置 `options.memberActions: true`,在非本人卡片上显示可信宿主成员操作入口(包含现有个人音量控件);也可为 `voice.channel-tree` 设置该选项,在非本人频道树成员行上启用右键菜单;菜单仍由 WebSpeak 宿主处理,皮肤不获得额外动作或数据接口。频道树还可单独设置 `options.memberDragDrop: true`,将非本人成员拖到另一频道行时复用 WebSpeak 现有移动成员操作;悬停和拖入高亮由皮肤样式控制,此选项默认关闭且只适用于频道树。成员卡片或性能卡片可设置 `options.screenShare: false`,同时隐藏共享 UI/指标并免除成员卡片所需的屏幕共享权限;默认成员共享操作仍需屏幕共享读取/控制权限;头像只在可信宿主控件内显示,不暴露给皮肤代码;屏幕共享播放器需 `voice.screenShare.read` 与 `voice.screenShare.control`;悄悄话控件需对应状态读取和控制权限;断开/连接控件需 `voice.disconnect`。既有 v2 包维持旧校验行为,`voice.screen-share-start` 仍像此前一样要求 `voice.screenShare.control`。该控件仅能放在语音页;宿主按钮在可信点击处理器内直接启动屏幕采集,避免异步 Wasm 回调丢失浏览器瞬时用户激活。自定义 UI 可以完全用普通声明式节点搭建,不需要采用这些控件。只显示收藏时可用 `favorites.items` 和 `favorites.switch`;若要将收藏与最近连接放在同一自定义栏,可用 `servers.quickList` 数据与 `quickServers.switch` 动作。服务器目标始终使用本机生成的不透明令牌,不把地址、密码或身份材料交给组件。频道行也可把 `voice.joinChannel` 绑定到双击事件,切房继续走 TeamSpeak 原有权限和密码流程。v3 还提供经独立权限保护的麦克风/扬声器、输出音量、离开状态、悄悄话、断开连接和屏幕共享动作;它们只调用 WebSpeak 已有操作,屏幕采集仍由浏览器或操作系统询问用户。
|
||||
|
||||
可信语音导航控件包括 `voice.channel-tree`、`voice.server-switcher` 和 `voice.server-header`。频道树要求 `session.channels.read`、`session.members.read`、`session.memberAvatars.read` 与 `session.channel.join`;头像只由宿主读取并在频道树中绘制。它可选 `layout: "server-sidebar"` 展示频道成员并让频道行与成员行分别控制折叠;未指定时保留默认呈现。独立服务器切换器要求 `servers.quickList.read` 与 `servers.quickList.switch`。服务器头部还要求 `session.status.read`,并在同一可信部件中组合服务器身份、状态、频道搜索和快速切换。两种入口都只接收不透明本地标识,点击后复用 WebSpeak 当前连接流程。语音状态投影中的 `serverLabel` 会在看起来像 IP、域名或连接目标时省略,避免把地址显示为服务器名称。
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ The owner authorized inspection of the first two voice rooms in the KOOK server.
|
||||
|
||||
The connection page and voice workspace are full-page declarative surfaces in [components.json](./kaak-voice/components.json). The voice surface requests only the capabilities it uses: visible server shortcuts, channel and member data, cached profile-avatar display inside the trusted member-card widget, channel joining, channel chat, voice status, microphone/output controls, whisper controls, and disconnect. KAAK explicitly disables the share UI and does not request its member-card permissions. The host renders trusted connection, language, skin, and audio controls. It rechecks permissions and connection state when each action runs; approval is local to this skin version and can be revoked from the host access control.
|
||||
|
||||
The server header uses the live, privacy-filtered TeamSpeak server label and a trusted `voice.server-switcher` menu backed by favorites and recent connections. Its click handler reuses WebSpeak's existing connection flow with an opaque local ID; addresses and credentials never enter skin data. The left panel uses the trusted `voice.channel-tree` widget to retain TeamSpeak channel nesting, member counts and capacity, available avatars, and mute/speaking/away states. Expanding a branch is local UI state, a single click selects a channel, and double-click joins it. With `memberActions` enabled, right-clicking another member row opens WebSpeak's existing host-owned action menu. The skin does not add KOOK's separate text-channel list.
|
||||
The server header uses the live, privacy-filtered TeamSpeak server label and a trusted `voice.server-switcher` menu backed by favorites and recent connections. Its click handler reuses WebSpeak's existing connection flow with an opaque local ID; addresses and credentials never enter skin data. The left panel uses the trusted `voice.channel-tree` widget to retain TeamSpeak channel nesting, member counts and capacity, available avatars, and mute/speaking/away states. Expanding a branch is local UI state, a single click selects a channel, and double-click joins it. With `memberActions` enabled, right-clicking another member row opens WebSpeak's existing host-owned action menu. With `memberDragDrop` enabled, another member can be dragged onto a different channel row; the member row and target channel receive visual feedback, and the host reuses its existing move-client operation. Both options default off for other skins. The skin does not add KOOK's separate text-channel list.
|
||||
|
||||
On desktop, right-clicking another member row in the channel tree or member card opens WebSpeak's existing host-owned member actions menu. Member cards also retain their accessible action button; keyboard activation remains anchored to that button, and touch layouts keep it available. The menu's actions come from WebSpeak and are unchanged by the skin.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -382,7 +382,8 @@
|
||||
"part": "voice-channel-tree",
|
||||
"options": {
|
||||
"layout": "server-sidebar",
|
||||
"memberActions": true
|
||||
"memberActions": true,
|
||||
"memberDragDrop": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"packageType": "open-skin",
|
||||
"id": "community.kaak-voice",
|
||||
"name": "KAAK",
|
||||
"version": "3.1.70",
|
||||
"version": "3.1.71",
|
||||
"author": "WebSpeak Project",
|
||||
"license": "AGPL-3.0-only",
|
||||
"description": "A KOOK-inspired voice workspace with a searchable server header, TeamSpeak banner and welcome message, nested channel members, attached channel chat, and a compact WebSpeak audio dock.",
|
||||
|
||||
@@ -2783,6 +2783,7 @@
|
||||
content: "";
|
||||
}
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-node[data-selected="true"]:not([data-current="true"]) > .ws-voice-channel-line .ws-voice-channel-row { color: #eff0f3; background: #33353b; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-row[data-drag-over="true"] { color: #eff0f3; background: #303b24; box-shadow: inset 0 0 0 1px #72c866; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-type { width: 17px; height: 17px; color: #a5aab4; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-name { min-width: 0; flex: 1 1 auto; overflow: hidden; font-size: 13px; font-weight: 690; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-count { flex: 0 0 auto; color: #777e88; font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
@@ -2790,7 +2791,11 @@
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-branch[data-expanded="false"] { grid-template-rows: 0fr; opacity: 0; transform: translateY(-2px); visibility: hidden; transition: grid-template-rows .15s ease, opacity .14s ease, transform .15s ease, visibility 0s linear .15s; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-branch-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; overflow: hidden; margin: 0; padding: 0; border: 0; list-style: none; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member-list { display: flex; flex-direction: column; gap: 2px; margin: 3px 0 5px; padding: 0; list-style: none; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 29px; margin-left: calc(var(--channel-depth, 0) * 14px); padding: 2px 10px 2px 46px; border-radius: 5px; color: #a5aab4; font-size: 12px; font-weight: 400; line-height: 17px; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 29px; margin-left: calc(var(--channel-depth, 0) * 14px); padding: 2px 10px 2px 46px; border-radius: 5px; color: #a5aab4; font-size: 12px; font-weight: 400; line-height: 17px; cursor: default; transition: color .14s ease, background-color .14s ease, opacity .14s ease; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member[draggable="true"] { cursor: pointer; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member:hover { color: #eff0f3; background: #303238; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member:active { cursor: grabbing; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member[data-dragging="true"] { opacity: .55; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member[data-self="true"] { color: #eff0f3; font-weight: 650; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member-avatar { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; overflow: hidden; border-radius: 50%; color: #eff0f3; background: #393b41; background-position: center; background-size: cover; font-size: 9px; font-weight: 700; }
|
||||
[data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree[data-layout="server-sidebar"] .ws-voice-channel-member-name { min-width: 0; flex: 1 1 auto; overflow: hidden; color: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
Reference in new issue
Block a user