diff --git a/docs/KAAK-CLONE-WORKLOG.zh-CN.md b/docs/KAAK-CLONE-WORKLOG.zh-CN.md index a1f7d5c..4ac6f4f 100644 --- a/docs/KAAK-CLONE-WORKLOG.zh-CN.md +++ b/docs/KAAK-CLONE-WORKLOG.zh-CN.md @@ -641,3 +641,46 @@ - open 模式沿用现有添加对话框,保存收藏后连接新目标。fixed 模式点击加号只显示“该功能已被管理员关闭”,不会打开表单、保存收藏或连接;固定目标策略仍由服务端执行,未放宽。 - fixed 模式下收藏服务器入口保留可点击事件并以禁用态样式呈现;点击其他服务器的快速入口(通用侧栏、窄屏栏、服务器切换器及皮肤服务器轨道)显示“管理员不允许切换TS服务器”。 - 验证:服务器轨道注入、可信点击、受限状态无原生禁用、指定中文提示、受限数据投影和 KAAK 分发包定向测试通过(78/78);`npm run verify` 全部通过(698/698 测试、服务端 TypeScript、前端类型检查与 Vite 生产构建);`git diff --check` 通过。 + +## 本轮 KAAK 首页与 myTS 按钮(2026-10-12) + +- 用户提供首页示例,要求 KAAK 首页按示例改造。首页采用左右分栏、绿色品牌展示区和白色服务器连接卡片,沿用宿主原有连接表单、密码处理、身份和中继选择逻辑,并由宿主显示真实连接状态;窄屏自动纵向排列。 +- 连接卡片右上绿色装饰区新增“使用myts登录”按钮和 `myts` 字样,仅点击时提示“这个功能还在开发中”,不实现或调用 myTS 登录。 +- KAAK 升至 3.1.80,重建示例皮肤和内置分发包。 +- 验证:定向皮肤测试 51/51 通过;完整 `npm run verify` 通过(701/701 测试、服务端 TypeScript 构建、前端 Vue 类型检查与 Vite 生产构建);3040 的健康接口、首页和 WebClient JS 均返回 HTTP 200,服务端 JS 字节数与本地构建一致,包含按钮和提示文案;示例与内置 KAAK 包完全一致,版本 3.1.80。 + +### myTS 入口按截图收紧 + +- 用户要求移除卡片上的胶囊按钮外观,将 `myts` 字样完全放进右上角绿色三角,并倾斜显示。 +- 去掉按钮底色、边框和额外徽标;保留该区域的无底色键盘可达按钮与“使用myts登录”无障碍名称,点击仍提示“这个功能还在开发中”。文字向左上倾斜 45° 并裁切在绿色角内。 +- KAAK 升至 3.1.81;定向皮肤测试 51/51、完整 `npm run verify`(701/701 测试、服务端构建、前端类型检查与生产构建)通过,`git diff --check` 通过。3040 首页、健康接口、WebClient JS 与皮肤包均返回 HTTP 200;3040 上的皮肤包字节与源包一致。 + +### 首页表单收尾(2026-10-12) + +- 按用户截图将右上角 `myts` 文字改为顺时针旋转 45°。 +- KAAK 首页服务器密码框改为白底浅色样式,并覆盖浏览器自动填充背景和文字色,避免保存密码时出现黑边或蓝底。 +- 将“目标频道”字段移出“设备身份选项”折叠区;身份记忆、导入和导出仍留在折叠区内。 +- KAAK 升至 3.1.82。定向皮肤测试 51/51、完整 `npm run verify`(701/701 测试、服务端构建、前端类型检查与生产构建)通过,`git diff --check` 通过。3040 健康接口、首页和 WebClient JS 返回 HTTP 200;3040 皮肤包与本地分发包 SHA-256 一致。 + +### 服务器密码弹窗改为浅色(2026-10-12) + +- 用户要求将服务器密码弹窗从深色改为浅色。服务器密码弹窗新增明确的公开状态标记,KAAK 仅对服务器密码弹窗应用白色卡片、浅色输入框、深色文字和匹配的取消/关闭悬停样式;频道密码弹窗继续保留深色方案,绿色“确定”按钮和原有密码重试逻辑不变。 +- KAAK 升至 3.1.83;定向皮肤测试 51/51、完整 `npm run verify`(701/701 测试、服务端构建、前端类型检查与生产构建)通过。3040 健康接口、首页和 WebClient JS 返回 HTTP 200,分发包与本地构建一致。 + +### 语音页工具移入左侧导航栏(2026-10-12) + +- 移除 KAAK 语音页顶栏,将服务器列表改为独立滚动;左侧服务器栏底部固定显示宿主提供的加号、皮肤切换和语言切换工具,并以分隔线与服务器列表隔开。 +- 语言按钮沿用宿主现有语言选项、切换和保存逻辑,按钮视觉标签为“文/A”;语言菜单和皮肤菜单都从工具方块旁弹出,并在较矮窗口中调整位置。 +- KAAK 升至 3.1.85;`npm run skin:kaak:build` 与完整 `npm run verify` 通过(701/701 测试、服务端 TypeScript、前端类型检查和 Vite 生产构建),`git diff --check` 通过。3040 健康接口、首页、WebClient JS 和 KAAK 皮肤包均返回 HTTP 200;服务器皮肤包 SHA-256 与本地一致。 + +### 频道树成员屏幕共享标记(2026-10-12) + +- 频道树成员正在共享时,在成员行末尾显示带绿色底色的显示器图标;状态由 WebSpeak 当前活跃共享流的成员归属驱动,普通成员不显示。覆盖常规与 KAAK 侧栏两种频道树布局,保留成员右键菜单及拖放行为。 +- 将新标记纳入公开皮肤部件注册表和皮肤开发文档,标记自带通用样式,因此内置和自定义皮肤都可见。 +- 屏幕共享 UI 定向测试 10/10 通过;完整 `npm run verify` 通过(702/702 测试、服务端构建、前端类型检查与生产构建);`git diff --check` 通过。3040 健康接口、首页、新版 WebClient JS/CSS 均返回 HTTP 200,生产资源含共享标记和绿色样式。 + +### KAAK 语言切换入口使用翻译图标(2026-10-12) + +- 用户要求把 KAAK 语音页左侧栏语言入口改为截图中的翻译图标,并在连接首页右上角增加同款入口,方便其他语言用户切换界面。 +- 沿用 WebSpeak 已有语言菜单、选择事件和语言偏好保存逻辑;只在 KAAK 皮肤中显示纯翻译符号,不使用参考图的青绿色背景。侧栏沿用深灰工具块,首页在右上角提供中性色按钮。通用语言控件默认继续隐藏该图标,其他皮肤不受视觉影响。 +- KAAK 升至 3.1.86;`npm run skin:kaak:build` 和完整 `npm run verify` 通过(702/702 测试、服务端构建、前端类型检查与 Vite 生产构建),`git diff --check` 通过。3040 健康接口、首页、WebClient JS/CSS 和新版皮肤包均返回 HTTP 200;3040 皮肤包与本地分发包 SHA-256 一致。 diff --git a/docs/SKIN_DEVELOPMENT.md b/docs/SKIN_DEVELOPMENT.md index 4f92bc6..9fad66f 100644 --- a/docs/SKIN_DEVELOPMENT.md +++ b/docs/SKIN_DEVELOPMENT.md @@ -271,7 +271,7 @@ widget 的可选 `mount` 只接受这些公开锚点:`home.header.after`、`ho | 通用 | `app`、`app.toast`、`control`、`skin.trigger`、`skin.menu`、`skin.option`、`language.trigger`、`language.menu`、`language.option` | | 首页 | `home`、`home.header`、`home.brand`、`home.header-tools`、`home.gateway-status`、`home.content`、`home.hero`、`home.hero.eyebrow`、`home.hero.title`、`home.hero.description`、`home.features`、`home.feature`、`home.visitors`、`home.join-card`、`home.join-card.waveform`、`home.join-card.sonar`、`home.join-title`、`home.join-description`、`home.notice`、`home.form`、`home.server-target`、`home.field-label`、`home.field`、`home.relay-choice`、`home.relay-choice.copy`、`home.server-history`、`home.server-history.group`、`home.server-history.item`、`home.server-history.select`、`home.server-history.favorite-toggle`、`home.favorite-toggle`、`home.identity`、`home.identity-actions`、`home.identity-import.open`、`home.identity-export.button`、`home.identity-import-dialog`、`home.identity-import.header`、`home.identity-import.close`、`home.identity-import.textarea`、`home.identity-import.drop-zone`、`home.identity-import.file-button`、`home.identity-import.error`、`home.identity-import.security`、`home.identity-import.footer`、`home.identity-import.cancel`、`home.identity-import.submit`、`home.connect`、`home.security-note`、`home.footer`、`home.community-dialog` | | 语音工作区 | `voice.shell`、`voice.workspace`、`voice.header`、`voice.header-actions`、`voice.breadcrumbs`、`voice.performance`、`voice.performance.panel`、`voice.performance.route`、`voice.performance.metrics`、`voice.performance.status`、`voice.performance.webrtc-stats`、`voice.connection-status`、`voice.audio-status`、`voice.poke`、`voice.scroll`、`voice.content`、`voice.activity`、`voice.activity.artwork`、`voice.activity-heading`、`voice.screen-share-error`、`voice.members`、`voice.members.empty`、`voice.member`、`voice.member.action-trigger`、`voice.member.avatar-wrap`、`voice.member.avatar`、`voice.member.mic-status`、`voice.member.name`、`voice.member.status`、`voice.member.live-indicator`、`voice.member.stop-share`、`voice.member.share-actions`、`voice.member-panel`、`voice.member-panel.heading`、`voice.member-panel.search`、`voice.member-panel.channels`、`voice.channel-group`、`voice.channel-group.heading`、`voice.channel-group.members`、`voice.member-row`、`voice.member-row.avatar`、`voice.member-row.copy`、`voice.member-row.flags`、`voice.member-row.volume`、`voice.whisper-strip`、`voice.audio-dock`、`voice.audio-dock.microphone`、`voice.audio-dock.microphone-panel`、`voice.audio-dock.output`、`voice.audio-dock.output-panel`、`voice.audio-settings`、`voice.audio-settings.device-select`、`voice.audio-settings.device-select-trigger`、`voice.audio-settings.device-select-chevron`、`voice.audio-settings.device-select-menu`、`voice.audio-settings.device-select-option`、`voice.mobile-more`、`voice.mobile-nav` | -| KOOK 频道树与服务器切换 | `voice.server-switcher`、`voice.server-switcher.trigger`、`voice.server-switcher.menu`、`voice.server-switcher.item`、`voice.server-switcher.icon`、`voice.server-switcher.label`、`voice.server-switcher.current`、`voice.server-switcher.empty`、`voice.channel-tree.list`、`voice.channel-tree.empty`、`voice.channel-tree.node`、`voice.channel-tree.line`、`voice.channel-tree.expander`、`voice.channel-tree.row`、`voice.channel-tree.icon`、`voice.channel-tree.join-hint`、`voice.channel-tree.name`、`voice.channel-tree.count`、`voice.channel-tree.branch`、`voice.channel-tree.member`、`voice.channel-tree.avatar`、`voice.channel-tree.member-name`、`voice.channel-tree.member-muted`、`voice.channel-tree.member-speaking`、`voice.channel-tree.member-away` | +| KOOK 频道树与服务器切换 | `voice.server-switcher`、`voice.server-switcher.trigger`、`voice.server-switcher.menu`、`voice.server-switcher.item`、`voice.server-switcher.icon`、`voice.server-switcher.label`、`voice.server-switcher.current`、`voice.server-switcher.empty`、`voice.channel-tree.list`、`voice.channel-tree.empty`、`voice.channel-tree.node`、`voice.channel-tree.line`、`voice.channel-tree.expander`、`voice.channel-tree.row`、`voice.channel-tree.icon`、`voice.channel-tree.join-hint`、`voice.channel-tree.name`、`voice.channel-tree.count`、`voice.channel-tree.branch`、`voice.channel-tree.member`、`voice.channel-tree.avatar`、`voice.channel-tree.member-name`、`voice.channel-tree.member-muted`、`voice.channel-tree.member-screen-share`、`voice.channel-tree.member-speaking`、`voice.channel-tree.member-away` | | 快速服务器 | `voice.favorite-servers.rail`、`voice.favorite-servers.rail.list`、`voice.favorite-servers.rail.item`、`voice.favorite-servers.server`、`voice.favorite-servers.avatar`、`voice.favorite-servers.tooltip`、`voice.favorite-servers.favorite-toggle`、`voice.favorite-servers.add`、`voice.favorite-servers.strip`、`voice.favorite-servers.strip.item`、`voice.favorite-servers.strip.server`、`voice.favorite-servers.strip.favorite-toggle`、`voice.favorite-servers.strip.add`、`voice.favorite-servers.switch-status`、`voice.favorite-servers.current-toggle`、`voice.favorite-servers.dialog-backdrop`、`voice.favorite-servers.dialog`、`voice.favorite-servers.dialog.header`、`voice.favorite-servers.dialog.close`、`voice.favorite-servers.dialog.form`、`voice.favorite-servers.dialog.field`、`voice.favorite-servers.dialog.input`、`voice.favorite-servers.dialog.target`、`voice.favorite-servers.dialog.hint`、`voice.favorite-servers.dialog.actions`、`voice.favorite-servers.dialog.cancel`、`voice.favorite-servers.dialog.submit` | | 聊天与菜单 | `voice.chat`、`voice.chat.tabs`、`voice.chat.tab`、`voice.chat.heading`、`voice.chat.messages`、`voice.chat.event`、`voice.chat.message`、`voice.chat.message-avatar`、`voice.chat.message-body`、`voice.chat.message-bubble`、`voice.chat.empty`、`voice.chat.composer`、`voice.chat.status`、`voice.context-menu-backdrop`、`voice.context-menu`、`voice.context-menu.header`、`voice.context-menu.move-submenu` | | 屏幕共享 | `voice.screen-share-settings`、`voice.screen-share-settings.heading`、`voice.screen-share-settings.fields`、`voice.screen-share-settings.note`、`voice.screen-share-settings.actions`、`voice.screen-player`、`voice.screen-player.stage`、`voice.screen-player.video`、`voice.screen-player.placeholder`、`voice.screen-player.exit`、`voice.screen-player.viewers`、`voice.screen-player.viewer-avatar`、`voice.screen-player.live`、`voice.screen-player.source`、`voice.screen-player.controls`、`voice.screen-player.volume`、`voice.screen-player.fullscreen` | diff --git a/docs/examples/kaak-voice.wskin b/docs/examples/kaak-voice.wskin index fca47e0..11662b8 100644 Binary files a/docs/examples/kaak-voice.wskin and b/docs/examples/kaak-voice.wskin differ diff --git a/docs/examples/kaak-voice/components.json b/docs/examples/kaak-voice/components.json index 1635157..2800666 100644 --- a/docs/examples/kaak-voice/components.json +++ b/docs/examples/kaak-voice/components.json @@ -1,119 +1,365 @@ -{ - "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", +{ + "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", + "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", @@ -123,20 +369,20 @@ "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}}" - } - }, + ], + "actions": { + "switch-server": { + "type": "quickServers.switch", + "args": { + "quickServerId": "{{server.id}}" + } + }, + "send-message": { + "type": "chat.sendMessage", + "args": { + "text": "{{state.message}}" + } + }, "disconnect": { "type": "voice.disconnect", "args": {} @@ -145,180 +391,153 @@ "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": "" - } - }, + "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-initial", - "when": { - "path": "server.icon", - "equals": "" + "part": "server-monogram", + "attributes": { + "data-tone": "{{server.tone}}" }, "children": [ { - "text": "{{server.monogram}}" + "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": [ + }, + { + "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" @@ -329,54 +548,54 @@ }, { "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": "语音分组" - } - ] - } - ] - }, - { + "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": [ + "children": [ + { + "tag": "div", + "part": "voice-channel-items", + "children": [ { "widget": "voice.channel-tree", "part": "voice-channel-tree", @@ -386,294 +605,294 @@ "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": [ - { + ] + } + ] + } + ] + } + ] + }, + { + "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": "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}}" - } - ] - } + "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}}" + } + ] + } ] }, { @@ -697,10 +916,10 @@ } ] } - ] - } - ] - }, + ] + } + ] + }, { "widget": "voice.screen-share-player", "part": "screen-share-player" @@ -712,75 +931,75 @@ "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": "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", @@ -800,21 +1019,21 @@ { "tag": "button", "part": "disconnect-control", - "attributes": { - "type": "button", - "aria-label": "断开语音" - }, - "events": { - "click": "disconnect" - }, - "children": [ - { - "text": "离开" - } - ] - } - ] - }, + "attributes": { + "type": "button", + "aria-label": "断开语音" + }, + "events": { + "click": "disconnect" + }, + "children": [ + { + "text": "离开" + } + ] + } + ] + }, { "tag": "div", "part": "voice-dock-actions", @@ -860,27 +1079,27 @@ "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": "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", @@ -893,26 +1112,26 @@ "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}}" - } - } - } - ] -} + } + ] + }, + { + "tag": "span", + "part": "identity-name", + "children": [ + { + "text": "{{session.status.userName}}" + } + ] + } + ] + } + ], + "attributes": { + "data-chat-open": "{{state.chatopen}}", + "data-voice-group-open": "{{state.voicegroupopen}}" + } + } + } + ] +} diff --git a/docs/examples/kaak-voice/manifest.json b/docs/examples/kaak-voice/manifest.json index e1e6172..d92a76f 100644 --- a/docs/examples/kaak-voice/manifest.json +++ b/docs/examples/kaak-voice/manifest.json @@ -3,10 +3,10 @@ "packageType": "open-skin", "id": "community.kaak-voice", "name": "KAAK", - "version": "3.1.79", + "version": "3.1.86", "author": "WebSpeak Project", "license": "AGPL-3.0-only", - "description": "A KOOK-inspired voice workspace with a searchable server header, TeamSpeak banner and welcome message, nested channel members, attached channel chat, and a compact WebSpeak audio dock.", + "description": "A KOOK-inspired WebSpeak skin with a split-screen connection home, searchable server header, TeamSpeak banner, nested channel members, attached channel chat, and a compact audio dock.", "entry": "skin.css", "components": "components.json", "content": "content.json", diff --git a/docs/examples/kaak-voice/skin.css b/docs/examples/kaak-voice/skin.css index 18c5e4f..a3d7c6e 100644 --- a/docs/examples/kaak-voice/skin.css +++ b/docs/examples/kaak-voice/skin.css @@ -16,103 +16,466 @@ --skin-kaak-font: "PingFang SC", "Microsoft YaHei New", 微软雅黑, "Microsoft Yahei", "Microsoft JhengHei", 宋体, SimSun, "Helvetica Neue", Helvetica, Arial, sans-serif; } -[data-ws-plugin-part="kaak-home"] { - display: grid; - grid-template-rows: auto 1fr auto; - justify-items: center; - min-height: 100dvh; - gap: 28px; - padding: clamp(16px, 4vw, 42px); - color: var(--skin-kaak-text); - font-family: var(--skin-kaak-font); - background: - radial-gradient(ellipse at 50% 44%, #25272b 0, transparent 58%), - var(--skin-kaak-bg); -} - -[data-ws-plugin-part="kaak-home.home-header"] { - display: flex; - align-items: center; - gap: 11px; - width: min(100%, 1080px); -} - -[data-ws-plugin-part="kaak-home.brand-mark"], -[data-ws-plugin-part="kaak-workspace.brand-mark"] { - display: grid; - place-items: center; - flex: 0 0 34px; - width: 34px; - height: 34px; - border-radius: 50%; - color: #101512; - background: var(--skin-kaak-accent); - font-size: 14px; - font-weight: 900; -} - -[data-ws-plugin-part="kaak-home.brand-name"], -[data-ws-plugin-part="kaak-workspace.brand-name"] { - color: var(--skin-kaak-text); - font-size: 12px; - font-weight: 850; - letter-spacing: .1em; -} - -[data-ws-plugin-part="kaak-home.language"] { margin-left: auto; } - -[data-ws-plugin-part="kaak-home.connection-card"] { - align-self: center; - width: min(100%, 510px); - padding: clamp(22px, 5vw, 40px); - border: 1px solid var(--skin-kaak-border); - border-radius: 16px; - background: color-mix(in srgb, var(--skin-kaak-panel) 96%, transparent); - box-shadow: 0 24px 70px #0007; -} - -[data-ws-plugin-part="kaak-home.eyebrow"] { - color: var(--skin-kaak-accent); - font-size: 10px; - font-weight: 800; - letter-spacing: .14em; -} - -[data-ws-plugin-part="kaak-home.title"] { - margin: 12px 0 8px; - font-size: clamp(26px, 5vw, 38px); - letter-spacing: -.04em; -} - -[data-ws-plugin-part="kaak-home.description"], -[data-ws-plugin-part="kaak-home.home-footer"] { - color: var(--skin-kaak-muted); - line-height: 1.6; -} - -[data-ws-plugin-part="kaak-home.home-footer"] { - width: min(100%, 1080px); - font-size: 12px; -} - -[data-ws-plugin-part="kaak-home"] .join-card { - color: var(--skin-kaak-text); - background: transparent; - border-color: var(--skin-kaak-border); - box-shadow: none; -} - -[data-ws-plugin-part="kaak-home"] .field-wrap, -[data-ws-plugin-part="kaak-home"] .settings-select { - color: var(--skin-kaak-muted); - background: var(--skin-kaak-raised); - border-color: var(--skin-kaak-border); -} - -[data-ws-plugin-part="kaak-home"] .field-wrap input, -[data-ws-plugin-part="kaak-home"] .settings-select { - color: var(--skin-kaak-text); -} +[data-ws-plugin-part="kaak-home"] { + --skin-kaak-home-green: #77cb25; + --skin-kaak-home-text: #273248; + --skin-kaak-home-muted: #8995a5; + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + min-height: 100vh; + min-height: 100dvh; + color: var(--skin-kaak-home-text); + color-scheme: light; + font-family: Arial, "Microsoft YaHei", sans-serif; + background: #effff0; +} + +[data-ws-plugin-part="kaak-home.home-language"] { + position: fixed; + z-index: 120; + top: 18px; + right: 18px; + width: 48px; + height: 48px; +} + +[data-ws-plugin-part="kaak-home.home-language"] .language-switcher { + width: 100%; + height: 100%; +} + +[data-ws-plugin-part="kaak-home.home-language"] .language-trigger { + display: grid; + box-sizing: border-box; + width: 48px; + min-width: 48px; + height: 48px; + min-height: 48px; + place-items: center; + padding: 0; + border: 1px solid #dce4dc; + border-radius: 14px; + color: #273248; + background: #fff; + box-shadow: 0 5px 14px rgba(39, 50, 72, .1); +} + +[data-ws-plugin-part="kaak-home.home-language"] .language-trigger > * { + display: none; +} + +[data-ws-plugin-part="kaak-home.home-language"] .language-trigger > .language-current-icon { + display: block; + width: 24px; + height: 24px; +} + +[data-ws-plugin-part="kaak-home.home-language"] .language-trigger:hover, +[data-ws-plugin-part="kaak-home.home-language"] .language-switcher.open .language-trigger, +[data-ws-plugin-part="kaak-home.home-language"] .language-trigger:focus-visible { + color: #273248; + border-color: #c8d1c8; + background: #f4f6f3; + box-shadow: 0 7px 18px rgba(39, 50, 72, .14); +} + +[data-ws-plugin-part="kaak-home.hero"] { + position: relative; + min-height: 600px; + overflow: hidden; + background: linear-gradient(145deg, #f7ffbd, #d9ffb3 55%, #b7f89e); +} + +[data-ws-plugin-part="kaak-home.hero"]::before { + position: absolute; + top: -130px; + right: -80px; + width: 330px; + height: 250px; + border-radius: 50%; + background: #effff0; + content: ""; +} + +[data-ws-plugin-part="kaak-home.hero"]::after { + position: absolute; + bottom: -320px; + left: -120px; + width: 420px; + height: 420px; + border-radius: 50%; + background: #a4f18b; + content: ""; +} + +[data-ws-plugin-part="kaak-home.brand"] { + position: relative; + z-index: 2; + display: flex; + align-items: center; + gap: 10px; + margin: 35px 0 0 44px; + color: #1c2823; + font-size: 26px; + font-weight: 900; +} + +[data-ws-plugin-part="kaak-home.logo"] { + display: grid; + flex: 0 0 40px; + place-items: center; + width: 40px; + height: 40px; + border-radius: 10px; + color: #daff97; + background: #1c2823; + font-size: 19px; + font-weight: 900; +} + +[data-ws-plugin-part="kaak-home.brand-name"] { + color: #1c2823; + font-size: 26px; + font-weight: 900; + letter-spacing: 0; +} + +[data-ws-plugin-part="kaak-home.slogan"] { + position: relative; + z-index: 2; + margin: 12px 0 0 45px; + color: #627f5e; + font-size: 12px; + letter-spacing: 1.1px; +} + +[data-ws-plugin-part="kaak-home.hero-media"] { + position: absolute; + z-index: 1; + inset: 20% 6% 5%; + display: grid; + place-items: center; + overflow: hidden; + border-radius: 20px; +} + +[data-ws-plugin-part="kaak-home.illustration"] { + width: 100%; + height: 100%; + max-height: 100%; +} + +[data-ws-plugin-part="kaak-home.right"] { + display: flex; + align-items: center; + justify-content: center; + padding: 45px 28px; +} + +[data-ws-plugin-part="kaak-home.content"] { + width: min(100%, 440px); +} + +[data-ws-plugin-part="kaak-home.welcome-title"] { + margin: 0 0 28px; + text-align: center; + font-size: 34px; +} + +[data-ws-plugin-part="kaak-home.connection-card"] { + position: relative; + box-sizing: border-box; + width: 100%; + padding: 32px 25px 25px; + overflow: hidden; + border-radius: 17px; + background: #fff; + box-shadow: 0 5px 20px #273f3012; +} + +[data-ws-plugin-part="kaak-home.connection-card"]::before { + position: absolute; + top: 0; + right: 0; + border-top: 60px solid #79d02b; + border-left: 60px solid transparent; + content: ""; +} + +[data-ws-plugin-part="kaak-home.connection-title"] { + position: relative; + margin: 0 0 7px; + font-size: 19px; +} + +[data-ws-plugin-part="kaak-home.card-heading"] { + position: relative; + min-height: 26px; + margin-bottom: 7px; +} + +[data-ws-plugin-part="kaak-home.card-heading"] [data-ws-plugin-part="kaak-home.connection-title"] { + margin: 0; +} + +[data-ws-plugin-part="kaak-home.myts-login"] { + position: absolute; + z-index: 1; + top: -32px; + right: -25px; + width: 60px; + height: 60px; +} + +[data-ws-plugin-part="kaak-home.myts-login"] .kaak-myts-login { + position: relative; + display: block; + width: 60px; + height: 60px; + padding: 0; + overflow: hidden; + border: 0; + color: transparent; + background: transparent; + clip-path: polygon(0 0, 100% 0, 100% 100%); + cursor: pointer; +} + +[data-ws-plugin-part="kaak-home.myts-login"] .kaak-myts-wordmark { + position: absolute; + top: 11px; + right: 2px; + color: #fff; + font: 800 12px/1 Arial, sans-serif; + letter-spacing: -.04em; + white-space: nowrap; + transform: rotate(45deg); + transform-origin: center; + transition: filter .16s ease; +} + +[data-ws-plugin-part="kaak-home.myts-login"] .kaak-myts-login:hover .kaak-myts-wordmark { + filter: drop-shadow(0 0 2px #fff8); +} + +[data-ws-plugin-part="kaak-home.myts-login"] .kaak-myts-login:focus-visible .kaak-myts-wordmark { + filter: drop-shadow(0 0 3px #fff); +} + +[data-ws-plugin-part="kaak-home.description"] { + margin: 0 0 25px; + color: #9aa4b0; + font-size: 12px; +} + +[data-ws-plugin-part="kaak-home.connection-form"] { + width: 100%; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .join-form { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: 0; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-grid { + grid-template-columns: minmax(0, 1fr) 110px; + gap: 12px; + margin-bottom: 19px; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-label { + display: block; + margin: 0 0 8px; + color: var(--skin-kaak-home-muted); + font-size: 12px; + font-weight: 400; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-label:not(:first-child) { + margin-top: 0; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-label span { + color: #aab3bc; + font-weight: 400; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-wrap { + box-sizing: border-box; + display: flex; + height: 42px; + min-height: 42px; + gap: 0; + padding: 0 12px; + border: 1px solid #e3e8ec; + border-radius: 11px; + color: var(--skin-kaak-home-muted); + background: #fff; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-wrap > svg { + display: none; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-wrap:focus-within { + border-color: var(--skin-kaak-home-green); + color: var(--skin-kaak-home-text); + background: #fff; + box-shadow: 0 0 0 3px #79d02b22; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-wrap input { + box-sizing: border-box; + width: 100%; + min-width: 0; + height: 100%; + padding: 0; + color: var(--skin-kaak-home-text); + background: transparent; + font: inherit; + font-size: 13px; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .field-wrap input::placeholder { + color: #b6bec7; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .connect-button { + width: 100%; + height: 43px; + min-height: 43px; + margin-top: 5px; + border-radius: 10px; + color: #fff; + background: var(--skin-kaak-home-green); + font-size: 14px; + font-weight: 700; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .connect-button:hover:not(:disabled) { + background: #66b91d; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .connect-button:disabled { + opacity: .68; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .favorite-toggle, +[data-ws-plugin-part="kaak-home.connection-form"] .identity-options summary { + color: #627f5e; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .local-servers { + margin: 0 0 16px; + padding: 11px 12px; + border: 1px solid #e8eee6; + border-radius: 11px; + background: #f8fcf6; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .local-server-item { + border-color: #edf1ec; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .acceleration-choice { + margin: 0 0 15px; + color: var(--skin-kaak-home-muted); +} + +[data-ws-plugin-part="kaak-home.connection-form"] .acceleration-choice select { + color: var(--skin-kaak-home-text); + border-color: #e3e8ec; + background: #fff; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .identity-options { + margin: 9px 0 0; + color: var(--skin-kaak-home-muted); + font-size: 12px; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .identity-options summary { + width: fit-content; + cursor: pointer; +} + +[data-ws-plugin-part="kaak-home.connection-form"] .cancel-connect-button { + color: var(--skin-kaak-home-muted); +} + +[data-ws-plugin-part="kaak-home.connection-form"] .cancel-connect-button:hover { + color: #5ba91b; +} + +[data-ws-plugin-part="kaak-home.note"] { + margin: 16px 0 0; + color: #a2abb2; + text-align: center; + font-size: 12px; +} + +[data-ws-plugin-part="kaak-home.status"] { + margin: 0; + font-size: 12px; +} + +[data-ws-plugin-part="kaak-home.status"] .kaak-home-status { + margin: 12px 0 0; + color: #9a6b20; + text-align: center; + font-size: 12px; +} + +[data-ws-plugin-part="kaak-home.status"] .kaak-home-status:empty { + display: none; +} + +@media (max-width: 850px) { + [data-ws-plugin-part="kaak-home"] { + grid-template-columns: minmax(0, 1fr); + } + + [data-ws-plugin-part="kaak-home.hero"] { + min-height: 230px; + } + + [data-ws-plugin-part="kaak-home.brand"] { + margin: 22px 0 0 24px; + font-size: 22px; + } + + [data-ws-plugin-part="kaak-home.brand-name"] { + font-size: 22px; + } + + [data-ws-plugin-part="kaak-home.slogan"] { + margin-left: 25px; + } + + [data-ws-plugin-part="kaak-home.hero-media"] { + inset: 8% 4% 5% 46%; + } + + [data-ws-plugin-part="kaak-home.right"] { + padding: 32px 18px 48px; + } + + [data-ws-plugin-part="kaak-home.welcome-title"] { + font-size: 28px; + } +} + +@media (max-width: 430px) { + [data-ws-plugin-part="kaak-home.card-heading"] { + padding-top: 34px; + } + + [data-ws-plugin-part="kaak-home.myts-login"] { + top: -32px; + right: -25px; + } +} [data-ws-plugin-part="kaak-workspace"] { --skin-kaak-bg: #26272b; @@ -120,10 +483,10 @@ --skin-kaak-raised: #303136; --skin-kaak-hover: #393a40; --skin-kaak-border: #3a3b40; - position: relative; - display: grid; + position: relative; + display: grid; grid-template-columns: 86px 304px minmax(280px, 1fr) minmax(340px, min(38vw, 520px)); - grid-template-rows: 40px minmax(0, 1fr); + grid-template-rows: minmax(0, 1fr); width: 100%; height: 100dvh; min-height: 560px; @@ -183,43 +546,21 @@ [data-ws-plugin-part="kaak-workspace"] *::-webkit-scrollbar { width: 6px; height: 6px; } [data-ws-plugin-part="kaak-workspace"] *::-webkit-scrollbar-thumb { background: #4a4c51; border-radius: 6px; } -[data-ws-plugin-part="kaak-workspace.topbar"] { - z-index: 2; - grid-column: 1 / -1; - grid-row: 1; - display: flex; - align-items: center; - gap: 11px; - min-width: 0; - padding: 0 14px; - border-bottom: 1px solid var(--skin-kaak-border); - background: var(--skin-kaak-rail); -} - -[data-ws-plugin-part="kaak-workspace.server-title"] { - overflow: hidden; - margin-right: auto; - color: var(--skin-kaak-muted); - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; -} - -[data-ws-plugin-part="kaak-workspace.server-rail"] { - grid-column: 1; - grid-row: 2; +[data-ws-plugin-part="kaak-workspace.server-rail"] { + grid-column: 1; + grid-row: 1; --skin-kaak-rail-bg: #191a1d; --skin-kaak-rail-item-bg: #2b2d32; --skin-kaak-rail-accent: #75c900; --skin-kaak-rail-text: #e7e9ed; - display: flex; - flex-direction: column; - align-items: center; + display: flex; + flex-direction: column; + align-items: center; gap: 18px; box-sizing: border-box; height: 100%; - min-height: 0; - overflow-y: auto; + min-height: 0; + overflow: hidden; padding: 14px 0 96px; background: var(--skin-kaak-rail-bg); scrollbar-width: none; @@ -229,6 +570,182 @@ display: none; } +[data-ws-plugin-part="kaak-workspace.server-list"] { + display: flex; + box-sizing: border-box; + width: 58px; + min-height: 0; + flex: 1 1 auto; + flex-direction: column; + align-items: center; + gap: 18px; + overflow-x: visible; + overflow-y: auto; + scrollbar-width: none; +} + +[data-ws-plugin-part="kaak-workspace.server-list"]::-webkit-scrollbar { + display: none; +} + +[data-ws-plugin-part="kaak-workspace.server-rail"] [data-ws-part="voice.favorite-servers.skin-add-divider"] { + order: 1; +} + +[data-ws-plugin-part="kaak-workspace.server-rail"] [data-ws-plugin-part="kaak-workspace.server-add"] { + order: 2; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] { + order: 3; + box-sizing: border-box; + width: 58px; + height: 58px; + flex: 0 0 58px; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] { + order: 4; + box-sizing: border-box; + width: 58px; + height: 58px; + flex: 0 0 58px; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-switcher { + z-index: 30; + width: 58px; + height: 58px; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger { + display: grid; + box-sizing: border-box; + width: 58px; + min-width: 58px; + height: 58px; + min-height: 58px; + place-items: center; + padding: 0; + border: 2px solid transparent; + border-radius: 18px; + color: #aeb2ba; + background: var(--skin-kaak-rail-item-bg); + box-shadow: none; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger > span, +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger > .ui-icon:last-child { + display: none; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger > .ui-icon:first-child { + width: 20px; + height: 20px; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger:hover, +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-switcher.open .skin-trigger, +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-trigger:focus-visible { + color: var(--skin-kaak-rail-text); + border-color: var(--skin-kaak-rail-accent); + background: #383a40; + box-shadow: none; +} + +[data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-dropdown { + position: fixed; + z-index: 90; + top: auto; + right: auto; + bottom: 179px; + left: 94px; + box-sizing: border-box; + width: min(190px, calc(100vw - 104px)); + min-width: min(176px, calc(100vw - 104px)); + max-height: min(58dvh, 420px); + overflow-y: auto; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-switcher { + position: static; + z-index: 30; + width: 58px; + height: 58px; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-trigger { + display: grid; + box-sizing: border-box; + width: 58px; + min-width: 58px; + height: 58px; + min-height: 58px; + place-items: center; + padding: 0; + border: 2px solid transparent; + border-radius: 18px; + color: #aeb2ba; + background: var(--skin-kaak-rail-item-bg); + box-shadow: none; + font-family: var(--skin-kaak-font); + font-size: 15px; + font-weight: 700; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-trigger > * { + display: none; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-trigger > .language-current-icon { + display: block; + width: 24px; + height: 24px; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-trigger:hover, +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-switcher.open .language-trigger, +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-trigger:focus-visible { + color: var(--skin-kaak-rail-text); + border-color: var(--skin-kaak-rail-accent); + background: #383a40; + box-shadow: none; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-dropdown { + position: fixed; + z-index: 95; + top: auto; + right: auto; + bottom: 161px; + left: 94px; + box-sizing: border-box; + width: min(260px, calc(100vw - 104px)); + min-width: min(240px, calc(100vw - 104px)); + max-height: min(58dvh, 420px); + grid-template-columns: minmax(0, 1fr); + overflow-y: auto; + background: #222428; + border-color: #3b3d43; + box-shadow: 0 16px 36px rgba(0, 0, 0, .38); +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-option { + color: #d8dbe0; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-option:hover, +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-option:focus-visible, +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-option.selected { + color: var(--skin-kaak-rail-text); + background: #383a40; + border-color: #4a4c51; +} + +[data-ws-plugin-part="kaak-workspace.rail-language"] .language-option small { + color: #9da2ab; +} + [data-ws-plugin-part="kaak-workspace.quick-server-item"] { box-sizing: border-box; width: 58px; @@ -237,6 +754,8 @@ } [data-ws-plugin-part="kaak-workspace.server-add"] { + position: relative; + bottom: auto; display: grid; box-sizing: border-box; width: 58px; @@ -408,10 +927,10 @@ white-space: nowrap; } -[data-ws-plugin-part="kaak-workspace.channel-panel"] { - z-index: 1; - grid-column: 2; - grid-row: 2; +[data-ws-plugin-part="kaak-workspace.channel-panel"] { + z-index: 1; + grid-column: 2; + grid-row: 1; display: flex; flex-direction: column; min-width: 0; @@ -563,9 +1082,9 @@ [data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-member-speaking{ flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--skin-kaak-accent); box-shadow: 0 0 8px #6cbf0080; } [data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-member-away{ color: var(--skin-kaak-dim); } [data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-tree-empty{ padding: 8px 10px; color: var(--skin-kaak-dim); font-size: 11px; } -[data-ws-plugin-part="kaak-workspace.conversation"] { - grid-column: 4; - grid-row: 2; +[data-ws-plugin-part="kaak-workspace.conversation"] { + grid-column: 4; + grid-row: 1; display: grid; grid-template-rows: 58px minmax(0, 1fr) auto; gap: 10px; @@ -741,7 +1260,7 @@ [data-ws-plugin-part="kaak-workspace.voice-stage"] { grid-column: 3; - grid-row: 2; + grid-row: 1; display: flex; flex-direction: column; min-width: 0; @@ -1177,10 +1696,10 @@ 82%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } } -[data-ws-plugin-part="kaak-workspace.voice-dock"] { - z-index: 4; - grid-column: 2; - grid-row: 2; +[data-ws-plugin-part="kaak-workspace.voice-dock"] { + z-index: 4; + grid-column: 2; + grid-row: 1; align-self: end; display: grid; grid-template-columns: minmax(0, 1fr); @@ -1322,23 +1841,19 @@ [data-ws-plugin-part="kaak-workspace.member-cards"] .voice-avatar { width: 76px; height: 76px; font-size: 28px; } } -@media (max-width: 820px) { - [data-ws-plugin-part="kaak-workspace"] { +@media (max-width: 820px) { + [data-ws-plugin-part="kaak-workspace"] { grid-template-columns: 86px minmax(0, 1fr); - grid-template-rows: 50px 126px minmax(176px, 24dvh) minmax(180px, 1fr) 122px; - height: 100dvh; - min-height: 540px; - } - - [data-ws-plugin-part="kaak-workspace.topbar"] { padding: 0 8px; gap: 7px; } - [data-ws-plugin-part="kaak-workspace.brand-mark"] { flex-basis: 28px; width: 28px; height: 28px; } - [data-ws-plugin-part="kaak-workspace.brand-name"] { font-size: 10px; } - [data-ws-plugin-part="kaak-workspace.server-title"] { font-size: 10px; } - [data-ws-plugin-part="kaak-workspace.server-rail"] { grid-column: 1; grid-row: 2 / 6; padding: 8px 13px 96px; gap: 18px; } - - [data-ws-plugin-part="kaak-workspace.channel-panel"] { - grid-column: 2; - grid-row: 2; + grid-template-rows: 126px minmax(176px, 24dvh) minmax(180px, 1fr) 122px; + height: 100dvh; + min-height: 540px; + } + + [data-ws-plugin-part="kaak-workspace.server-rail"] { grid-column: 1; grid-row: 1 / 5; padding: 8px 13px 96px; gap: 18px; } + + [data-ws-plugin-part="kaak-workspace.channel-panel"] { + grid-column: 2; + grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 30px minmax(0, 1fr); @@ -1366,7 +1881,7 @@ [data-ws-plugin-part="kaak-workspace"] .ws-voice-channel-join-hint{ display: none; } [data-ws-plugin-part="kaak-workspace.voice-stage"] { grid-column: 2; - grid-row: 3; + grid-row: 2; min-height: 0; overflow-x: hidden; overflow-y: auto; @@ -1391,9 +1906,9 @@ [data-ws-plugin-part="kaak-workspace.voice-stage-heading"] { flex-basis: 38px; margin: -5px -8px 0; padding: 0 8px; } [data-ws-plugin-part="kaak-workspace.chat-panel-expand"] { flex-basis: 34px; width: 34px; height: 34px; border-radius: 8px; } - [data-ws-plugin-part="kaak-workspace.conversation"] { - grid-column: 2; - grid-row: 4; + [data-ws-plugin-part="kaak-workspace.conversation"] { + grid-column: 2; + grid-row: 3; grid-template-rows: 40px minmax(0, 1fr) auto; gap: 6px; padding: 0 8px 6px; @@ -1412,7 +1927,7 @@ [data-ws-plugin-part="kaak-workspace.voice-dock"] { grid-column: 2; - grid-row: 5; + grid-row: 4; align-self: stretch; min-height: 122px; grid-template-columns: minmax(0, 1fr); @@ -1444,13 +1959,10 @@ [data-ws-plugin-part="kaak-workspace.output-volume"] { width: 58px; } } -@media (max-width: 460px) { +@media (max-width: 460px) { [data-ws-plugin-part="kaak-workspace"] { grid-template-columns: 86px minmax(0, 1fr); } - [data-ws-plugin-part="kaak-workspace.identity-name"] { max-width: 43px; } - [data-ws-plugin-part="kaak-workspace.topbar"] { padding-inline: 5px; } - [data-ws-plugin-part="kaak-workspace.brand-name"] { display: none; } - [data-ws-plugin-part="kaak-workspace.server-title"] { max-width: 100px; } - [data-ws-plugin-part="kaak-workspace.channel-panel"] { grid-column: 2; } + [data-ws-plugin-part="kaak-workspace.identity-name"] { max-width: 43px; } + [data-ws-plugin-part="kaak-workspace.channel-panel"] { grid-column: 2; } [data-ws-plugin-part="kaak-workspace.conversation"] { grid-column: 2; } [data-ws-plugin-part="kaak-workspace.voice-stage"] { grid-column: 2; } [data-ws-plugin-part="kaak-workspace.voice-dock"] { grid-column: 2; } @@ -1459,19 +1971,21 @@ @media (max-height: 620px) { [data-ws-plugin-part="kaak-workspace"] { min-height: 0; } [data-ws-plugin-part="kaak-workspace.server-rail"] { padding-top: 8px; padding-bottom: 76px; } + [data-ws-plugin-part="kaak-workspace.rail-skin"] .skin-dropdown { bottom: 159px; } + [data-ws-plugin-part="kaak-workspace.rail-language"] .language-dropdown { bottom: 141px; } [data-ws-plugin-part="kaak-workspace.identity-entry"] { gap: 2px; padding-top: 7px; padding-bottom: max(8px, env(safe-area-inset-bottom)); } [data-ws-plugin-part="kaak-workspace.identity-name"] { display: none; } } -@media (max-width: 820px) and (max-height: 620px) { - [data-ws-plugin-part="kaak-workspace"] { - grid-template-rows: 46px 104px minmax(138px, 25dvh) minmax(136px, 1fr) 122px; - min-height: 0; - } +@media (max-width: 820px) and (max-height: 620px) { + [data-ws-plugin-part="kaak-workspace"] { + grid-template-rows: 104px minmax(138px, 25dvh) minmax(136px, 1fr) 122px; + min-height: 0; + } [data-ws-plugin-part="kaak-workspace"]:has([data-ws-plugin-part="kaak-workspace.chat-panel-toggle"][aria-expanded="false"]) { - grid-template-rows: 46px 104px minmax(138px, 25dvh) 0 122px; - } -} + grid-template-rows: 104px minmax(138px, 25dvh) 0 122px; + } +} @media (prefers-reduced-motion: reduce) { [data-ws-plugin-part="kaak-workspace"] { transition: none; } @@ -3167,6 +3681,9 @@ background: rgba(10, 11, 13, .54); backdrop-filter: blur(3px); } +[data-ws-part="auth.password.backdrop"][data-ws-state="server-password"] { + background: rgba(29, 40, 34, .3); +} [data-ws-part="auth.password.dialog"] { position: relative; display: flex; @@ -3183,6 +3700,12 @@ background: #242529; box-shadow: 0 18px 48px rgba(0, 0, 0, .38); } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] { + color: #273248; + border-color: #e3e8ec; + background: #fff; + box-shadow: 0 18px 48px rgba(28, 46, 34, .18); +} [data-ws-part="auth.password.decoration"], [data-ws-part="auth.password.eyebrow"], [data-ws-part="auth.password.lead"], @@ -3198,6 +3721,9 @@ letter-spacing: normal; line-height: 20px; } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.title"] { + color: #273248; +} [data-ws-part="auth.password.form"] { display: flex; flex: 1 1 auto; @@ -3216,27 +3742,37 @@ background: #242529; transition: border-color .16s ease, box-shadow .16s ease; } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] { + color: #8995a5; + border-color: #e3e8ec; + background: #fff; +} [data-ws-part="auth.password.field"]:focus-within { border-color: #6cbf00; background: #242529; box-shadow: 0 0 0 2px rgba(108, 191, 0, .2); } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"]:focus-within { + border-color: #77cb25; + background: #fff; + box-shadow: 0 0 0 2px rgba(119, 203, 37, .16); +} [data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) { box-sizing: border-box; - height: 40px; - min-height: 40px; + height: 42px; + min-height: 42px; gap: 0; - padding: 0 15px; - color: #d6d7db; - border: 1px solid #3b3c40; - border-radius: 12px; - background: #242529; + padding: 0 12px; + color: #8995a5; + border: 1px solid #e3e8ec; + border-radius: 11px; + background: #fff; transition: border-color .16s ease, box-shadow .16s ease; } [data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]):focus-within { - border-color: #6cbf00; - background: #242529; - box-shadow: 0 0 0 2px rgba(108, 191, 0, .2); + border-color: #77cb25; + background: #fff; + box-shadow: 0 0 0 2px rgba(119, 203, 37, .16); } [data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) > svg { display: none; @@ -3246,14 +3782,22 @@ min-width: 0; height: 100%; padding: 0; - color: #f0f1f3; + color: #273248; outline: none; border: 0; background: transparent; font-size: 13px; } [data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) input::placeholder { - color: #777980; + color: #b6bec7; +} +[data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) input:-webkit-autofill, +[data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) input:-webkit-autofill:hover, +[data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) input:-webkit-autofill:focus, +[data-ws-part="home.form"] [data-ws-part="home.field"]:has(input[type="password"]) input:autofill { + -webkit-box-shadow: 0 0 0 1000px #fff inset; + -webkit-text-fill-color: #273248; + caret-color: #273248; } [data-ws-part="auth.password.field"] input { width: 100%; @@ -3269,6 +3813,20 @@ [data-ws-part="auth.password.field"] input::placeholder { color: #777980; } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input { + color: #273248; +} +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input::placeholder { + color: #b6bec7; +} +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input:-webkit-autofill, +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input:-webkit-autofill:hover, +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input:-webkit-autofill:focus, +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.field"] input:autofill { + -webkit-box-shadow: 0 0 0 1000px #fff inset; + -webkit-text-fill-color: #273248; + caret-color: #273248; +} [data-ws-part="auth.password.error"] { margin: 10px 0 0; padding: 8px 10px; @@ -3298,6 +3856,12 @@ [data-ws-part="auth.password.actions"] > button:first-child:hover:not(:disabled) { color: #f0f1f3; } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.actions"] > button:first-child { + color: #8491a1; +} +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] [data-ws-part="auth.password.actions"] > button:first-child:hover:not(:disabled) { + color: #344258; +} [data-ws-part="auth.password.actions"] > button:last-child { box-sizing: border-box; width: 82px; @@ -3341,6 +3905,13 @@ color: #f0f1f3; background: #303137; } +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] > button { + color: #9aa5b2; +} +[data-ws-part="auth.password.dialog"][data-ws-state="server-password"] > button:hover:not(:disabled) { + color: #344258; + background: #f1f4f6; +} [data-ws-part="auth.password.dialog"] > button > svg { width: 16px; height: 16px; diff --git a/src/shared/skin-layout.ts b/src/shared/skin-layout.ts index 9cf669f..4f649a0 100644 --- a/src/shared/skin-layout.ts +++ b/src/shared/skin-layout.ts @@ -200,6 +200,7 @@ const PUBLIC_PART_IDS = new Set([ "voice.channel-tree.member-away", "voice.channel-tree.member-muted", "voice.channel-tree.member-name", + "voice.channel-tree.member-screen-share", "voice.channel-tree.member-speaking", "voice.channel-tree.name", "voice.channel-tree.node", diff --git a/src/shared/skin-plugin.test.ts b/src/shared/skin-plugin.test.ts index 1f51381..35dc81f 100644 --- a/src/shared/skin-plugin.test.ts +++ b/src/shared/skin-plugin.test.ts @@ -1,12 +1,13 @@ import assert from "node:assert/strict"; import { readFile } from "node:fs/promises"; import test from "node:test"; -import { - parseSkinPluginDocument, - parseSkinPluginJson, - type SkinPluginDocument, - type SkinPluginNode, -} from "./skin-plugin.js"; +import { + parseSkinPluginDocument, + parseSkinPluginJson, + skinPluginWidgetPermissions, + type SkinPluginDocument, + type SkinPluginNode, +} from "./skin-plugin.js"; function validDocument(): SkinPluginDocument { return { @@ -182,6 +183,52 @@ test("server banner host widget only exposes public session status fields", () = const parsed = parseSkinPluginDocument(document); assert.equal(parsed.components[0].root.children?.[0].widget, "voice.server-banner"); }); + +test("home connection status widget requires the public session status permission", () => { + const document = validDocument(); + document.schemaVersion = 3; + document.components[0].page = "home"; + document.components[0].actions = {}; + document.components[0].root = { tag: "main", children: [{ widget: "home.connection-status" }] }; + errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_PERMISSION_MISSING"); + + document.components[0].permissions = ["session.status.read"]; + assert.equal(parseSkinPluginDocument(document).components[0].root.children?.[0].widget, "home.connection-status"); + assert.deepEqual(skinPluginWidgetPermissions("home.connection-status"), ["session.status.read"]); +}); + +test("MyTS login is a host button with no connection permission or skin action", () => { + const document = validDocument(); + document.schemaVersion = 3; + document.components[0].page = "home"; + document.components[0].permissions = []; + document.components[0].actions = {}; + document.components[0].root = { tag: "main", children: [{ widget: "home.myts-login" }] }; + + const parsed = parseSkinPluginDocument(document); + assert.equal(parsed.components[0].root.children?.[0].widget, "home.myts-login"); + assert.deepEqual(skinPluginWidgetPermissions("home.myts-login"), []); + assert.deepEqual(Object.keys(parsed.components[0].actions), []); +}); + +test("skin SVG illustrations support bounded path and circle geometry attributes", () => { + const document = validDocument(); + document.schemaVersion = 3; + document.components[0].root = { + tag: "svg", + attributes: { viewbox: "0 0 100 100", role: "img" }, + children: [ + { tag: "circle", attributes: { cx: 25, cy: 30, r: 12, fill: "#b0f49b" } }, + { tag: "path", attributes: { d: "M10 20h30v40", stroke: "white", "stroke-width": 2, fill: "none" } }, + ], + }; + const parsed = parseSkinPluginDocument(document).components[0].root; + assert.equal(parsed.children?.[0].attributes?.cx, 25); + assert.equal(parsed.children?.[1].attributes?.d, "M10 20h30v40"); + + document.components[0].root.children![1].attributes!.d = "x".repeat(513); + errorCode(() => parseSkinPluginDocument(document), "SKIN_PLUGIN_ATTRIBUTE_INVALID"); +}); test("schema v3 host audio controls require read and control permissions while v2 remains compatible", () => { const document = validDocument(); @@ -379,12 +426,21 @@ test("KAAK v3 example declares the connection home and complete voice workspace" const parsed = parseSkinPluginJson(source); const home = parsed.components.find((component) => component.id === "kaak-home"); const workspace = parsed.components.find((component) => component.id === "kaak-workspace"); - assert.ok(home); - assert.ok(workspace); - assert.equal(home.page, "home"); - assert.equal(home.mode, "surface"); - assert.deepEqual(home.permissions, ["ui.surface.replace"]); - assert.equal(home.root.children?.[1].children?.[3].widget, "home.connection-form"); + assert.ok(home); + assert.ok(workspace); + assert.equal(home.page, "home"); + assert.equal(home.mode, "surface"); + assert.deepEqual(home.permissions, ["ui.surface.replace", "session.status.read"]); + const connectionCard = home.root.children?.[1].children?.[0].children?.[1]; + assert.equal(connectionCard?.part, "connection-card"); + assert.equal(connectionCard?.children?.[0].part, "card-heading"); + assert.equal(connectionCard?.children?.[0].children?.[0].part, "connection-title"); + assert.equal(connectionCard?.children?.[0].children?.[1].widget, "home.myts-login"); + assert.equal(connectionCard?.children?.[2].widget, "home.connection-form"); + assert.equal(connectionCard?.children?.[4].widget, "home.connection-status"); + const heroMedia = home.root.children?.[0].children?.[2]; + assert.equal(heroMedia?.part, "hero-media"); + assert.equal(heroMedia?.children?.[0].tag, "svg"); assert.equal(workspace.page, "voice"); assert.equal(workspace.mode, "surface"); diff --git a/src/shared/skin-plugin.ts b/src/shared/skin-plugin.ts index 69a4f76..9e4817e 100644 --- a/src/shared/skin-plugin.ts +++ b/src/shared/skin-plugin.ts @@ -40,8 +40,10 @@ export const SKIN_PLUGIN_PERMISSIONS = Object.freeze({ export type SkinPluginPermission = keyof typeof SKIN_PLUGIN_PERMISSIONS; export type SkinPluginPage = "home" | "voice" | "demo"; export type SkinPluginComponentMode = "widget" | "surface"; -export const SKIN_PLUGIN_HOST_WIDGETS = Object.freeze([ - "home.connection-form", +export const SKIN_PLUGIN_HOST_WIDGETS = Object.freeze([ + "home.connection-form", + "home.connection-status", + "home.myts-login", "app.skin-switcher", "app.language-switcher", "voice.server-switcher", @@ -72,6 +74,7 @@ export interface SkinPluginWidgetOptions { } const widgetPermissions = (...permissions: SkinPluginPermission[]): readonly SkinPluginPermission[] => Object.freeze(permissions); export const SKIN_PLUGIN_HOST_WIDGET_PERMISSIONS: Partial> = Object.freeze({ + "home.connection-status": widgetPermissions("session.status.read"), "voice.channel-tree": widgetPermissions("session.channels.read", "session.members.read", "session.memberAvatars.read", "session.channel.join"), "voice.server-switcher": widgetPermissions("servers.quickList.read", "servers.quickList.switch"), "voice.server-header": widgetPermissions("session.status.read", "servers.quickList.read", "servers.quickList.switch"), @@ -175,11 +178,11 @@ export const SKIN_PLUGIN_ALLOWED_ELEMENTS = Object.freeze([ ] as const); const ELEMENTS = new Set(SKIN_PLUGIN_ALLOWED_ELEMENTS); const VOID_ELEMENTS = new Set(["br", "circle", "hr", "img", "input", "line", "path", "polyline", "rect", "wbr"]); -const ATTRIBUTES = new Set([ - "alt", "aria-current", "aria-expanded", "aria-hidden", "aria-label", "aria-pressed", "aria-selected", "autocomplete", "checked", "class", "colspan", "disabled", "draggable", "fill", "height", "inputmode", "max", "maxlength", "min", - "minlength", "multiple", "name", "open", "placeholder", "required", "role", "rows", "rowspan", "step", "stroke", "stroke-linecap", "stroke-linejoin", - "src", "stroke-width", "tabindex", "title", "type", "value", "viewbox", "width", "x", "x1", "x2", "y", "y1", "y2", -]); +const ATTRIBUTES = new Set([ + "alt", "aria-current", "aria-expanded", "aria-hidden", "aria-label", "aria-pressed", "aria-selected", "autocomplete", "checked", "class", "colspan", "cx", "cy", "d", "disabled", "draggable", "fill", "height", "inputmode", "max", "maxlength", "min", + "minlength", "multiple", "name", "open", "placeholder", "required", "role", "rows", "rowspan", "step", "stroke", "stroke-linecap", "stroke-linejoin", + "r", "rx", "src", "stroke-width", "tabindex", "title", "type", "value", "viewbox", "width", "x", "x1", "x2", "y", "y1", "y2", +]); const EVENTS = new Set([ "click", "dblclick", "change", "input", "submit", "keydown", "keyup", "contextmenu", "focus", "blur", "pointerdown", "pointerup", "pointerenter", "pointerleave", "dragstart", "dragover", "drop", diff --git a/web/public/skins/kaak-voice.wskin b/web/public/skins/kaak-voice.wskin index fca47e0..11662b8 100644 Binary files a/web/public/skins/kaak-voice.wskin and b/web/public/skins/kaak-voice.wskin differ diff --git a/web/src/components/Icon.vue b/web/src/components/Icon.vue index 5a02619..d38b30d 100644 --- a/web/src/components/Icon.vue +++ b/web/src/components/Icon.vue @@ -89,8 +89,9 @@ - - + + +