feat(kaak): show channel occupancy limits

This commit is contained in:
Corrupted ILLUSIA committed 2026-10-10 22:25:01 +08:00
1 parent 387462d89a
commit a3bf476db6
23 files changed
+244 -20

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ v4 当前运行路径已不使用 v3 固定标签/属性/状态/动作表来构
当前公开只读能力如下:
- session.status.read:连接状态、当前频道和显示名称。
- session.channels.read:公开频道树、频道名称、层级、人数和当前频道标志。
- session.channels.read:公开频道树、频道名称、层级、当前人数、TeamSpeak 公布的频道人数上限及当前频道标志;不限人数的频道不显示上限,不包含服务器地址或频道密码。
- session.members.read:可见成员名称、由名称派生的首字标记、所在频道、在线状态、说话状态及本人标志;不提供成员头像图像。
- session.memberAvatars.read:允许可信 `voice.member-cards` 宿主控件显示当前可见成员的已缓存 TeamSpeak 头像;图像字节和 URL 不会传给皮肤声明树或 Wasm 插件上下文。
- chat.channel.read:当前公开文字频道中可见的消息。
+2
View File
@@ -123,6 +123,8 @@ components.json 顶层接受 schemaVersion 1、2 或 3 和 components 数组。s
普通节点使用白名单 HTML/SVG 元素。节点可包含 text、part、className、受限 attributes、包内图片 asset、bindValue、本地 repeat/when、events 和 children。文本与属性支持简单的双大括号数据路径;不支持表达式、HTML 字符串或脚本。重复列表可使用注册的公开集合;频道重复项仅能再重复其 `channel.members`,并且需要额外批准 `session.members.read`。宿主每个组件的实际渲染节点最多 8192 个,防止嵌套集合放大界面。v3/v4 的作者默认布局使用与 v2 相同的有界 layout schema;可通过 `skin.<page>.<component-id>` 指定声明式自定义组件,通过 `skin.<page>.runtime_plugin_root_<plugin-id>` 指定 v4 插件根。用户的本地布局覆盖优先于包默认值。schema v2 另允许固定宿主控件节点,例如:
申请 `session.channels.read` 的 `session.channels` 列表还提供 `memberCount`、两位数显示用的 `memberCountLabel`、`maxClients` 和 `maxClientsLimited`。后两个字段仅在 TeamSpeak 返回有效上限数据时出现;`maxClientsLimited: false` 表示频道不限人数。它们与频道树一起属于公开只读数据,不会授予服务器写入能力。
```json
{
"schemaVersion": 2,
Binary file not shown.
+28 -2
View File
@@ -429,7 +429,20 @@
"part": "channel-count",
"children": [
{
"text": "{{channel.memberCount}}"
"text": "{{channel.memberCountLabel}}"
},
{
"tag": "span",
"part": "channel-capacity",
"when": {
"path": "channel.maxClientsLimited",
"equals": true
},
"children": [
{
"text": "/{{channel.maxClients}}"
}
]
}
]
},
@@ -823,7 +836,20 @@
},
"children": [
{
"text": "{{stagechannel.memberCount}}"
"text": "{{stagechannel.memberCountLabel}}"
},
{
"tag": "span",
"part": "voice-stage-capacity",
"when": {
"path": "stagechannel.maxClientsLimited",
"equals": true
},
"children": [
{
"text": "/{{stagechannel.maxClients}}"
}
]
}
]
}
+1 -1
View File
@@ -3,7 +3,7 @@
"packageType": "open-skin",
"id": "community.kaak-voice",
"name": "KAAK",
"version": "3.1.20",
"version": "3.1.21",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired voice workspace with collapsible voice groups and current voice-channel chat, TeamSpeak profile cards, and animated speaker states.",
+5
View File
@@ -509,6 +509,10 @@
font-size: 10px;
}
[data-ws-plugin-part="kaak-workspace.channel-capacity"] {
color: var(--skin-kaak-dim);
}
[data-ws-plugin-part="kaak-workspace.channel-voice-members"] {
display: grid;
gap: 1px;
@@ -773,6 +777,7 @@
[data-ws-plugin-part="kaak-workspace.voice-stage-title"] { min-width: 0; margin: 0; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
[data-ws-plugin-part="kaak-workspace.voice-stage-member-count"] { color: var(--skin-kaak-muted); font-size: 12px; }
[data-ws-plugin-part="kaak-workspace.voice-stage-member-count"]::before { content: "-"; margin-right: 6px; color: var(--skin-kaak-dim); }
[data-ws-plugin-part="kaak-workspace.voice-stage-capacity"] { color: var(--skin-kaak-dim); }
[data-ws-plugin-part="kaak-workspace.chat-panel-toggle"] {
display: grid;