mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: repair KAAK controls and add invite link action
This commit is contained in:
1 parent
45bec91daa
commit
224a641372
12 files changed
+164
-19
No files matched your search
@@ -70,6 +70,7 @@ v4 当前运行路径已不使用 v3 固定标签/属性/状态/动作表来构
|
||||
|
||||
当前宿主动作如下:
|
||||
|
||||
- session.copyInviteLink 需要 session.invite.copy,只复制当前公开服务器与频道的邀请链接;宿主会排除连接凭据。
|
||||
- voice.joinChannel 需要 session.channel.join,只能请求加入当前页面公开可见的 TeamSpeak 频道,仍经过宿主和原有密码、权限流程。
|
||||
- favorites.switch 需要 favorites.switch,只能让宿主按不透明令牌选择本机已有收藏并走原连接流程。
|
||||
- quickServers.switch 需要 servers.quickList.switch,只能让宿主按不透明令牌选择本机已有收藏或最近连接并走原连接流程。
|
||||
|
||||
@@ -164,7 +164,7 @@ components.json 顶层接受 schemaVersion 1、2 或 3 和 components 数组。s
|
||||
|
||||
当前可选宿主控件 ID:`home.connection-form`、`home.connection-status`、`home.server-announcement`、`home.social-links`、`home.identity-provider`、`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 内部处理。`home.identity-provider` 是通用身份提供方入口,需用 `options.identityProviderId` 和 `options.identityProviderLabel` 指定稳定提供方标识与显示名;宿主会把点击转交给应用代码的 `registerIdentityProviderAdapter` 分发接口,皮肤只能发起请求、不能注册适配器。当前没有 MyTS 适配器,所以 MyTS 入口仍提示开发中;这不代表已经实现登录认证。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 还提供经独立权限保护的麦克风/扬声器、输出音量、噪声抑制、伴奏、离开状态、悄悄话、断开连接和屏幕共享动作;噪声抑制使用 `audio.toggleNoiseSuppression` 与 `audio.microphone.control`,伴奏使用 `audio.toggleAccompaniment` 与 `audio.output.control`。它们只调用 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、域名或连接目标时省略,避免把地址显示为服务器名称。
|
||||
可信语音导航控件包括 `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 当前连接流程。v3 还可用 `session.invite.copy` 授权 `session.copyInviteLink`,让宿主复制当前公开服务器与频道的邀请链接并排除连接凭据。语音状态投影中的 `serverLabel` 会在看起来像 IP、域名或连接目标时省略,避免把地址显示为服务器名称。
|
||||
|
||||
示例包见 [KAAK voice 示例](./examples/KAAK-VOICE.md),其 components.json 使用完整首页与语音工作区 surface,展示收藏服务器、频道树、在线成员、聊天和可信语音控制的组合;[Open Voice Surface](./examples/OPEN-VOICE-SURFACE.md) 保留为通用格式验证脚手架。KAAK 的语音视觉参考来自用户授权进入的前两个语音房间;只记录布局,不保留服务器/房间标识、成员名或聊天内容。当前数据权限和宿主动作以[开放皮肤规格](./OPEN_SKIN_SYSTEM_SPEC.zh-CN.md)中的清单为准。组件按本地用户授权后才渲染;权限对每个皮肤版本、页面和组件分别保存,可在宿主权限入口撤销。页面替换时,宿主会额外显示“返回标准界面”和“恢复内置皮肤”入口;拒绝授权或离开 surface 后,普通页面可立即恢复。
|
||||
|
||||
|
||||
Binary file not shown.
@@ -364,6 +364,7 @@
|
||||
"permissions": [
|
||||
"ui.surface.replace",
|
||||
"session.status.read",
|
||||
"session.invite.copy",
|
||||
"session.channels.read",
|
||||
"session.members.read",
|
||||
"session.memberAvatars.read",
|
||||
@@ -392,6 +393,10 @@
|
||||
"type": "voice.disconnect",
|
||||
"args": {}
|
||||
},
|
||||
"copy-invite-link": {
|
||||
"type": "session.copyInviteLink",
|
||||
"args": {}
|
||||
},
|
||||
"stop-screen-share": {
|
||||
"type": "voice.stopScreenShare",
|
||||
"args": {}
|
||||
@@ -703,6 +708,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "mobile-room-invite-copy",
|
||||
"attributes": {
|
||||
"type": "button",
|
||||
"role": "menuitem",
|
||||
"aria-label": "复制邀请链接 / Copy invite link"
|
||||
},
|
||||
"events": {
|
||||
"click": "copy-invite-link"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"text": "复制邀请链接 / Copy invite link"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "mobile-room-menu-close",
|
||||
@@ -1106,6 +1128,50 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "voice-stage-invite",
|
||||
"className": "voice-stage-invite",
|
||||
"attributes": {
|
||||
"type": "button",
|
||||
"aria-label": "复制邀请链接 / Copy invite link",
|
||||
"title": "复制邀请链接 / Copy invite link"
|
||||
},
|
||||
"events": {
|
||||
"click": "copy-invite-link"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"tag": "svg",
|
||||
"className": "voice-stage-action-icon",
|
||||
"attributes": {
|
||||
"width": 18,
|
||||
"height": 18,
|
||||
"viewbox": "0 0 24 24",
|
||||
"fill": "none",
|
||||
"stroke": "currentColor",
|
||||
"stroke-width": 1.8,
|
||||
"stroke-linecap": "round",
|
||||
"stroke-linejoin": "round",
|
||||
"aria-hidden": "true"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"tag": "path",
|
||||
"attributes": {
|
||||
"d": "M10 13a5 5 0 0 0 7.07 0l2-2a5 5 0 0 0-7.07-7.07l-1.15 1.15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"tag": "path",
|
||||
"attributes": {
|
||||
"d": "M14 11a5 5 0 0 0-7.07 0l-2 2a5 5 0 0 0 7.07 7.07l1.15-1.15"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "chat-panel-expand",
|
||||
@@ -1123,7 +1189,7 @@
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"text": "聊天"
|
||||
"text": "#"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1283,7 +1349,7 @@
|
||||
{
|
||||
"tag": "path",
|
||||
"attributes": {
|
||||
"d": "M19.4 15a1.7 1.7 0 0 0 .34 1.88l.06.06-1.7 2.94-.08-.02a1.7 1.7 0 0 0-1.74.45l-.06.06h-3.4l-.03-.08a1.7 1.7 0 0 0-1.35-1.14l-.08-.01-1.7-2.95.05-.06a1.7 1.7 0 0 0 0-1.96l-.05-.07 1.7-2.94.08.02a1.7 1.7 0 0 0 1.74-.45l.06-.06h3.4l.03.08a1.7 1.7 0 0 0 1.35 1.14l.08.01 1.7 2.95-.05.06Z"
|
||||
"d": "M10 2h4l1 3 2 1 3-1 2 4-2 2v2l2 2-2 4-3-1-2 1-1 3h-4l-1-3-2-1-3 1-2-4 2-2v-2l-2-2 2-4 3 1 2-1z"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"packageType": "open-skin",
|
||||
"id": "community.kaak-voice",
|
||||
"name": "KAAK",
|
||||
"version": "3.1.107",
|
||||
"version": "3.1.108",
|
||||
"author": "WebSpeak Project",
|
||||
"license": "AGPL-3.0-only",
|
||||
"description": "A KOOK-inspired WebSpeak skin with a split-screen connection home, searchable server header, TeamSpeak banner, nested channel members, unified chat with local history, and a compact audio dock.",
|
||||
|
||||
@@ -1569,6 +1569,36 @@
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.chat-panel-chevron"] { display: block; }
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-invite"] {
|
||||
display: grid;
|
||||
flex: 0 0 34px;
|
||||
place-items: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--skin-kaak-border);
|
||||
border-radius: 9px;
|
||||
color: var(--skin-kaak-muted);
|
||||
background: var(--skin-kaak-raised);
|
||||
cursor: pointer;
|
||||
transition: color .16s ease, background-color .16s ease, border-color .16s ease;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-invite"] .voice-stage-action-icon {
|
||||
display: block;
|
||||
flex: 0 0 18px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
aspect-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-invite"]:hover,
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-invite"]:focus-visible {
|
||||
color: var(--skin-kaak-text);
|
||||
border-color: #5a7e35;
|
||||
background: #33363b;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.chat-panel-expand"] {
|
||||
display: grid;
|
||||
flex: 0 0 36px;
|
||||
@@ -2283,8 +2313,10 @@
|
||||
}
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-controls"] .desktop-room-control-icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-settings"] {
|
||||
display: flex;
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 8px;
|
||||
width: auto;
|
||||
@@ -2293,9 +2325,21 @@
|
||||
color: #b5c6d8;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
}
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-settings"] .desktop-room-control-icon { width: 15px; height: 15px; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-settings"] .desktop-room-control-label { white-space: nowrap; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-settings"] .desktop-room-control-icon {
|
||||
display: block;
|
||||
flex: 0 0 15px;
|
||||
width: 15px;
|
||||
min-width: 15px;
|
||||
height: 15px;
|
||||
min-height: 15px;
|
||||
aspect-ratio: 1 / 1;
|
||||
overflow: visible;
|
||||
transform: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-settings"] .desktop-room-control-label { display: block; line-height: 16px; white-space: nowrap; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-noise-suppression"] { grid-column: 2; grid-row: 2; color: #fff; background: #6cbf00; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-microphone"] { grid-column: 3; grid-row: 2; }
|
||||
[data-ws-plugin-part="kaak-workspace.desktop-room-output"] { grid-column: 4; grid-row: 2; }
|
||||
@@ -3632,7 +3676,7 @@
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-heading"] { flex: 0 0 48px; gap: 7px; margin: 0 -10px 8px; padding: 0 10px; }
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-title"] { flex: 1 1 auto; font-size: 16px; }
|
||||
[data-ws-plugin-part="kaak-workspace.voice-stage-member-count"] { flex: 0 0 auto; }
|
||||
[data-ws-plugin-part="kaak-workspace.chat-panel-expand"] { flex: 0 0 52px; width: 52px; height: 34px; margin-left: 0; border-radius: 10px; font-size: 13px; }
|
||||
[data-ws-plugin-part="kaak-workspace.chat-panel-expand"] { flex: 0 0 36px; width: 36px; height: 36px; margin-left: 0; border-radius: 9px; font-size: 22px; }
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.screen-share-player"] { flex: 0 0 auto; width: 100%; max-width: 100%; margin: 0 0 10px; }
|
||||
[data-ws-plugin-part="kaak-workspace.screen-share-player"] .screen-share-player-stage { height: min(28dvh, 230px); min-height: 126px; max-height: 230px; }
|
||||
|
||||
Reference in new issue
Block a user