feat(kaak): refine compact voice dock controls

This commit is contained in:
illusia committed 2026-10-11 19:30:42 +08:00
1 parent 96d2ebae01
commit 766a9b9b5a
12 files changed
+48 -96

No files matched your search

+10 -1
View File
@@ -12,7 +12,7 @@
## 当前检查点(2026-10-11)
- KAAK 当前源码版本为 3.1.66;最近新增真实服务器名与收藏/历史快速切换入口,并以宿主频道树呈现嵌套语音频道、频道成员头像和状态。服务器显示名过滤像地址的内容;快速切换不向皮肤暴露连接目标。控制坞保留 WebSpeak 现有分享、降噪、伴奏、麦克风、扬声器和设置操作;按最新 HTML 在录音位显示不可操作的纯视觉占位,不提供录音能力。3.1.55 的横向单行方案已被用户明确否决,不再沿用;3.1.53 已移除皮肤布局运行时对宿主控件强加的 44px 尺寸。
- KAAK 当前源码版本为 3.1.67;最近新增真实服务器名与收藏/历史快速切换入口,并以宿主频道树呈现嵌套语音频道、频道成员头像和状态。服务器显示名过滤像地址的内容;快速切换不向皮肤暴露连接目标。控制坞保留 WebSpeak 现有分享、降噪、伴奏、麦克风、扬声器和设置操作;已移除无效的录制占位,仅保留屏幕共享和伴奏入口。3.1.55 的横向单行方案已被用户明确否决,不再沿用;3.1.53 已移除皮肤布局运行时对宿主控件强加的 44px 尺寸。
- 语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均已有对应实现;音频设置标签为 KOOK 已记录的 14px/400,表单卡与字段行按实测宽度/行高调整。
- 直接观察记录覆盖语音侧栏/频道树、成员卡与悬停姓名、当前语音频道聊天开合、语音坞、音频设置字体及设备列表尺寸和状态。独立文字频道不复刻;KOOK 的付费分享呈现不复刻,WebSpeak 自带屏幕分享入口和播放器保留。
- 设备选择菜单已按皮肤实际高度限位;KAAK 音频滑杆、性能反馈、字体和成员卡交互均有对应实现。3.1.66 完整验证为 680/680,服务端 TypeScript 构建、前端类型检查和生产构建通过。用户已明确 KOOK 音乐语音频道附带聊天默认收起、普通语音频道默认展开。TeamSpeak `ChannelInfo` 与皮肤上下文没有音乐类别字段;当前实现按频道分别记住聊天开合,尚不能判断从未设置过的频道是否为音乐频道。
@@ -469,3 +469,12 @@
- 版本与分发包:KAAK 升至 3.1.66;更新示例和内置目录,重建示例 `.wskin` 与内置 `.wskin`。
- 验证:`npm run skin:kaak:build` 与 `git diff --check` 通过;定向测试 46/46、完整 `npm run verify` 680/680 通过,服务端 TypeScript、前端类型检查与生产构建通过。未在真实语音频道做浏览器目视验收。
- 当前状态:实现和自动验证完成;按既有指示提交并推送到 `dev`。
## 本轮修改节点(2026-10-11,KAAK 3.1.67 音频坞精修)
- 目标:移除录制占位,顶行只保留屏幕共享与伴奏;按用户示意收紧降噪、麦克风、扬声器一行,并把左侧设置入口改为齿轮在前的“语音设置”。
- 修改范围:仅调整 KAAK 示例布局、作用域样式、宿主音频设置按钮文案和各端的相同控件排列;保留现有分享、降噪、伴奏、麦克风、扬声器、打开设置的行为,不增加录制功能。
- 视觉行为:降噪/麦克风按钮列收窄至 28px;语音设置组靠左排列,右侧控件保持独立紧凑分组;移动布局同步收紧。
- 版本与分发包:KAAK 升至 3.1.67;重建示例和内置 `.wskin`。
- 验证:皮肤包重建成功;`npm run verify` 的 680 项测试全部通过,服务端 TypeScript 构建、前端类型检查与生产构建通过;`git diff --check` 通过。
- 当前状态:实现与自动验证完成;按既有指示提交并推送到 `dev`。
Binary file not shown.
-32
View File
@@ -847,38 +847,6 @@
}
]
},
{
"tag": "button",
"part": "record-placeholder",
"attributes": {
"type": "button",
"disabled": true,
"aria-label": "录制 / Recording unavailable"
},
"children": [
{
"tag": "span",
"part": "recording-dot",
"attributes": {
"aria-hidden": true
},
"children": [
{
"text": "●"
}
]
},
{
"tag": "span",
"part": "recording-label",
"children": [
{
"text": "REC"
}
]
}
]
},
{
"widget": "voice.audio-controls",
"part": "audio-controls",
+1 -1
View File
@@ -3,7 +3,7 @@
"packageType": "open-skin",
"id": "community.kaak-voice",
"name": "KAAK",
"version": "3.1.66",
"version": "3.1.67",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired voice workspace with a searchable server header, nested channel members, attached channel chat, and a compact WebSpeak audio dock.",
+20 -47
View File
@@ -1350,7 +1350,7 @@
display: grid;
grid-column: 1;
grid-row: 2;
grid-template-columns: minmax(0, 1fr) 37px 37px 37px;
grid-template-columns: minmax(0, 1fr) 28px 28px 36px;
grid-template-rows: 28px 23px;
column-gap: 7px;
row-gap: 23px;
@@ -1369,36 +1369,7 @@
background: #303236;
pointer-events: none;
}
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] { grid-column: 1 / 3; grid-row: 1; min-width: 0; }
[data-ws-plugin-part="kaak-workspace.record-placeholder"] {
display: flex;
grid-column: 3;
grid-row: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0;
box-sizing: border-box;
width: 36px;
min-width: 36px;
height: 29px;
min-height: 29px;
padding: 1px 0 0;
border: 0;
border-radius: 9px;
color: #fff;
background: #69c000;
font-family: var(--skin-kaak-font);
font-size: 8px;
font-weight: 700;
line-height: 9px;
letter-spacing: .03em;
opacity: 1;
cursor: default;
pointer-events: none;
}
[data-ws-plugin-part="kaak-workspace.recording-dot"] { font-size: 13px; line-height: 13px; }
[data-ws-plugin-part="kaak-workspace.recording-label"] { font-size: 8px; line-height: 9px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] { grid-column: 1 / 4; grid-row: 1; min-width: 0; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] { display: contents; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .desktop-audio-dock-room-panel {
@@ -1408,10 +1379,10 @@
[data-ws-plugin-part="kaak-workspace.audio-controls"] .room-panel-audio-settings {
display: inline-flex;
align-items: center;
justify-content: space-between;
justify-content: flex-start;
grid-column: 1;
grid-row: 2;
gap: 5px;
gap: 8px;
min-width: 0;
min-height: 23px;
padding: 0 7px;
@@ -1480,8 +1451,8 @@
}
[data-ws-plugin-part="kaak-workspace.audio-controls"] .desktop-audio-dock-room-panel .noise-suppression-toggle {
box-sizing: border-box;
width: 37px;
min-width: 37px;
width: 28px;
min-width: 28px;
height: 28px;
min-height: 28px;
margin: 0;
@@ -1617,14 +1588,13 @@
[data-ws-plugin-part="kaak-workspace.voice-dock-heading"] { grid-template-columns: 8px minmax(0, 1fr) 28px 28px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-actions"] {
grid-row: 2;
grid-template-columns: minmax(0, 1fr) 37px 37px 37px;
grid-template-columns: minmax(0, 1fr) 28px 28px 36px;
grid-template-rows: 34px 36px;
column-gap: 7px;
row-gap: 12px;
}
[data-ws-plugin-part="kaak-workspace.voice-dock-actions"]::after { top: 39px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] { grid-column: 1 / 3; grid-row: 1; }
[data-ws-plugin-part="kaak-workspace.record-placeholder"] { grid-column: 3; grid-row: 1; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] { grid-column: 1 / 4; grid-row: 1; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] .skin-runtime-screen-share-start,
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] [data-ws-plugin-part="kaak-workspace.screen-share-stop"] {
min-height: 34px;
@@ -2755,9 +2725,9 @@
display: grid;
grid-column: 1;
grid-row: 2;
grid-template-columns: minmax(0, 1fr) 36px 36px 36px;
grid-template-columns: minmax(0, 1fr) 28px 28px 36px;
grid-template-rows: 29px 26px;
column-gap: 7px;
column-gap: 6px;
row-gap: 21px;
align-items: center;
min-width: 0;
@@ -2773,8 +2743,8 @@
grid-column: 1;
grid-row: 2;
align-items: center;
justify-content: space-between;
gap: 5px;
justify-content: flex-start;
gap: 8px;
min-width: 0;
min-height: 26px;
padding: 0 7px;
@@ -2814,8 +2784,8 @@
grid-row: 2;
place-items: center;
box-sizing: border-box;
width: 36px;
min-width: 36px;
width: 28px;
min-width: 28px;
height: 26px;
min-height: 26px;
margin: 0;
@@ -2908,15 +2878,18 @@
border-radius: 17px;
}
[data-ws-plugin-part="kaak-workspace.voice-dock-heading"] { min-height: 22px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-actions"] { grid-template-rows: 29px 26px; row-gap: 16px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-actions"] { grid-template-columns: minmax(0, 1fr) 28px 28px 36px; grid-template-rows: 29px 26px; column-gap: 6px; row-gap: 16px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-actions"]::after { top: 36px; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] { grid-column: 1 / 4; grid-row: 1; }
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] .skin-runtime-screen-share-start,
[data-ws-plugin-part="kaak-workspace.voice-dock-share"] [data-ws-plugin-part="kaak-workspace.screen-share-stop"] { min-height: 29px; height: 29px; padding-inline: 8px; font-size: 12px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-voice-controls { display: contents; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-voice-activity { grid-column: 1; grid-row: 2; min-height: 26px; font-size: 12px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-noise-suppression { grid-column: 2; grid-row: 2; width: 36px; min-width: 36px; height: 26px; min-height: 26px; margin: 0; padding: 0; border-radius: 7px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-voice-activity { grid-column: 1; grid-row: 2; justify-content: flex-start; gap: 8px; min-height: 26px; padding-inline: 4px; font-size: 12px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-noise-suppression { grid-column: 2; grid-row: 2; width: 28px; min-width: 28px; height: 26px; min-height: 26px; margin: 0; padding: 0; border-radius: 7px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-microphone-toggle { grid-column: 3; grid-row: 2; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-output-toggle { grid-column: 4; grid-row: 2; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-microphone-toggle,
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-output-toggle { width: 28px; min-width: 28px; height: 26px; min-height: 26px; padding: 0; border-radius: 7px; }
[data-ws-plugin-part="kaak-workspace.audio-controls"] .mobile-accompaniment-toggle { grid-column: 4; grid-row: 1; width: 36px; min-width: 36px; height: 29px; min-height: 29px; border-radius: 9px; }
}
@media (max-height: 700px) and (min-width: 821px) {
+1 -1
View File
@@ -354,7 +354,7 @@ test("KAAK v3 example declares the connection home and complete voice workspace"
assert.ok(nodes.some((node) => node.widget === "voice.audio-controls" && node.options?.layout === "room-panel"));
assert.ok(nodes.some((node) => node.widget === "voice.server-header"), "the server header exposes trusted search and quick switching");
assert.ok(nodes.some((node) => node.widget === "voice.channel-tree" && node.options?.layout === "server-sidebar"), "the KAAK channel tree opts into its isolated sidebar layout");
assert.equal(nodes.find((node) => node.part === "record-placeholder")?.attributes?.disabled, true, "recording remains a visual-only disabled placeholder");
assert.equal(nodes.find((node) => node.part === "record-placeholder"), undefined, "the KAAK voice dock does not expose a recording control");
assert.ok(nodes.some((node) => node.widget === "voice.screen-share-start"), "the voice dock exposes WebSpeak screen sharing");
assert.ok(nodes.some((node) => node.widget === "voice.screen-share-player"), "the voice stage keeps WebSpeak's screen-share player");
assert.equal(nodes.find((node) => node.part === "screen-share-stop")?.events?.click, "stop-screen-share");
Binary file not shown.
+3 -3
View File
@@ -12,11 +12,11 @@
v-if="layout === 'room-panel'"
type="button"
class="room-panel-audio-settings"
:aria-label="t('audioSettings')"
:title="t('audioSettings')"
:aria-label="t('voiceSettings')"
:title="t('voiceSettings')"
aria-haspopup="dialog"
@click="emit('settings')"
><span>{{ t("voiceActivity") }}</span><Icon name="settings" :size="16" /></button
><Icon name="settings" :size="16" /><span>{{ t("voiceSettings") }}</span></button
>
<div class="desktop-audio-dock-copy"
><strong>{{ t("desktopAudioControls") }}</strong
+3
View File
@@ -198,6 +198,7 @@ export const webClientTranslations: Record<string, Record<string, string>> = {
membersOnline: "{{count}} 位成员在线",
encrypted: "加密连接",
voiceActivity: "语音活动",
voiceSettings: "语音设置",
speakingNow: "正在语音中",
onlineShort: "{{count}} 在线",
you: "你",
@@ -606,6 +607,7 @@ export const webClientTranslations: Record<string, Record<string, string>> = {
membersOnline: "{{count}} members online",
encrypted: "Encrypted connection",
voiceActivity: "VOICE ACTIVITY",
voiceSettings: "Voice settings",
speakingNow: "Speaking now",
onlineShort: "{{count}} online",
you: "You",
@@ -1008,6 +1010,7 @@ webClientTranslations.de = {
membersOnline: "{{count}} Mitglieder online",
encrypted: "Verschlüsselte Verbindung",
voiceActivity: "SPRACHAKTIVITÄT",
voiceSettings: "Spracheinstellungen",
speakingNow: "Spricht gerade",
onlineShort: "{{count}} online",
you: "Du",
+1 -1
View File
@@ -46,7 +46,7 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
{
id: BUILTIN_KAAK_SKIN_ID,
name: "KAAK",
version: "3.1.66",
version: "3.1.67",
author: "WebSpeak Project",
license: "AGPL-3.0-only",
description: "A KOOK-inspired voice-room workspace with a searchable server header, nested channel members, attached channel chat, and a compact WebSpeak audio dock.",
+6 -7
View File
@@ -464,7 +464,7 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
const file = new File([archive], "kaak-voice.wskin", { type: "application/octet-stream" });
const skin = await importSkinPack(file);
assert.equal(skin.id, "community.kaak-voice");
assert.equal(skin.version, "3.1.66");
assert.equal(skin.version, "3.1.67");
assert.equal(BUILTIN_SKIN_CATALOG.find((entry) => entry.id === skin.id)?.version, skin.version);
assert.equal(skin.schemaVersion, 3);
const home = skin.pluginData?.components.find((component) => component.page === "home");
@@ -499,8 +499,7 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
return undefined;
}
assert.equal(findPart(voice?.root, "server-summary")?.widget, "voice.server-header");
assert.equal(findPart(voice?.root, "record-placeholder")?.attributes?.disabled, true);
assert.equal(findPart(voice?.root, "recording-label")?.children?.[0]?.text, "REC");
assert.equal(findPart(voice?.root, "record-placeholder"), undefined, "the KAAK voice dock has no recording control");
assert.equal(findPart(voice?.root, "voice-channel-tree")?.widget, "voice.channel-tree");
assert.deepEqual(findPart(voice?.root, "voice-channel-tree")?.options, { layout: "server-sidebar" });
assert.equal(findPart(voice?.root, "channel-row"), undefined, "channels render in the trusted nested tree widget");
@@ -565,15 +564,15 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
assert.match(skin.css, /--skin-kaak-font:[\s\S]*?PingFang SC/);
assert.match(skin.css, /--skin-kaak-accent: #6cbf00;/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock"\] \{[\s\S]*?width: min\(282px, calc\(100% - 22px\)\);[\s\S]*?margin-bottom: 11px;[\s\S]*?border-radius: 17px;/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock-actions"\] \{[\s\S]*?grid-template-columns: minmax\(0, 1fr\) 36px 36px 36px;[\s\S]*?grid-template-rows: 29px 26px;[\s\S]*?row-gap: 21px;/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock-actions"\] \{[\s\S]*?grid-template-columns: minmax\(0, 1fr\) 28px 28px 36px;[\s\S]*?grid-template-rows: 29px 26px;[\s\S]*?row-gap: 21px;/);
assert.match(skin.css, /ws-voice-channel-tree\[data-layout="server-sidebar"\] \.ws-voice-channel-line[\s\S]*?min-height: 38px;/);
assert.match(skin.css, /ws-voice-channel-tree\[data-layout="server-sidebar"\] \.ws-voice-channel-member[\s\S]*?min-height: 29px;/);
assert.match(skin.css, /kaak-workspace\.record-placeholder"\][\s\S]*?grid-column: 3;[\s\S]*?grid-row: 1;[\s\S]*?background: #69c000;/);
assert.doesNotMatch(skin.css, /kaak-workspace\.record-placeholder|kaak-workspace\.recording-label/);
assert.match(skin.css, /desktop-audio-dock-room-panel \{\s*display: contents;\s*\}/);
assert.match(skin.css, /desktop-audio-dock-copy \{ display: none; \}/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock-share"\] \{ grid-column: 1 \/ 3; grid-row: 1;/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock-share"\] \{ grid-column: 1 \/ 4; grid-row: 1;/);
assert.match(skin.css, /\[data-ws-plugin-part="kaak-workspace\.voice-dock-share"\] \.skin-runtime-screen-share-start \{[\s\S]*?background: #69c000;/);
assert.match(skin.css, /room-panel-audio-settings[\s\S]*?grid-column: 1;[\s\S]*?grid-row: 2;/);
assert.match(skin.css, /room-panel-audio-settings[\s\S]*?grid-column: 1;[\s\S]*?grid-row: 2;[\s\S]*?justify-content: flex-start;[\s\S]*?gap: 8px;/);
assert.match(skin.css, /noise-suppression-toggle \{ grid-column: 2; grid-row: 2; align-self: center; \}/);
assert.match(skin.css, /voice\.audio-dock\.microphone[\s\S]*?grid-column: 3;[\s\S]*?grid-row: 2;/);
assert.match(skin.css, /voice\.audio-dock\.output[\s\S]*?grid-column: 4;[\s\S]*?grid-row: 2;/);
+3 -3
View File
@@ -1830,10 +1830,10 @@ const skinPluginWidgets = {
h("button", {
type: "button",
class: "mobile-voice-activity",
"aria-label": t("audioSettings"),
title: t("audioSettings"),
"aria-label": t("voiceSettings"),
title: t("voiceSettings"),
onClick: () => { settingsOpen.value = true; },
}, [h("span", null, t("voiceActivity")), h(Icon, { name: "settings", size: 16 })]),
}, [h(Icon, { name: "settings", size: 16 }), h("span", null, t("voiceSettings"))]),
h("button", {
type: "button",
class: ["mobile-voice-toggle", "mobile-noise-suppression", noiseSuppressionEnabled.value && "active"],