feat(kaak): surface noise controls in audio settings

This commit is contained in:
Corrupted ILLUSIA committed 2026-10-11 07:06:49 +08:00
1 parent 7c3e32d671
commit cb504c95bc
12 files changed
+90 -21

No files matched your search

+13 -2
View File
@@ -12,12 +12,13 @@
## 当前检查点(2026-10-11)
- KAAK 已推送到 `dev` 并升至 3.1.46;语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均有对应实现,音频设置标签明确为 KOOK 已记录的 14px/400,表单卡与字段行已按实测宽度/行高调整。
- KAAK 已推送到 `dev` 并升至 3.1.47;语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均有对应实现,音频设置标签明确为 KOOK 已记录的 14px/400,表单卡与字段行已按实测宽度/行高调整。
- 直接观察记录覆盖语音侧栏/频道树、成员卡与悬停姓名、当前语音频道聊天开合、语音坞、音频设置字体及设备列表尺寸和状态。付费屏幕分享与独立文字频道暂不复刻。
- 设备选择菜单已按皮肤实际高度限位;KAAK 3.1.41 的滑杆样式已更新,完整测试 661/661,服务端与前端构建通过。用户已明确 KOOK 音乐语音频道附带聊天默认收起、普通语音频道默认展开。TeamSpeak `ChannelInfo` 与皮肤上下文没有音乐类别字段,KAAK 当前无法自动按类别应用两种默认值;不按频道名猜测,后续需要通用的显式分类来源。
- 本轮从 KOOK 原页读取了可见频道树的 DOM 计算字体规格;成员舞台当前未加载,截图读取超时,未推断其具体像素尺寸或动画时长。
- KOOK 音频设置页可读到 732px 主内容区、660px 表单卡、72px 字段行及 268/320px 标签/控件列;当前设备名属于隐私数据,不记录。
- 本地 3041 页面当前显示 KAAK 3.1.46 的权限提示;此前授权不会自动覆盖新皮肤版本,本轮未替用户批准,也未声称完成新版面板的浏览器目视验收。
- KOOK 设置页还展示降噪开关与档位入口;KAAK 只使用 WebSpeak 已有的通用降噪开关,不复制专有算法或档位。
## 已完成的修改节点
@@ -302,4 +303,14 @@
- 文档与分发包:参考文档补充主内容/卡片/字段比例和完整字体行高;KAAK 示例说明及包版本更新至 3.1.46,示例和内置 `.wskin` 已由当前源码重建。
- 验证:皮肤包构建通过;完整测试 661/661、服务端 `tsc`、前端 Vue 类型检查/生产构建和 `git diff --check` 均通过。浏览器主页可加载,但新版皮肤权限待用户批准,因此未进行音频设置面板目视验收。
- 影响文件/提交:音频设置组件模板(仅增加通用语义分组)、KAAK 样式/清单/目录版本/包断言、KOOK 参考和工作记录、示例说明及两个皮肤包。
- 当前状态与下一步:功能提交 `2a80ade` 已推送到 `dev`;用户在本地批准 KAAK 3.1.46 后,再补做音频设置面板的浏览器目视验收。之后继续成组核对语音控件交互和字号,避免每个小节点重复全量测试。
- 当前状态与下一步:功能提交 `2a80ade` 已推送到 `dev`;待本地批准当前版本后,再补做音频设置面板的浏览器目视验收。之后继续成组核对语音控件交互和字号,避免每个小节点重复全量测试。
## 本轮修改节点(2026-10-11,KAAK 3.1.47 设置页降噪入口)
- 问题依据:已打开的 KOOK 语音设置页把降噪开关及档位入口放在语音设置中;WebSpeak 已有对应的通用降噪开关,但桌面端只在语音坞悬浮面板出现,设置页仅移动端显示。
- 修改内容与边界:通用音频设置页在桌面和移动端都显示现有降噪开关;KAAK 将其排入同一张设置卡的横向字段行。开关仍调用 WebSpeak 现有布尔降噪状态,不新增音频处理算法、档位或 KAAK 专属逻辑。
- 原页核查:只读取语音设置页的栏目与控件存在性;不记录输入/输出设备名称,也未切换降噪、设备或音量。
- 文档与分发包:KOOK 参考/KAAK 说明补充该入口及能力边界;版本更新至 3.1.47,示例与内置 `.wskin` 已重建。
- 验证:完整测试 661/661、服务端 `tsc`、前端 Vue 类型检查/生产构建和 `git diff --check` 均通过。浏览器目视验收仍待本地用户批准当前皮肤版本的权限。
- 影响文件/提交:音频设置组件及通用样式、KAAK 皮肤样式/清单/内置目录/断言、KOOK 参考与 KAAK 说明/工作记录、两个皮肤包。
- 当前状态与下一步:本节点已完成验证,接下来提交并推送到 `dev`;用户批准当前版本后补做音频设置目视验收。之后再选下一个有原页依据的成员/聊天动画节点。
+1 -1
View File
@@ -27,7 +27,7 @@
## 音频与连接状态控件
- 左下语音坞用绿色信号柱表示连接状态,断开入口单独放在右上;音频开关排列在坞底部,图标按钮尺寸紧凑。屏幕分享按用户要求暂不作为复刻目标,也未操作。
- KOOK 的语音设置可从个人菜单进入,页面把输入/输出设备选择、麦克风输入音量和语音输出音量放在同一张深色设置卡片内;输入设备下方提供本地麦克风测试。
- KOOK 的语音设置可从个人菜单进入,页面把输入/输出设备选择、麦克风输入音量和语音输出音量放在深色表单区内;输入设备附近提供本地麦克风测试和降噪开关,另有降噪档位入口。
- 设备选择是自绘下拉列表:选择框约 40px 高,选项列表可滚动、最多约 240px 高,每项约 32px;当前项有浅色底,箭头在开合时旋转。对照 KOOK 公开样式资源后补充:触发框和菜单为 12px 圆角,菜单内边距 8px;选项为 8px 圆角、上下间隔 2px、左右内边距 8px,深色菜单底色为 `#25262a`,文本为 `#e6eaf0`,品牌主色/hover/active 分别为 `#6cbf00`、`#7ac51a`、`#60ab00`,悬停与选中底色分别约为白色 6% 与 10% 透明度,菜单阴影为 2px/8px、黑色 32% 透明度。此项来自静态样式资源,不代表本轮重新操作了页面。我们此前只展开并收起输入设备列表,没有选择设备。
- 设置页采用 PingFang SC 优先的中英文字体栈。主标题为 32px/600、38px 行高,分区标题 16px/600、22px 行高,设备和音量标签 14px/400、20px 行高。公开滑杆样式显示音轨为 4px、圆形拇指为 16px 并带 2px 品牌绿描边;悬停时出现 3px 光圈。没有拖动滑杆,因此不推断声音反馈或音量更新动画。
- 本次从已打开的设置页读取计算布局:主内容宽约 732px,内容区内边距为 40px 16px 60px 56px;音频表单卡为 660px 宽、390px 高,底色 `#25262a`、圆角 16px。卡内横向字段行高 72px、内边距 16px 24px,标签列约 268px、控件列约 320px、列间距 24px;本地麦克风测试区域高约 100px,音轨高约 32px。只记录尺寸和通用样式,不记录设备名称。
+2
View File
@@ -14,6 +14,8 @@ The device picker now follows the public KOOK style geometry: a 40px trigger wit
The audio settings surface now follows the observed KOOK form proportions: a 660px dark card, 16px corners, 72px field rows, and a two-column label/control layout. Device and volume controls keep their WebSpeak behavior; only their shared form grouping and KAAK skin presentation changed. The layout stacks fields on narrow screens. KOOK's settings typography remains PingFang SC-first, with a 32px/600 title, 16px/600 section headings, and 14px/400 field labels.
The existing WebSpeak noise-suppression switch is available in the audio settings on desktop and mobile, matching its placement in KOOK's voice settings. It remains the browser's current noise-suppression control; KAAK does not claim to reproduce KOOK's branded processing modes.
## Reference access note
The owner authorized inspection of the first two voice rooms in the KOOK server. Both rooms were entered and viewed; the microphone remained off and no message was sent. The in-room view confirmed a single large participant tile in the center, a separate right-side panel for the active voice channel's text chat, a narrow server rail, grouped voice channels, and a compact voice-control dock near the lower left. The chat was empty, so no message contents were recorded. Server/room identifiers and member names were not recorded.
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@
"packageType": "open-skin",
"id": "community.kaak-voice",
"name": "KAAK",
"version": "3.1.46",
"version": "3.1.47",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired voice workspace with collapsible voice groups and current voice-channel chat, TeamSpeak profile cards, and animated speaker states.",
+58
View File
@@ -1767,6 +1767,60 @@
min-width: 0;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle {
grid-template-columns: minmax(0, 1fr) 34px;
gap: 24px;
margin: 0;
padding: 16px 24px;
border: 0;
border-top: 1px solid #ffffff0a;
border-radius: 0;
background: transparent;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle > span {
min-width: 0;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle strong {
color: #aeb0b7;
font-size: 14px;
font-weight: 400;
line-height: 20px;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle small {
color: #a4a6ad;
font-size: 12px;
line-height: 1.5;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle input {
width: 34px;
height: 20px;
flex: 0 0 34px;
border-color: #45464c;
background: #202126;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle input::before {
background: #a4a6ad;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle input:checked {
border-color: #6cbf00;
background: #6cbf00;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle input:checked::before {
background: #fff;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle input:focus-visible {
outline: 3px solid #6cbf0066;
outline-offset: 2px;
}
[data-ws-part="voice.audio-settings"] .settings-form-control,
[data-ws-part="voice.audio-settings"] .settings-device-select,
[data-ws-part="voice.audio-settings"] .settings-select {
@@ -2053,6 +2107,10 @@
row-gap: 8px;
padding: 14px 16px;
}
[data-ws-part="voice.audio-settings"] .noise-suppression-toggle {
grid-template-columns: minmax(0, 1fr) 34px;
padding: 14px 16px;
}
[data-ws-part="voice.audio-settings"] .settings-section h3 {
margin-inline: 16px;
}
Binary file not shown.
@@ -77,8 +77,7 @@
{{ microphoneMuted ? t("unmuteMic") : t("muteMic") }}</button
></div
><label
v-if="isMobileViewport"
class="mobile-noise-toggle"
class="noise-suppression-toggle settings-form-row"
><span
><strong>{{ t("noiseSuppression") }}</strong
><small>{{ t("noiseSuppressionHint") }}</small></span
@@ -293,7 +292,6 @@ const props = defineProps<{
model: AudioSettingsState;
controls: AudioSettingsControls;
microphoneError: string;
isMobileViewport: boolean;
t: (key: string, variables?: Record<string, string | number>) => string;
localizedMessage: (message: string) => string;
rangeStyle: (value: number, max: number) => CSSProperties;
+1 -1
View File
@@ -46,7 +46,7 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
{
id: BUILTIN_KAAK_SKIN_ID,
name: "KAAK",
version: "3.1.46",
version: "3.1.47",
author: "WebSpeak Project",
license: "AGPL-3.0-only",
description: "A KOOK-inspired voice-room workspace with collapsible voice groups, current voice-channel chat, TeamSpeak profile cards, and accessible host-owned voice controls.",
+2 -1
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.46");
assert.equal(skin.version, "3.1.47");
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");
@@ -570,6 +570,7 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
assert.match(skin.css, /settings-section h3 \{[\s\S]*?color: #eceef0;\s*font-size: 16px;\s*font-weight: 600;/);
assert.match(skin.css, /settings-audio-card \{\s*width: min\(660px, 100%\);[\s\S]*?background: #25262a;[\s\S]*?border-radius: 16px;/);
assert.match(skin.css, /settings-form-row \{\s*display: grid;\s*grid-template-columns: minmax\(0, 268fr\) minmax\(0, 320fr\);[\s\S]*?min-height: 72px;[\s\S]*?padding: 16px 24px;/);
assert.match(skin.css, /noise-suppression-toggle \{\s*grid-template-columns: minmax\(0, 1fr\) 34px;[\s\S]*?padding: 16px 24px;/);
assert.match(skin.css, /@media \(max-width: 680px\) \{[\s\S]*?settings-form-row \{\s*grid-template-columns: minmax\(0, 1fr\);/);
assert.match(skin.css, /voice\.audio-settings"] \.settings-label \{\s*margin: 0;\s*font-weight: 400;/);
assert.match(skin.css, /voice\.audio-settings"] \.settings-select \{[\s\S]*?border-radius: 12px;/);
+11 -11
View File
@@ -6705,7 +6705,7 @@
}
:deep(.dock-switch-row),
:deep(.mobile-noise-toggle) {
:deep(.noise-suppression-toggle) {
display: flex;
align-items: center;
justify-content: space-between;
@@ -6714,18 +6714,18 @@
}
:deep(.dock-switch-row > span),
:deep(.mobile-noise-toggle > span) {
:deep(.noise-suppression-toggle > span) {
min-width: 0;
}
:deep(.dock-switch-row strong),
:deep(.mobile-noise-toggle strong) {
:deep(.noise-suppression-toggle strong) {
display: block;
color: var(--text-primary);
font-size: 11px;
}
:deep(.mobile-noise-toggle) {
:deep(.noise-suppression-toggle) {
margin-bottom: 18px;
padding: 12px;
background: var(--surface-2);
@@ -6733,7 +6733,7 @@
border-radius: 11px;
}
:deep(.mobile-noise-toggle small) {
:deep(.noise-suppression-toggle small) {
display: block;
margin-top: 3px;
color: var(--text-muted);
@@ -6742,7 +6742,7 @@
}
:deep(.dock-switch-row input),
:deep(.mobile-noise-toggle input) {
:deep(.noise-suppression-toggle input) {
position: relative;
width: 34px;
height: 20px;
@@ -6759,7 +6759,7 @@
}
:deep(.dock-switch-row input::before),
:deep(.mobile-noise-toggle input::before) {
:deep(.noise-suppression-toggle input::before) {
content: "";
position: absolute;
top: 2px;
@@ -6772,19 +6772,19 @@
}
:deep(.dock-switch-row input:checked),
:deep(.mobile-noise-toggle input:checked) {
:deep(.noise-suppression-toggle input:checked) {
border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 72%, var(--surface-2));
}
:deep(.dock-switch-row input:checked::before),
:deep(.mobile-noise-toggle input:checked::before) {
:deep(.noise-suppression-toggle input:checked::before) {
background: var(--surface-1);
transform: translateX(14px);
}
:deep(.dock-switch-row input:focus-visible),
:deep(.mobile-noise-toggle input:focus-visible) {
:deep(.noise-suppression-toggle input:focus-visible) {
outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
outline-offset: 2px;
}
@@ -6817,7 +6817,7 @@
@media (prefers-reduced-motion: reduce) {
:deep(.dock-hover-panel),
:deep(.dock-switch-row input),
:deep(.mobile-noise-toggle input) {
:deep(.noise-suppression-toggle input) {
transition-duration: .01ms;
}
}
-1
View File
@@ -948,7 +948,6 @@
:model="audioSettingsState"
:controls="audioControls"
:microphone-error="voiceState.microphoneError"
:is-mobile-viewport="isMobileViewport"
:t="t"
:localized-message="localizedMessage"
:range-style="rangeStyle"