mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
fix(voice): improve performance panel dismissal
This commit is contained in:
1 parent
3ff6507943
commit
deb5ca4e43
9 files changed
+76
-21
No files matched your search
@@ -12,7 +12,7 @@
|
||||
|
||||
## 当前检查点(2026-10-11)
|
||||
|
||||
- 本地 `dev` 已包含 KAAK 3.1.33:输入/输出设备选择改为通用自绘键盘可访问下拉控件;成员姓名悬停反馈及频道分组收起/展开都加入短过渡。音量、性能卡片及屏幕分享范围见后续节点。
|
||||
- 本地 `dev` 已包含 KAAK 3.1.34:输入/输出设备选择改为通用自绘键盘可访问下拉控件;成员姓名悬停反馈及频道分组收起/展开都加入短过渡;性能卡片支持外部点击/Escape 收起、焦点返回和开合动画。音量、字体及屏幕分享范围见各节点记录。
|
||||
- 已授权第二个普通语音频道的聊天初始为展开。手动收起后聊天栏完全隐藏,成员舞台扩宽,频道标题与人数仍可见;成员姓名在收起状态常显。麦克风保持静音,没有发消息或执行管理员操作;随后已离开语音房间。该频道不作为音乐频道默认状态的证据。
|
||||
- 工作记录不存服务器地址、密码、密钥、房间名、成员名单或聊天内容。上一完整测试仍是 654/655,唯一失败为 `voice.member.mic-status` 布局钩子未注册。
|
||||
- 重新打开 KOOK 原始语音页并查看已授权的前两个语音频道。原页此前记录了“聊天展开时姓名标签仍可见”,但本轮首次进入后的截图修正了这一判断:静止时姓名隐藏,悬停成员卡后出现;聊天收起时姓名常显。首次进入已观察的两个授权语音频道时,右侧当前频道聊天均默认展开;不能据此推断音乐类频道默认状态。麦克风关闭、未发消息、未操作管理员功能;结束后关闭了临时 KOOK 标签。
|
||||
@@ -144,3 +144,13 @@
|
||||
- 代码盘点:对应样式与控件反馈已在 3.1.28 节点实现;当前待办是逐态验收,而非再造重复样式。个人菜单点击超时,浏览器桥接不稳定,未基于推测改代码。详细控件记录见 [KOOK 语音界面参考](./KOOK_VOICE_REFERENCE.zh-CN.md)。
|
||||
- 本次提交范围:仅补充本轮可核实的 KOOK 语音坞观察、麦克风状态和尚未验证的交互清单;没有代码行为变化,因此不重跑构建/测试。
|
||||
- 当前状态与下一步:该文档节点提交后推送 `dev`;后续恢复可靠的侧栏浏览器访问后,先验收 KAAK 音量滑杆的悬停/键盘与数值反馈、设备下拉展开态、性能卡片开合态,再按证据集中修皮肤节点;不切换真实设备、不改变音量、不运行麦克风测试。
|
||||
|
||||
## 本轮修改节点(2026-10-11,KAAK 3.1.34)
|
||||
|
||||
- 问题依据:性能卡片此前只有入口按钮可关闭,点击卡片外不会收起,Escape 也没有关闭/焦点返回;现有 KAAK 动画只覆盖打开。
|
||||
- 修改内容与边界:为通用性能面板增加外部指针按下收起、Escape 收起并把键盘焦点还给触发按钮;用 Vue Transition 暴露开合状态钩子。该交互可供所有皮肤复用,不包含 KAAK 特例行为;KAAK CSS 实现进入/退出淡入与轻移,并尊重减少动态效果偏好。没有改性能采样、音频状态或 TeamSpeak 连接逻辑。
|
||||
- 文档与分发包:KAAK 升至 3.1.34,更新说明、包版本断言、动画样式断言并重建两份 `.wskin`。
|
||||
- 原页核查:尝试从当前 KOOK 页读取音频相关控件时浏览器桥接超时;本节点只依据现有性能卡片代码和此前记录,没有新增 KOOK 行为或动效时长的断言。
|
||||
- 验证结果:`npm run skin:kaak:build`、`npm run web:build` 通过;皮肤包与目录定向测试 23/23 通过;`git diff --check` 通过。侧栏浏览器本地合成预览确认外部点击后 `aria-expanded=false`、Escape 后同样收起且焦点返回触发按钮,并检查卡片样式和网络数据布局。没有连接 TeamSpeak 或操作真实音频设备、音量、麦克风、屏幕分享。
|
||||
- 影响文件/提交:通用性能面板组件、KAAK 样式/说明/工作日志、皮肤包测试、内置目录包与两个分发包;随本节点提交推送 `dev`。
|
||||
- 当前状态与下一步:性能卡片有一致的关闭路径、开合动画和可访问焦点返回。KOOK 原页本轮桥接超时,没有新增观察或声称逐帧一致。此前待确认的音乐语音频道首次进入时聊天默认状态仍未得到用户选择,不能从现有 TeamSpeak 频道模型可靠判断;下一节点继续处理能直接核实的语音交互/字体差异,屏幕分享保持跳过。
|
||||
@@ -4,7 +4,7 @@ KAAK is a schema v3 open-skin package with full connection and voice-workspace s
|
||||
|
||||
The single TeamSpeak voice-channel group in the left tree collapses and expands with a short two-way height and fade transition like KOOK's voice group; the separate KOOK text-channel group remains outside this pass. A first click selects a channel and reveals a brief “双击加入” hint; the hint disappears on the active room. The current voice-room heading keeps the channel name and live member count visible above the participant stage while the attached chat is expanded, matching KOOK's room view.
|
||||
|
||||
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 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.
|
||||
|
||||
## Reference access note
|
||||
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
"packageType": "open-skin",
|
||||
"id": "community.kaak-voice",
|
||||
"name": "KAAK",
|
||||
"version": "3.1.33",
|
||||
"version": "3.1.34",
|
||||
"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.",
|
||||
|
||||
@@ -1435,12 +1435,23 @@
|
||||
border: 1px solid #3b3c42;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 16px 36px #0009;
|
||||
animation: kaak-performance-enter .16s cubic-bezier(.2, .75, .25, 1) both;
|
||||
}
|
||||
|
||||
@keyframes kaak-performance-enter {
|
||||
from { opacity: 0; transform: translateY(7px) scale(.985); }
|
||||
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||
[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: opacity .16s cubic-bezier(.2, .75, .25, 1), transform .16s cubic-bezier(.2, .75, .25, 1);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-enter-from,
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateY(7px) scale(.985);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-enter-to,
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .voice-performance-panel-leave-from {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .performance-panel header strong {
|
||||
@@ -1805,7 +1816,8 @@
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
[data-ws-plugin-part="kaak-workspace.channel-join-hint"] { animation: none; }
|
||||
[data-ws-plugin-part="kaak-workspace.performance-panel"] .performance-panel { animation: none; }
|
||||
[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-menu-enter-active,
|
||||
[data-ws-part="voice.audio-settings"] .settings-select-menu-leave-active { transition: none; }
|
||||
|
||||
Binary file not shown.
@@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<div
|
||||
ref="root"
|
||||
class="network-performance"
|
||||
data-ws-part="voice.performance"
|
||||
>
|
||||
<button
|
||||
ref="trigger"
|
||||
type="button"
|
||||
class="performance-trigger"
|
||||
:title="t('voiceStatus')"
|
||||
@@ -18,14 +20,15 @@
|
||||
name="chevron-down"
|
||||
:size="13"
|
||||
/></button>
|
||||
<section
|
||||
v-if="performancePanelOpen"
|
||||
class="performance-panel"
|
||||
data-ws-part="voice.performance.panel"
|
||||
role="dialog"
|
||||
:aria-label="t('voiceStatus')"
|
||||
@click.stop
|
||||
>
|
||||
<Transition name="voice-performance-panel">
|
||||
<section
|
||||
v-if="performancePanelOpen"
|
||||
class="performance-panel"
|
||||
data-ws-part="voice.performance.panel"
|
||||
role="dialog"
|
||||
:aria-label="t('voiceStatus')"
|
||||
@click.stop
|
||||
>
|
||||
<header
|
||||
><div
|
||||
><strong>{{ t("voiceStatus") }}</strong
|
||||
@@ -209,18 +212,21 @@
|
||||
>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</Transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref } from "vue";
|
||||
import Icon from "../Icon.vue";
|
||||
import type { useWebClientPerformance } from "../../composables/useWebClientPerformance.js";
|
||||
import type { ScreenShareWebRtcStats } from "../../composables/useVoiceWebSocket.js";
|
||||
const props = defineProps<{ model: ReturnType<typeof useWebClientPerformance>; screenShareWebRtcStats: ScreenShareWebRtcStats; showScreenShare?: boolean; t: (key: string) => string }>();
|
||||
const showScreenShare = props.showScreenShare !== false;
|
||||
const { panelOpen: performancePanelOpen, running: performanceRunning, stats: performanceStats, togglePanel: togglePerformancePanel, refresh: refreshPerformanceProbe } = props.model;
|
||||
const root = ref<HTMLElement | null>(null);
|
||||
const trigger = ref<HTMLButtonElement | null>(null);
|
||||
const t = props.t;
|
||||
const voiceHealthLabel = computed(() => t(({ disconnected: "voiceHealthDisconnected", sampling: "voiceHealthSampling", connecting: "voiceHealthConnecting", warning: "voiceHealthWarning", active: "voiceHealthActive", quiet: "voiceHealthQuiet" } as const)[performanceStats.value.health]));
|
||||
const voiceTransportLabel = computed(() => t(({ webrtc: "voiceTransportWebRTC", websocket: "voiceTransportWebSocket", negotiating: "voiceTransportNegotiating", disconnected: "voiceTransportDisconnected" } as const)[performanceStats.value.transport]));
|
||||
@@ -233,4 +239,28 @@ const voiceMicrophoneLabel = computed(() => performanceStats.value.microphoneMut
|
||||
? t("voiceMicUnavailable")
|
||||
: t("voiceMicWaiting"));
|
||||
|
||||
function onOutsidePointerDown(event: PointerEvent): void {
|
||||
if (performancePanelOpen.value && !root.value?.contains(event.target as Node)) {
|
||||
togglePerformancePanel();
|
||||
}
|
||||
}
|
||||
|
||||
function onEscape(event: KeyboardEvent): void {
|
||||
if (!performancePanelOpen.value || event.key !== "Escape") return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
togglePerformancePanel();
|
||||
void nextTick(() => trigger.value?.focus());
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener("pointerdown", onOutsidePointerDown, true);
|
||||
document.addEventListener("keydown", onEscape, true);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener("pointerdown", onOutsidePointerDown, true);
|
||||
document.removeEventListener("keydown", onEscape, true);
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -46,10 +46,10 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
|
||||
{
|
||||
id: BUILTIN_KAAK_SKIN_ID,
|
||||
name: "KAAK",
|
||||
version: "3.1.33",
|
||||
version: "3.1.34",
|
||||
author: "WebSpeak Project",
|
||||
license: "AGPL-3.0-only",
|
||||
description: "A KOOK-inspired voice-room workspace with collapsible voice groups and current voice-channel chat, TeamSpeak profile cards, and host-owned voice controls.",
|
||||
description: "A KOOK-inspired voice-room workspace with collapsible voice groups, current voice-channel chat, TeamSpeak profile cards, and accessible host-owned voice controls.",
|
||||
minAppVersion: "0.2.7-preview",
|
||||
installedAt: 0,
|
||||
builtIn: true,
|
||||
|
||||
@@ -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.33");
|
||||
assert.equal(skin.version, "3.1.34");
|
||||
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");
|
||||
@@ -553,6 +553,9 @@ 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, /settings-select-menu[\s\S]*?background: #35373d/);
|
||||
assert.match(skin.css, /settings-select-option[\s\S]*?min-height: 32px/);
|
||||
assert.match(skin.css, /voice-performance-panel-enter-active[\s\S]*?transition: opacity \.16s/);
|
||||
assert.match(skin.css, /voice-performance-panel-leave-active/);
|
||||
assert.match(skin.css, /voice-performance-panel-enter-from,[\s\S]*?voice-performance-panel-leave-to \{\s*opacity: 0;/);
|
||||
assert.match(skin.css, /kaak-workspace\.voice-channel-group-toggle/);
|
||||
assert.match(skin.css, /voice-channel-list[\s\S]*?grid-template-rows: 1fr;[\s\S]*?transition: grid-template-rows \.18s ease/);
|
||||
assert.match(skin.css, /data-voice-group-open="false"[\s\S]*?voice-channel-list[\s\S]*?grid-template-rows: 0fr;[\s\S]*?visibility: hidden;[\s\S]*?visibility 0s linear \.18s/);
|
||||
|
||||
Reference in new issue
Block a user