{ "schemaVersion": 3, "components": [ { "id": "kaak-home", "name": "KAAK connection home", "page": "home", "mode": "surface", "accessibleName": "KAAK 连接页 / Connection page", "permissions": [ "ui.surface.replace" ], "actions": {}, "root": { "tag": "main", "part": "home", "children": [ { "tag": "header", "part": "home-header", "children": [ { "tag": "span", "part": "brand-mark", "children": [ { "text": "K" } ] }, { "tag": "span", "part": "brand-name", "children": [ { "text": "KAAK" } ] }, { "widget": "app.language-switcher", "part": "language" }, { "widget": "app.skin-switcher", "part": "skin" } ] }, { "tag": "section", "part": "connection-card", "children": [ { "tag": "p", "part": "eyebrow", "children": [ { "text": "VOICE CLIENT / 语音客户端" } ] }, { "tag": "h1", "part": "title", "children": [ { "text": "连接你的语音社区" } ] }, { "tag": "p", "part": "description", "children": [ { "text": "选择 TeamSpeak 服务器,快速回到你的语音频道。" } ] }, { "widget": "home.connection-form", "part": "connection-form" } ] }, { "tag": "footer", "part": "home-footer", "children": [ { "text": "连接和身份信息由 WebSpeak 管理。" } ] } ] } }, { "id": "kaak-workspace", "name": "KAAK voice workspace", "page": "voice", "mode": "surface", "accessibleName": "KAAK 语音工作区 / Voice workspace", "stateScope": "session.status.channelId", "permissions": [ "ui.surface.replace", "session.status.read", "session.channels.read", "session.members.read", "session.memberAvatars.read", "session.channel.join", "servers.quickList.read", "servers.quickList.switch", "chat.channel.read", "chat.channel.send", "audio.status.read", "audio.microphone.control", "audio.output.control", "voice.whisper.status.read", "voice.whisper.control", "voice.disconnect", "voice.screenShare.status.read", "voice.screenShare.read", "voice.screenShare.control" ], "actions": { "switch-server": { "type": "quickServers.switch", "args": { "quickServerId": "{{server.id}}" } }, "send-message": { "type": "chat.sendMessage", "args": { "text": "{{state.message}}" } }, "disconnect": { "type": "voice.disconnect", "args": {} }, "stop-screen-share": { "type": "voice.stopScreenShare", "args": {} }, "whisper-on": { "type": "voice.setWhisperActive", "args": { "active": true } }, "whisper-off": { "type": "voice.setWhisperActive", "args": { "active": false } }, "toggle-chat-panel": { "type": "ui.toggleState", "args": { "key": "chatopen" } }, "toggle-voice-group": { "type": "ui.toggleState", "args": { "key": "voicegroupopen" } } }, "state": { "message": "", "chatopen": true, "voicegroupopen": true }, "root": { "tag": "main", "part": "workspace", "children": [ { "tag": "header", "part": "topbar", "children": [ { "tag": "span", "part": "brand-mark", "children": [ { "text": "K" } ] }, { "tag": "span", "part": "brand-name", "children": [ { "text": "KAAK" } ] }, { "tag": "span", "part": "server-title", "children": [ { "text": "{{session.status.serverLabel}}" } ] }, { "widget": "app.language-switcher", "part": "language" }, { "widget": "app.skin-switcher", "part": "skin" } ] }, { "tag": "nav", "part": "server-rail", "attributes": { "aria-label": "收藏与历史服务器 / Favorites and history" }, "children": [ { "tag": "div", "part": "quick-server-item", "repeat": { "path": "servers.quickList", "as": "server" }, "children": [ { "tag": "button", "part": "quick-server", "attributes": { "type": "button", "aria-current": "{{server.current}}", "aria-label": "切换到 {{server.label}}" }, "events": { "click": "switch-server" }, "children": [ { "tag": "span", "part": "server-monogram", "attributes": { "data-tone": "{{server.tone}}" }, "children": [ { "tag": "img", "part": "server-icon", "when": { "path": "server.icon" }, "attributes": { "src": "{{server.icon}}", "alt": "" } }, { "tag": "span", "part": "server-monogram-initial", "when": { "path": "server.icon", "equals": "" }, "children": [ { "text": "{{server.monogram}}" } ] } ] }, { "tag": "span", "part": "server-kind", "when": { "path": "server.favorite", "equals": true }, "children": [ { "text": "收藏" } ] }, { "tag": "span", "part": "server-kind", "when": { "path": "server.kind", "equals": "recent" }, "children": [ { "text": "最近" } ] } ] } ] } ] }, { "tag": "aside", "part": "channel-panel", "attributes": { "aria-label": "服务器频道 / Server channels" }, "children": [ { "widget": "voice.server-header", "part": "server-summary" }, { "widget": "voice.server-banner", "part": "server-banner" }, { "tag": "nav", "part": "channel-list", "attributes": { "aria-label": "频道 / Channels" }, "children": [ { "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": [ { "tag": "span", "part": "voice-group-chevron", "attributes": { "aria-hidden": "true" }, "children": [ { "text": "›" } ] }, { "tag": "span", "part": "voice-group-name", "children": [ { "text": "语音分组" } ] } ] }, { "tag": "div", "part": "voice-channel-list", "children": [ { "tag": "div", "part": "voice-channel-items", "children": [ { "widget": "voice.channel-tree", "part": "voice-channel-tree", "options": { "layout": "server-sidebar", "memberActions": true, "memberDragDrop": true } } ] } ] } ] } ] }, { "tag": "section", "part": "conversation", "attributes": { "aria-label": "当前频道聊天 / Channel chat" }, "children": [ { "tag": "header", "part": "conversation-heading", "children": [ { "tag": "span", "part": "conversation-glyph", "children": [ { "text": "#" } ], "when": { "path": "state.chatopen", "equals": true } }, { "tag": "h1", "part": "channel-title", "children": [ { "text": "{{session.status.channelName}}" } ], "when": { "path": "state.chatopen", "equals": true } }, { "tag": "button", "part": "chat-panel-toggle", "attributes": { "type": "button", "aria-expanded": "{{state.chatopen}}", "aria-label": "收起或展开当前语音频道文字聊天 / Toggle current voice channel chat" }, "events": { "click": "toggle-chat-panel" }, "children": [ { "tag": "span", "part": "chat-panel-chevron", "when": { "path": "state.chatopen", "equals": true }, "children": [ { "text": "×" } ] }, { "tag": "span", "part": "chat-panel-chevron", "when": { "path": "state.chatopen", "equals": false }, "children": [ { "text": "‹" } ] } ] } ] }, { "tag": "div", "part": "chat", "children": [ { "tag": "div", "part": "chat-message-list", "attributes": { "aria-label": "当前频道消息 / Channel messages", "role": "log", "aria-live": "polite" }, "children": [ { "tag": "p", "part": "chat-empty", "when": { "path": "chat.messages", "empty": true }, "children": [ { "text": "还没有消息,向频道打个招呼吧。" } ] }, { "tag": "article", "part": "chat-message", "repeat": { "path": "chat.messages", "as": "message" }, "children": [ { "tag": "span", "part": "chat-message-avatar", "attributes": { "aria-hidden": "true" }, "children": [ { "text": "{{message.author}}" } ] }, { "tag": "div", "part": "chat-message-body", "attributes": { "data-kind": "{{message.kind}}" }, "children": [ { "tag": "header", "part": "chat-message-heading", "children": [ { "tag": "strong", "part": "chat-message-author", "children": [ { "text": "{{message.author}}" } ] }, { "tag": "time", "part": "chat-message-time", "children": [ { "text": "{{message.time}}" } ] } ] }, { "tag": "p", "part": "chat-message-text", "children": [ { "text": "{{message.text}}" } ] } ] } ] } ] }, { "tag": "form", "part": "chat-composer", "events": { "submit": "send-message" }, "children": [ { "tag": "input", "part": "chat-input", "bindValue": "message", "attributes": { "type": "text", "maxlength": 1000, "autocomplete": "off", "placeholder": "给 #{{session.status.channelName}} 发消息", "aria-label": "给 #{{session.status.channelName}} 发消息" } }, { "tag": "button", "part": "chat-send", "attributes": { "type": "submit", "aria-label": "发送消息" }, "children": [ { "text": "发送" } ] } ] } ], "when": { "path": "state.chatopen", "equals": true } } ] }, { "tag": "aside", "part": "voice-stage", "attributes": { "aria-label": "语音房间 / Voice room" }, "children": [ { "tag": "div", "part": "voice-stage-heading-item", "repeat": { "path": "session.channels", "as": "stagechannel" }, "children": [ { "tag": "header", "part": "voice-stage-heading", "when": { "path": "stagechannel.current", "equals": true }, "children": [ { "tag": "span", "part": "voice-stage-glyph", "attributes": { "aria-hidden": "true" }, "children": [ { "text": "🔊︎" } ] }, { "tag": "h2", "part": "voice-stage-title", "children": [ { "text": "{{stagechannel.name}}" } ] }, { "tag": "span", "part": "voice-stage-member-count", "attributes": { "aria-label": "频道成员数 / Channel member count" }, "children": [ { "text": "{{stagechannel.memberCountLabel}}" }, { "tag": "span", "part": "voice-stage-capacity", "when": { "path": "stagechannel.maxClientsLimited", "equals": true }, "children": [ { "text": "/{{stagechannel.maxClients}}" } ] } ] }, { "tag": "button", "part": "chat-panel-expand", "when": { "path": "state.chatopen", "equals": false }, "attributes": { "type": "button", "aria-expanded": "{{state.chatopen}}", "aria-label": "展开当前语音频道文字聊天 / Expand current voice channel chat" }, "events": { "click": "toggle-chat-panel" }, "children": [ { "text": "#" } ] } ] } ] }, { "widget": "voice.screen-share-player", "part": "screen-share-player" }, { "widget": "voice.member-cards", "part": "member-cards", "options": { "screenShare": true, "memberActions": true } }, { "tag": "div", "part": "whisper-controls", "children": [ { "tag": "button", "part": "whisper-start", "when": { "path": "whisper.status.active", "equals": false }, "attributes": { "type": "button", "aria-label": "开始悄悄话" }, "events": { "click": "whisper-on" }, "children": [ { "text": "悄悄话" } ] }, { "tag": "button", "part": "whisper-stop", "when": { "path": "whisper.status.active", "equals": true }, "attributes": { "type": "button", "aria-label": "停止悄悄话" }, "events": { "click": "whisper-off" }, "children": [ { "text": "悄悄话中" } ] } ] } ] }, { "tag": "footer", "part": "voice-dock", "attributes": { "aria-label": "语音控制 / Voice controls" }, "children": [ { "tag": "div", "part": "voice-dock-heading", "children": [ { "tag": "span", "part": "connection-indicator", "children": [ { "text": "●" } ] }, { "tag": "strong", "part": "voice-channel-name", "children": [ { "text": "{{session.status.channelName}}" } ] }, { "widget": "voice.performance-panel", "part": "performance-panel", "options": { "screenShare": false } }, { "tag": "button", "part": "disconnect-control", "attributes": { "type": "button", "aria-label": "断开语音" }, "events": { "click": "disconnect" }, "children": [ { "text": "离开" } ] } ] }, { "tag": "div", "part": "voice-dock-actions", "children": [ { "tag": "div", "part": "voice-dock-share", "children": [ { "widget": "voice.screen-share-start", "part": "screen-share-start", "when": { "path": "screenShare.status.active", "equals": false } }, { "tag": "button", "part": "screen-share-stop", "when": { "path": "screenShare.status.active", "equals": true }, "attributes": { "type": "button", "aria-label": "停止屏幕共享" }, "events": { "click": "stop-screen-share" }, "children": [ { "text": "停止屏幕共享" } ] } ] }, { "widget": "voice.audio-controls", "part": "audio-controls", "options": { "layout": "room-panel" } } ] } ] }, { "tag": "div", "part": "identity-entry", "when": { "path": "session.status.userName" }, "attributes": { "role": "group", "aria-label": "当前 TeamSpeak 身份" }, "children": [ { "tag": "span", "part": "identity-monogram", "children": [ { "text": "TS" }, { "tag": "span", "part": "identity-online", "when": { "path": "session.status.connected", "equals": true }, "attributes": { "role": "img", "aria-label": "在线" } } ] }, { "tag": "span", "part": "identity-name", "children": [ { "text": "{{session.status.userName}}" } ] } ] } ], "attributes": { "data-chat-open": "{{state.chatopen}}", "data-voice-group-open": "{{state.voicegroupopen}}" } } } ] }