feat(kaak): match device picker geometry

This commit is contained in:
illusia committed 2026-10-11 05:41:07 +08:00
1 parent c29109e898
commit 0453bc6d4a
12 files changed
+110 -41

No files matched your search

+12 -3
View File
@@ -12,10 +12,10 @@
## 当前检查点(2026-10-11)
- KAAK 已推送到 `dev` 并升至 3.1.39;语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均有对应实现,音频设置标签明确为 KOOK 已记录的 14px/400。
- KAAK 已推送到 `dev` 并升至 3.1.40;语音布局、成员卡、频道/聊天收起、音量反馈、性能卡片、设备下拉交互和字体层级均有对应实现,音频设置标签明确为 KOOK 已记录的 14px/400。
- 直接观察记录覆盖语音侧栏/频道树、成员卡与悬停姓名、当前语音频道聊天开合、语音坞、音频设置字体及设备列表尺寸和状态。付费屏幕分享与独立文字频道暂不复刻。
- 最近推送的设备菜单视口适配已验证;完整测试 660/660,服务端与前端构建通过。用户已明确 KOOK 音乐语音频道附带聊天默认收起、普通语音频道默认展开。TeamSpeak `ChannelInfo` 与皮肤上下文没有音乐类别字段,KAAK 当前无法自动按类别应用两种默认值;不按频道名猜测,后续需要通用的显式分类来源。
- 本轮未操作真实音量、设备或麦克风;KOOK 原页本轮未重新观察,不新增关于原页动画/反馈的断言。
- 本轮设备选择器样式更新为 KAAK 3.1.40,通用定位按皮肤菜单实测高度适配;完整测试 661/661,服务端与前端构建通过。用户已明确 KOOK 音乐语音频道附带聊天默认收起、普通语音频道默认展开。TeamSpeak `ChannelInfo` 与皮肤上下文没有音乐类别字段,KAAK 当前无法自动按类别应用两种默认值;不按频道名猜测,后续需要通用的显式分类来源。
- 本轮只读取 KOOK 公开静态样式资源核对设备菜单几何和颜色;没有操作原页、真实音量、设备或麦克风,也未对动画行为新增断言。
## 已完成的修改节点
@@ -238,3 +238,12 @@
- 代码检查:TeamSpeak `ChannelInfo` 和传给皮肤的 `session.channels` 均没有音乐/普通频道类别字段,因此皮肤不能可靠地自动应用这两种初始状态。当前不按名称猜测,也不修改 KAAK 或 WebSpeak 行为。
- 当前状态与下一步:继续按已有计划覆盖界面、交互反馈和字体;若要支持不同的初始聊天状态,先从通用频道元数据中取得明确类别,再按该数据实现。屏幕分享继续跳过。
- 影响文件/提交:仅更新 KOOK 参考记录与本工作日志;不涉及代码或分发包。`git diff --check` 通过,无需重跑构建和测试。
## 本轮修改节点(2026-10-11,KAAK 3.1.40 设备菜单几何与状态)
- 差异依据:KOOK 公开语音页静态样式资源显示选择框/菜单为 12px 圆角、菜单内边距 8px;选项为 32px 高、8px 圆角、上下间隔 2px、左右内边距 8px。深色菜单底色为 `#25262a`、文字为 `#e6eaf0`、品牌绿为 `#6cbf00`,悬停约 6% 白色、选中约 10% 白色。与当前 KAAK 的 9px/7px 圆角、4px 菜单内边距、12px 选项内边距和更亮的菜单底色存在明确差异。
- 修改内容与边界:KAAK 音频设置设备选择器 CSS 对齐触发器/菜单圆角、选项节奏、箭头位置/旋转、颜色和悬停/选中对比。发现通用定位器按固定 32px 行高估算高度,与皮肤可自定义的 2px 行间距不兼容;现改为测量渲染后菜单的自然高度再按视口限高。该定位改进不含 KAAK 分支;设备键盘操作和音频逻辑保持不变。
- 文档与分发包:KAAK 升至 3.1.40,更新静态样式参考和 CSS 包断言,重建示例与内置 `.wskin` 分发包。
- 验证:皮肤包构建通过;完整 `npm test` 661/661、`npm run build`、`npm run web:build` 和 `git diff --check` 通过。新增定位测试覆盖皮肤自定义菜单自然高度,既有视口边界测试也通过。此次只读取公开 CSS 资产,没有控制用户浏览器、选择设备或改变音频状态;未做本地视觉验收。
- 影响文件/提交:KAAK 样式、清单、内置目录、通用设备菜单定位、相关测试、参考/工作文档和两个分发包。
- 当前状态与下一步:设备菜单尺寸、状态色和视口适配已更新;后续仍需在允许的本地浏览器里核对真实计算样式及剩余交互状态,再选择下一项成组修改。
+1 -1
View File
@@ -27,7 +27,7 @@
- 左下语音坞用绿色信号柱表示连接状态,断开入口单独放在右上;音频开关排列在坞底部,图标按钮尺寸紧凑。屏幕分享按用户要求暂不作为复刻目标,也未操作。
- KOOK 的语音设置可从个人菜单进入,页面把输入/输出设备选择、麦克风输入音量和语音输出音量放在同一张深色设置卡片内;输入设备下方提供本地麦克风测试。
- 设备选择是自绘下拉列表:选择框约 40px 高,选项列表可滚动、最多约 240px 高,每项约 32px;当前项有浅色底,箭头在开合时旋转。我们只展开并收起输入设备列表,没有选择设备。
- 设备选择是自绘下拉列表:选择框约 40px 高,选项列表可滚动、最多约 240px 高,每项约 32px;当前项有浅色底,箭头在开合时旋转。对照 KOOK 公开样式资源后补充:触发框和菜单为 12px 圆角,菜单内边距 8px;选项为 8px 圆角、上下间隔 2px、左右内边距 8px,深色菜单底色为 `#25262a`,文本为 `#e6eaf0`,品牌绿为 `#6cbf00`,悬停与选中底色分别约为白色 6% 与 10% 透明度,菜单阴影为 2px/8px、黑色 32% 透明度。此项来自静态样式资源,不代表本轮重新操作了页面。我们此前只展开并收起输入设备列表,没有选择设备。
- 设置页采用 PingFang SC 优先的中英文字体栈。主标题为 32px/600,分区标题 16px/600,设备和音量标签 14px/400。滑杆的圆形拇指为 16px,带绿色描边。没有拖动滑杆,因此不推断声音反馈或音量更新动画。
- KAAK 对应使用通用宿主设备选择控件,交互包含点击展开、方向键/Home/End 导航、回车选择、Esc 收起和输入名称的快速定位;皮肤定义展开列表、选中/悬停/键盘态与 KOOK 字体。性能卡片仍是 WebSpeak 自己的诊断入口,不声称 KOOK 具有该面板。
- 本次本地 KAAK 对照打开了 WebSpeak 的音频配置弹窗,没有更换设备、移动音量、启动麦克风测试或开启麦克风。设备名称不写入文档。
+2
View File
@@ -6,6 +6,8 @@ The single TeamSpeak voice-channel group in the left tree collapses and expands
The design target is the voice-client portion of KOOK, as requested by the project owner. It does not include discovery, companion/party, event, store, advertising, administrator, or other service-operator pages. It does not add a KOOK account flow, direct messages, server administration, or channels absent from the connected TeamSpeak server. The voice performance card also closes on outside click or Escape; Escape returns focus to its trigger, and its entrance/exit motion respects reduced-motion preferences.
The device picker now follows the public KOOK style geometry: a 40px trigger with 12px corners, a menu with 12px corners and 8px inset, and 32px rows with 2px gaps and 8px corners. Hover and selected rows use distinct low-contrast fills. The shared host measures the rendered menu before applying viewport limits, so skin-defined padding and row spacing stay visible without a KAAK-specific placement path.
## 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.39",
"version": "3.1.40",
"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.",
+62 -22
View File
@@ -1678,47 +1678,86 @@
[data-ws-part="voice.audio-settings"] .settings-select {
display: flex;
position: relative;
min-height: 40px;
color: #e9eaed;
color: #e6eaf0;
appearance: none;
padding: 0 12px;
background: #2a2b31;
border: 1px solid #414249;
border-radius: 9px;
padding: 0 48px 0 16px;
background: transparent;
border: 1px solid #ffffff1a;
border-radius: 12px;
font-family: var(--skin-kaak-font);
font-size: 14px;
transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
line-height: 20px;
transition: border-color .16s ease, box-shadow .16s ease;
}
[data-ws-part="voice.audio-settings"] .settings-select:hover:not(:disabled) {
background: #303137;
border-color: #595a62;
border-color: #6cbf00;
}
[data-ws-part="voice.audio-settings"] .settings-select:focus-visible {
border-color: #70d48a;
box-shadow: 0 0 0 3px #58c87730;
border-color: #6cbf00;
box-shadow: 0 0 0 3px #6cbf001a;
}
[data-ws-part="voice.audio-settings"] .settings-select:active:not(:disabled) { border-color: #70d48a; }
[data-ws-part="voice.audio-settings"] .settings-select:active:not(:disabled),
[data-ws-part="voice.audio-settings"] .settings-select[aria-expanded="true"]:not(:disabled) {
border-color: #6cbf00;
box-shadow: 0 0 0 3px #6cbf001a;
}
[data-ws-part="voice.audio-settings"] .settings-select:disabled { cursor: not-allowed; opacity: .55; }
[data-ws-part="voice.audio-settings"] .settings-select-chevron { color: #aeb0b7; }
[data-ws-part="voice.audio-settings"] .settings-select[aria-expanded="true"] .settings-select-chevron { color: #80df98; }
[data-ws-part="voice.audio-settings"] .settings-select-chevron { color: #e6eaf0; }
[data-ws-part="voice.audio-settings"] .settings-select[aria-expanded="true"] .settings-select-chevron { transform: translateY(-50%); }
[data-ws-part="voice.audio-settings"] .settings-select-chevron {
position: absolute;
top: 50%;
right: 16px;
width: 16px;
height: 16px;
margin: 0;
border: 0;
transform: translateY(-50%);
transition: color .2s ease;
}
[data-ws-part="voice.audio-settings"] .settings-select-chevron::before {
content: "";
position: absolute;
top: 3px;
left: 4px;
width: 7px;
height: 7px;
border: solid currentColor;
border-width: 0 1.5px 1.5px 0;
transform: rotate(45deg);
transition: transform .2s ease;
}
[data-ws-part="voice.audio-settings"] .settings-select[aria-expanded="true"] .settings-select-chevron::before {
transform: rotate(225deg);
}
[data-ws-part="voice.audio-settings"] .settings-select-label {
width: 100%;
}
[data-ws-part="voice.audio-settings"] .settings-select-menu {
padding: 4px 0;
color: #e9eaed;
border-color: #45464d;
border-radius: 7px;
background: #35373d;
box-shadow: 0 12px 28px #000a;
padding: 8px;
color: #e6eaf0;
border: 0;
border-radius: 12px;
background: #25262a;
box-shadow: 0 2px 8px rgba(0, 0, 0, .32);
}
[data-ws-part="voice.audio-settings"] .settings-select-option {
height: 32px;
min-height: 32px;
padding-inline: 12px;
color: #e5e6e9;
margin-bottom: 2px;
padding-inline: 8px;
color: #e6eaf0;
font-size: 14px;
line-height: 32px;
border-radius: 8px;
}
[data-ws-part="voice.audio-settings"] .settings-select-option:hover,
[data-ws-part="voice.audio-settings"] .settings-select-option:last-child { margin-bottom: 0; }
[data-ws-part="voice.audio-settings"] .settings-select-option:hover { background: #ffffff0f; }
[data-ws-part="voice.audio-settings"] .settings-select-option.active,
[data-ws-part="voice.audio-settings"] .settings-select-option[aria-selected="true"] {
background: #ffffff1a;
@@ -1826,6 +1865,7 @@
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-enter-active,
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-leave-active { transition-duration: .01ms; }
[data-ws-part="voice.audio-settings"] .settings-select-chevron,
[data-ws-part="voice.audio-settings"] .settings-select-chevron::before,
[data-ws-part="voice.audio-settings"] .settings-select-menu-enter-active,
[data-ws-part="voice.audio-settings"] .settings-select-menu-leave-active { transition: none; }
[data-ws-plugin-part="kaak-workspace"] .dock-slider::-webkit-slider-thumb,