{ "schemaVersion": 3, "components": [ { "id": "kaak-home", "name": "KAAK connection home", "page": "home", "mode": "surface", "accessibleName": "KAAK 连接页 / Connection page", "permissions": [ "ui.surface.replace", "session.status.read" ], "actions": {}, "root": { "tag": "main", "part": "home", "children": [ { "tag": "section", "part": "hero", "children": [ { "tag": "div", "part": "brand", "children": [ { "tag": "span", "part": "logo", "children": [ { "text": "W" } ] }, { "tag": "span", "part": "brand-name", "children": [ { "text": "WebSpeak" } ] } ] }, { "tag": "p", "part": "slogan", "children": [ { "text": "YOUR VOICE, EVERYWHERE." } ] }, { "tag": "div", "part": "hero-media", "children": [ { "tag": "svg", "part": "illustration", "attributes": { "viewbox": "0 0 550 510", "role": "img", "aria-label": "WebSpeak 展示插画" }, "children": [ { "tag": "rect", "attributes": { "x": 45, "y": 65, "width": 460, "height": 400, "rx": 80, "fill": "#b0f49b" } }, { "tag": "rect", "attributes": { "x": 90, "y": 145, "width": 370, "height": 275, "rx": 28, "fill": "#223641" } }, { "tag": "rect", "attributes": { "x": 103, "y": 157, "width": 344, "height": 250, "rx": 18, "fill": "#f7fff7" } }, { "tag": "rect", "attributes": { "x": 103, "y": 157, "width": 344, "height": 45, "rx": 18, "fill": "#e4f5e6" } }, { "tag": "circle", "attributes": { "cx": 128, "cy": 178, "r": 6, "fill": "#82cd62" } }, { "tag": "circle", "attributes": { "cx": 149, "cy": 178, "r": 6, "fill": "#c2e3b2" } }, { "tag": "rect", "attributes": { "x": 135, "y": 236, "width": 135, "height": 14, "rx": 7, "fill": "#acdca6" } }, { "tag": "rect", "attributes": { "x": 135, "y": 265, "width": 100, "height": 12, "rx": 6, "fill": "#d6e8d8" } }, { "tag": "rect", "attributes": { "x": 135, "y": 292, "width": 110, "height": 12, "rx": 6, "fill": "#d6e8d8" } }, { "tag": "circle", "attributes": { "cx": 348, "cy": 287, "r": 54, "fill": "#7dcf4b" } }, { "tag": "path", "attributes": { "d": "M319 287v-10a29 29 0 0 1 58 0v10", "stroke": "white", "stroke-width": 10, "fill": "none", "stroke-linecap": "round" } }, { "tag": "rect", "attributes": { "x": 311, "y": 279, "width": 17, "height": 32, "rx": 8, "fill": "white" } }, { "tag": "rect", "attributes": { "x": 369, "y": 279, "width": 17, "height": 32, "rx": 8, "fill": "white" } }, { "tag": "rect", "attributes": { "x": 255, "y": 417, "width": 143, "height": 13, "rx": 6, "fill": "#233641" } }, { "tag": "circle", "attributes": { "cx": 77, "cy": 348, "r": 39, "fill": "#55c3cf" } }, { "tag": "path", "attributes": { "d": "M58 342h12l14-12v37l-14-12H58z", "fill": "white" } }, { "tag": "path", "attributes": { "d": "M92 340q12 12 0 25", "stroke": "white", "stroke-width": 5, "fill": "none" } }, { "tag": "circle", "attributes": { "cx": 457, "cy": 100, "r": 18, "fill": "#ff9b70" } }, { "tag": "path", "attributes": { "d": "M454 75v-23M478 76l15-14", "stroke": "#ff9b70", "stroke-width": 9, "fill": "none", "stroke-linecap": "round" } } ] } ] } ] }, { "tag": "section", "part": "right", "children": [ { "tag": "div", "part": "content", "children": [ { "tag": "h1", "part": "welcome-title", "children": [ { "text": "欢迎来到 WebSpeak" } ] }, { "tag": "section", "part": "connection-card", "children": [ { "tag": "div", "part": "card-heading", "children": [ { "tag": "h2", "part": "connection-title", "children": [ { "text": "连接 TeamSpeak 服务器" } ] }, { "widget": "home.myts-login", "part": "myts-login" } ] }, { "tag": "p", "part": "description", "children": [ { "text": "无需注册账号,填写服务器信息即可加入语音" } ] }, { "widget": "home.connection-form", "part": "connection-form" }, { "tag": "p", "part": "note", "children": [ { "text": "浏览器直连 · 无需安装 TeamSpeak 客户端" } ] }, { "widget": "home.connection-status", "part": "status" } ] } ] } ] }, { "widget": "app.language-switcher", "part": "home-language" } ] } }, { "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": "nav", "part": "server-rail", "attributes": { "aria-label": "收藏与历史服务器 / Favorites and history" }, "children": [ { "tag": "div", "part": "server-list", "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": "最近" } ] } ] } ] } ] }, { "widget": "app.skin-switcher", "part": "rail-skin" }, { "widget": "app.language-switcher", "part": "rail-language" } ] }, { "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}}" } } } ] }