feat(kaak): match provided voice dock layout

This commit is contained in:
Corrupted ILLUSIA committed 2026-10-11 12:31:02 +08:00
1 parent b9f3272210
commit 74ee82a927
10 files changed
+77 -41

No files matched your search

+1
View File
@@ -72,6 +72,7 @@
<path v-else-if="name === 'users'" d="M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2m6-10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm6-7a4 4 0 0 1 0 7m2 5h1a4 4 0 0 1 4 4v1" />
<path v-else-if="name === 'message'" d="M20 11.5a7.5 7.5 0 0 1-8 7.5 9.4 9.4 0 0 1-3-.5L4 20l1.5-3.6A7.2 7.2 0 0 1 4 11.5 7.5 7.5 0 0 1 12 4a7.5 7.5 0 0 1 8 7.5Z" />
<path v-else-if="name === 'door'" d="M10 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5m5 14 5-5-5-5m5 5H9" />
<path v-else-if="name === 'power'" d="M12 2v10m-5.9-5.1a9 9 0 1 0 11.8 0" />
<path v-else-if="name === 'waveform'" d="M3 12h2l2-6 3 12 3-9 2 6h6" />
<template v-else-if="name === 'noise-suppression'">
<path d="M2.5 13h2l2-5 2.7 9 2.4-7 1.4 3H15" />
+4 -4
View File
@@ -11,12 +11,12 @@
<button
v-if="layout === 'room-panel'"
type="button"
class="room-panel-voice-sensitivity"
:aria-label="t('voiceActivity')"
:title="t('voiceActivity')"
class="room-panel-audio-settings"
:aria-label="t('audioSettings')"
:title="t('audioSettings')"
aria-haspopup="dialog"
@click="emit('settings')"
><Icon name="activity" :size="16" /><span>{{ t("voiceActivity") }}</span></button
><span>{{ t("voiceActivity") }}</span><Icon name="settings" :size="16" /></button
>
<div class="desktop-audio-dock-copy"
><strong>{{ t("desktopAudioControls") }}</strong
+1 -1
View File
@@ -46,7 +46,7 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
{
id: BUILTIN_KAAK_SKIN_ID,
name: "KAAK",
version: "3.1.56",
version: "3.1.58",
author: "WebSpeak Project",
license: "AGPL-3.0-only",
description: "A KOOK-inspired voice-room workspace with collapsible voice groups, channel chat, TeamSpeak profile cards, accessible host-owned member controls, and WebSpeak screen sharing.",
+7 -2
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.56");
assert.equal(skin.version, "3.1.58");
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");
@@ -560,6 +560,11 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
assert.match(skin.css, /voice-dock-actions"\] \{[\s\S]*?grid-template-columns: minmax\(0, 1fr\) 37px 37px;[\s\S]*?grid-template-rows: 28px 23px;/);
assert.match(skin.css, /desktop-audio-dock-room-panel \{[\s\S]*?grid-template-columns: subgrid;[\s\S]*?grid-template-rows: subgrid;/);
assert.match(skin.css, /kaak-workspace\.voice-dock-share[\s\S]*?skin-runtime-screen-share-start \{[\s\S]*?height: 28px;[\s\S]*?background: #6cbf00;/);
assert.match(skin.css, /room-panel-audio-settings[\s\S]*?grid-column: 1;[\s\S]*?grid-row: 2;/);
assert.match(skin.css, /noise-suppression-toggle \{ grid-column: 2; grid-row: 1; align-self: center; \}/);
assert.match(skin.css, /voice\.audio-dock\.microphone[\s\S]*?grid-column: 2;[\s\S]*?grid-row: 2;/);
assert.match(skin.css, /voice\.audio-dock\.output[\s\S]*?grid-column: 3;[\s\S]*?grid-row: 2;/);
assert.match(skin.css, /accompaniment-toggle \{[\s\S]*?grid-column: 3;[\s\S]*?grid-row: 1;/);
assert.match(skin.css, /voice\.member\.action-trigger[\s\S]*?width: 44px;/);
assert.match(skin.css, /--skin-kaak-accent-hover: #7ac51a;/);
assert.match(skin.css, /voice-card\[data-ws-speaking="true"\] > span \{\s*color: var\(--skin-kaak-accent\);\s*\}/);
@@ -752,7 +757,7 @@ test("the Harbor voice skin imports a complete voice-only KOOK-inspired workspac
assert.ok(skin.css.includes('[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="1"]'));
assert.ok(skin.css.includes('[data-ws-plugin-part="harbor-workspace.identity-entry"]'));
assert.ok(skin.css.includes('data-ws-plugin-part="harbor-workspace.screen-share-start"'), "the host screen-share control uses the stable plugin part hook");
assert.ok(skin.css.includes(".accompaniment-toggle { display: none; }"));
assert.ok(skin.css.includes(".accompaniment-toggle { display: none; }"));
assert.ok(!skin.css.includes("https://"), "the skin uses no remote artwork or font resources");
});
+17 -7
View File
@@ -1773,10 +1773,10 @@ const skinPluginWidgets = {
h("button", {
type: "button",
class: "mobile-voice-activity",
"aria-label": t("voiceActivity"),
title: t("voiceActivity"),
"aria-label": t("audioSettings"),
title: t("audioSettings"),
onClick: () => { settingsOpen.value = true; },
}, [h(Icon, { name: "activity", size: 16 }), h("span", null, t("voiceActivity"))]),
}, [h("span", null, t("voiceActivity")), h(Icon, { name: "settings", size: 16 })]),
h("button", {
type: "button",
class: ["mobile-voice-toggle", "mobile-noise-suppression", noiseSuppressionEnabled.value && "active"],
@@ -1788,18 +1788,28 @@ const skinPluginWidgets = {
] : []),
h("button", {
type: "button",
class: ["mobile-voice-toggle", microphoneMuted.value && "muted"],
class: ["mobile-voice-toggle", "mobile-microphone-toggle", microphoneMuted.value && "muted"],
"aria-label": t("microphone"),
"aria-pressed": !microphoneMuted.value,
onClick: toggleMicrophone,
}, [h(Icon, { name: microphoneMuted.value ? "mic-off" : "mic", size: 20 }), h("span", null, t("microphone"))]),
h("button", {
type: "button",
class: ["mobile-voice-toggle", outputMuted.value && "muted"],
class: ["mobile-voice-toggle", "mobile-output-toggle", outputMuted.value && "muted"],
"aria-label": t("speaker"),
"aria-pressed": !outputMuted.value,
onClick: toggleOutputMute,
}, [h(Icon, { name: outputMuted.value ? "volume-off" : "volume", size: 20 }), h("span", null, t("speaker"))]),
}, [h(Icon, { name: outputMuted.value ? "volume-off" : "volume", size: 20 }), h("span", null, t("speaker"))]),
...(options?.layout === "room-panel" ? [
h("button", {
type: "button",
class: ["mobile-voice-toggle", "mobile-accompaniment-toggle", accompanimentActive.value && "active"],
"aria-label": accompanimentActive.value ? t("stopAccompaniment") : t("startAccompaniment"),
title: accompanimentActive.value ? t("stopAccompaniment") : t("startAccompaniment"),
"aria-pressed": accompanimentActive.value,
onClick: audioControls.toggleAccompaniment,
}, [h(Icon, { name: "music", size: 18 })]),
] : []),
])
: h(AudioDock, {
model: audioDockState,
@@ -1849,7 +1859,7 @@ const skinPluginWidgets = {
class: "ws-plugin-disconnect-control",
"aria-label": t("exit"),
onClick: leaveVoiceWorkspace,
}, [h(Icon, { name: "door", size: 18 }), h("span", null, t("exit"))]),
}, [h(Icon, { name: "power", size: 18 }), h("span", null, t("exit"))]),
};
watch(() => pokeNotifications.length, (length, previousLength) => {