feat(kaak): add collapsible voice channel group

This commit is contained in:
Corrupted ILLUSIA committed 2026-10-10 19:18:52 +08:00
1 parent b9c017f9aa
commit 7fb5e1d6ea
8 files changed
+274 -157

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
KAAK is a schema v3 open-skin package with full connection and voice-workspace surfaces. Its voice page uses a narrow server rail, a server/channel tree, a central participant stage, right-side chat attached to the current voice channel, and a lower-left voice dock. The server rail follows KOOK's rounded-square icon shape and left-edge active marker. The KOOK voice room is the point-to-point visual reference: composition, member presentation, styling, and motion should be compared directly, rather than treating matching component types or approximate placement as sufficient. The left tree contains the TeamSpeak voice channels only; KOOK's separate text-channel group is outside this pass because TeamSpeak has no equivalent channel type. The current voice channel's text chat remains on the right and can collapse into a narrow rail, then expand again without leaving the voice room; messages use author monograms, a separate identity/time line, and readable message text. The central stage uses WebSpeak's reusable member-card widget so available TeamSpeak profile avatars appear inside KAAK's large portrait tiles; KAAK's CSS styles the cards and adds hover depth, a speaking ring, and a waveform pulse driven by live voice state. The host's screen-share player appears in the room stage when someone is sharing. The dock retains WebSpeak's trusted voice-quality, audio, screen-share, and disconnect controls. The roster shows connected TeamSpeak clients only; it does not invent an offline list. Channel selection is single-click; joining is double-click. The narrow layout keeps the host's mobile controls available while retaining readable member tiles.
The single TeamSpeak voice-channel group in the left tree can collapse and expand like KOOK's voice group; the separate KOOK text-channel group remains outside this pass.
The design target is the voice-client portion of KOOK, as requested by the project owner. It does not include discovery, companion/party, event, store, advertising, administrator, or other service-operator pages. It does not add a KOOK account flow, direct messages, server administration, or channels absent from the connected TeamSpeak server.
## Reference access note
Binary file not shown.
+193 -143
View File
@@ -169,12 +169,19 @@
"args": {
"key": "chatopen"
}
},
"toggle-voice-group": {
"type": "ui.toggleState",
"args": {
"key": "voicegroupopen"
}
}
},
"state": {
"selectedchannel": "",
"message": "",
"chatopen": true
"chatopen": true,
"voicegroupopen": true
},
"root": {
"tag": "main",
@@ -328,171 +335,213 @@
},
"children": [
{
"tag": "h2",
"part": "section-label",
"tag": "button",
"part": "voice-channel-group-toggle",
"attributes": {
"type": "button",
"aria-expanded": "{{state.voicegroupopen}}",
"aria-label": "展开或收起语音分组 / Toggle voice group"
},
"events": {
"click": "toggle-voice-group"
},
"children": [
{
"text": "频道 / CHANNELS"
"tag": "span",
"part": "voice-group-chevron",
"attributes": {
"aria-hidden": "true"
},
"children": [
{
"text": "›"
}
]
},
{
"tag": "span",
"part": "voice-group-name",
"children": [
{
"text": "语音分组"
}
]
}
]
},
{
"tag": "div",
"part": "channel-item",
"repeat": {
"path": "session.channels",
"as": "channel"
"part": "voice-channel-list",
"when": {
"path": "state.voicegroupopen",
"equals": true
},
"children": [
{
"tag": "button",
"part": "channel-row",
"attributes": {
"type": "button",
"aria-current": "{{channel.current}}",
"aria-label": "双击加入 {{channel.name}}",
"data-depth": "{{channel.depth}}"
},
"events": {
"click": "select-channel",
"dblclick": "join-channel"
},
"tag": "div",
"part": "voice-channel-items",
"children": [
{
"tag": "span",
"part": "channel-glyph",
"children": [
{
"text": "◉"
}
]
},
{
"tag": "span",
"part": "channel-name",
"children": [
{
"text": "{{channel.name}}"
}
]
},
{
"tag": "small",
"part": "channel-count",
"children": [
{
"text": "{{channel.memberCount}}"
}
]
},
{
"tag": "span",
"part": "selected-channel-indicator",
"when": {
"path": "state.selectedchannel",
"equals": "{{channel.id}}"
},
"attributes": {
"aria-label": "当前频道"
}
}
]
},
{
"tag": "ul",
"part": "channel-voice-members",
"when": {
"path": "channel.members",
"empty": false
},
"attributes": {
"aria-label": "此频道中的语音成员 / Voice members in this channel"
},
"children": [
{
"tag": "li",
"part": "channel-voice-member",
"tag": "div",
"part": "channel-item",
"repeat": {
"path": "channel.members",
"as": "voicemember"
"path": "session.channels",
"as": "channel"
},
"children": [
{
"tag": "span",
"part": "channel-member-avatar",
"tag": "button",
"part": "channel-row",
"attributes": {
"type": "button",
"aria-current": "{{channel.current}}",
"aria-label": "双击加入 {{channel.name}}",
"data-depth": "{{channel.depth}}"
},
"events": {
"click": "select-channel",
"dblclick": "join-channel"
},
"children": [
{
"text": "{{voicemember.avatarInitial}}"
"tag": "span",
"part": "channel-glyph",
"children": [
{
"text": "◉"
}
]
},
{
"tag": "span",
"part": "channel-name",
"children": [
{
"text": "{{channel.name}}"
}
]
},
{
"tag": "small",
"part": "channel-count",
"children": [
{
"text": "{{channel.memberCount}}"
}
]
},
{
"tag": "span",
"part": "selected-channel-indicator",
"when": {
"path": "state.selectedchannel",
"equals": "{{channel.id}}"
},
"attributes": {
"aria-label": "当前频道"
}
}
]
},
{
"tag": "span",
"part": "channel-member-name",
"children": [
{
"text": "{{voicemember.name}}"
}
]
},
{
"tag": "span",
"part": "channel-member-muted",
"tag": "ul",
"part": "channel-voice-members",
"when": {
"path": "voicemember.status",
"equals": "muted"
"path": "channel.members",
"empty": false
},
"attributes": {
"aria-label": "麦克风已静音"
"aria-label": "此频道中的语音成员 / Voice members in this channel"
},
"children": [
{
"text": "已静音"
}
]
},
{
"tag": "span",
"part": "channel-member-away",
"when": {
"path": "voicemember.status",
"equals": "away"
},
"attributes": {
"aria-label": "离开"
},
"children": [
{
"text": "离开中"
}
]
},
{
"tag": "span",
"part": "channel-member-state",
"when": {
"path": "voicemember.self",
"equals": true
},
"children": [
{
"text": "你"
}
]
},
{
"tag": "span",
"part": "channel-member-state",
"when": {
"path": "voicemember.speaking",
"equals": true
},
"attributes": {
"aria-label": "正在讲话"
},
"children": [
{
"text": "●"
"tag": "li",
"part": "channel-voice-member",
"repeat": {
"path": "channel.members",
"as": "voicemember"
},
"children": [
{
"tag": "span",
"part": "channel-member-avatar",
"children": [
{
"text": "{{voicemember.avatarInitial}}"
}
]
},
{
"tag": "span",
"part": "channel-member-name",
"children": [
{
"text": "{{voicemember.name}}"
}
]
},
{
"tag": "span",
"part": "channel-member-muted",
"when": {
"path": "voicemember.status",
"equals": "muted"
},
"attributes": {
"aria-label": "麦克风已静音"
},
"children": [
{
"text": "已静音"
}
]
},
{
"tag": "span",
"part": "channel-member-away",
"when": {
"path": "voicemember.status",
"equals": "away"
},
"attributes": {
"aria-label": "离开"
},
"children": [
{
"text": "离开中"
}
]
},
{
"tag": "span",
"part": "channel-member-state",
"when": {
"path": "voicemember.self",
"equals": true
},
"children": [
{
"text": "你"
}
]
},
{
"tag": "span",
"part": "channel-member-state",
"when": {
"path": "voicemember.speaking",
"equals": true
},
"attributes": {
"aria-label": "正在讲话"
},
"children": [
{
"text": "●"
}
]
}
]
}
]
}
@@ -916,12 +965,13 @@
]
}
]
}
],
"attributes": {
"data-chat-open": "{{state.chatopen}}"
}
}
],
"attributes": {
"data-chat-open": "{{state.chatopen}}",
"data-voice-group-open": "{{state.voicegroupopen}}"
}
}
}
]
}
+2 -2
View File
@@ -3,10 +3,10 @@
"packageType": "open-skin",
"id": "community.kaak-voice",
"name": "KAAK",
"version": "3.1.8",
"version": "3.1.9",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired voice workspace with collapsible current voice-channel chat, TeamSpeak profile cards, and animated speaker states.",
"description": "A KOOK-inspired voice workspace with collapsible voice groups and current voice-channel chat, TeamSpeak profile cards, and animated speaker states.",
"entry": "skin.css",
"components": "components.json",
"content": "content.json",
+68 -7
View File
@@ -363,14 +363,53 @@
white-space: nowrap;
}
[data-ws-plugin-part="kaak-workspace.server-subtitle"],
[data-ws-plugin-part="kaak-workspace.section-label"] {
[data-ws-plugin-part="kaak-workspace.server-subtitle"] {
color: var(--skin-kaak-dim);
font-size: 10px;
font-weight: 800;
letter-spacing: .08em;
}
[data-ws-plugin-part="kaak-workspace.voice-channel-group-toggle"] {
display: flex;
align-items: center;
gap: 7px;
min-height: 25px;
margin: 0 8px 7px;
padding: 0;
border: 0;
color: var(--skin-kaak-dim);
background: transparent;
font: inherit;
font-size: 10px;
font-weight: 800;
letter-spacing: .08em;
text-align: left;
cursor: pointer;
transition: color .16s ease, background-color .16s ease;
}
[data-ws-plugin-part="kaak-workspace.voice-channel-group-toggle"]:hover,
[data-ws-plugin-part="kaak-workspace.voice-channel-group-toggle"]:focus-visible {
color: var(--skin-kaak-text);
}
[data-ws-plugin-part="kaak-workspace.voice-group-chevron"] {
display: inline-grid;
place-items: center;
width: 12px;
color: var(--skin-kaak-muted);
font-size: 17px;
line-height: 1;
transition: transform .16s ease;
}
[data-ws-plugin-part="kaak-workspace"][data-voice-group-open="true"] [data-ws-plugin-part="kaak-workspace.voice-group-chevron"] {
transform: rotate(90deg);
}
[data-ws-plugin-part="kaak-workspace.voice-group-name"] { min-width: 0; }
[data-ws-plugin-part="kaak-workspace.channel-list"] {
display: flex;
flex-direction: column;
@@ -379,12 +418,22 @@
padding-top: 13px;
}
[data-ws-plugin-part="kaak-workspace.section-label"] { margin: 0 8px 7px; }
[data-ws-plugin-part="kaak-workspace.voice-channel-list"] {
display: flex;
flex-direction: column;
min-width: 0;
animation: kaak-voice-group-open .18s ease both;
}
[data-ws-plugin-part="kaak-workspace.voice-channel-items"] {
display: flex;
flex-direction: column;
min-width: 0;
}
@keyframes kaak-voice-group-open {
from { opacity: 0; transform: translateY(-3px); }
to { opacity: 1; transform: translateY(0); }
}
[data-ws-plugin-part="kaak-workspace.channel-row"] {
@@ -1133,8 +1182,7 @@
}
[data-ws-plugin-part="kaak-workspace.server-name"] { max-width: 60%; font-size: 11px; }
[data-ws-plugin-part="kaak-workspace.server-subtitle"],
[data-ws-plugin-part="kaak-workspace.channel-list"] > [data-ws-plugin-part="kaak-workspace.section-label"] { display: none; }
[data-ws-plugin-part="kaak-workspace.server-subtitle"] { display: none; }
[data-ws-plugin-part="kaak-workspace.channel-list"] {
flex-direction: row;
align-items: center;
@@ -1142,11 +1190,24 @@
overflow: auto hidden;
padding: 0;
}
[data-ws-plugin-part="kaak-workspace.channel-list"] > [data-ws-plugin-part="kaak-workspace.voice-channel-group-toggle"] {
display: grid;
flex: 0 0 30px;
place-items: center;
width: 30px;
min-height: 38px;
margin: 0;
border-radius: 7px;
background: var(--skin-kaak-raised);
}
[data-ws-plugin-part="kaak-workspace.voice-group-name"] { display: none; }
[data-ws-plugin-part="kaak-workspace.voice-group-chevron"] { width: auto; font-size: 20px; }
[data-ws-plugin-part="kaak-workspace"]:has([data-chat-open="false"]) {
grid-template-columns: 56px minmax(0, 1fr);
grid-template-rows: 50px 126px minmax(176px, 24dvh) 44px 74px;
}
[data-ws-plugin-part="kaak-workspace.voice-channel-list"] { flex: 0 0 auto; flex-direction: row; align-items: flex-start; gap: 5px; }
[data-ws-plugin-part="kaak-workspace.voice-channel-list"] { flex: 0 0 auto; }
[data-ws-plugin-part="kaak-workspace.voice-channel-items"] { flex-direction: row; align-items: flex-start; gap: 5px; }
[data-ws-plugin-part="kaak-workspace.channel-item"] { flex: 0 0 auto; }
[data-ws-plugin-part="kaak-workspace.channel-row"] { width: max-content; min-width: 116px; min-height: 42px; margin: 0; }
[data-ws-plugin-part="kaak-workspace.channel-row"][data-depth] { padding-inline-start: 9px; }