mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat(skins): refine KAAK voice channel chat
This commit is contained in:
1 parent
7b31c9106a
commit
f6ef471960
13 files changed
+300
-333
No files matched your search
@@ -46,10 +46,10 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
|
||||
{
|
||||
id: BUILTIN_KAAK_SKIN_ID,
|
||||
name: "KAAK",
|
||||
version: "3.0.9",
|
||||
version: "3.1.5",
|
||||
author: "WebSpeak Project",
|
||||
license: "AGPL-3.0-only",
|
||||
description: "A KOOK-inspired voice-room workspace with server switching, channels, participant stage, chat, and host-owned voice controls.",
|
||||
description: "A KOOK-inspired voice-room workspace with collapsible current voice-channel chat, TeamSpeak profile cards, and 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.0.9");
|
||||
assert.equal(skin.version, "3.1.5");
|
||||
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");
|
||||
@@ -478,6 +478,7 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
|
||||
assert.ok(voice?.permissions.includes("servers.quickList.switch"));
|
||||
assert.ok(voice?.permissions.includes("session.channels.read"));
|
||||
assert.ok(voice?.permissions.includes("session.members.read"));
|
||||
assert.ok(voice?.permissions.includes("session.memberAvatars.read"));
|
||||
assert.ok(voice?.permissions.includes("chat.channel.read"));
|
||||
assert.ok(voice?.permissions.includes("chat.channel.send"));
|
||||
assert.ok(voice?.permissions.includes("audio.microphone.control"));
|
||||
@@ -495,29 +496,37 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
|
||||
const channelRow = findPart(voice?.root, "channel-row");
|
||||
assert.equal(channelRow?.events?.click, "select-channel");
|
||||
assert.equal(channelRow?.events?.dblclick, "join-channel");
|
||||
assert.equal(findPart(voice?.root, "text-channel-group-toggle"), undefined);
|
||||
assert.equal(findPart(voice?.root, "text-channel-list"), undefined);
|
||||
assert.equal(findPart(voice?.root, "voice-channel-group-toggle"), undefined);
|
||||
assert.equal(findPart(voice?.root, "voice-channel-list")?.when, undefined);
|
||||
const chatToggle = findPart(voice?.root, "chat-panel-toggle");
|
||||
assert.equal(chatToggle?.events?.click, "toggle-chat-panel");
|
||||
assert.equal(chatToggle?.attributes?.["aria-expanded"], "{{state.chatopen}}");
|
||||
assert.deepEqual(findPart(voice?.root, "chat")?.when, { path: "state.chatopen", equals: true });
|
||||
assert.equal(voice?.root.attributes?.["data-chat-open"], "{{state.chatopen}}");
|
||||
assert.equal(findPart(voice?.root, "server-monogram")?.children?.[0]?.text, "{{server.monogram}}");
|
||||
assert.deepEqual(findPart(voice?.root, "channel-voice-members")?.when, { path: "channel.members", empty: false });
|
||||
assert.equal(findPart(voice?.root, "channel-voice-member")?.repeat?.path, "channel.members");
|
||||
assert.equal(findPart(voice?.root, "channel-member-avatar")?.children?.[0]?.text, "{{voicemember.avatarInitial}}");
|
||||
assert.equal(findPart(voice?.root, "voice-stage")?.attributes?.["aria-label"], "语音房间 / Voice room");
|
||||
assert.equal(findPart(voice?.root, "member-group-label"), undefined);
|
||||
assert.equal(findPart(voice?.root, "member-avatar")?.children?.[0]?.text, "{{member.avatarInitial}}");
|
||||
assert.equal(findPart(voice?.root, "member-speaking-ring")?.when?.path, "member.speaking");
|
||||
assert.equal(findPart(voice?.root, "member-speaking-wave")?.attributes?.["aria-hidden"], "true");
|
||||
assert.equal(findPart(voice?.root, "member-speaking-bar")?.tag, "i");
|
||||
assert.equal(findPart(voice?.root, "member-cards")?.widget, "voice.member-cards");
|
||||
assert.equal(findPart(voice?.root, "member-list"), undefined);
|
||||
assert.equal(findPart(voice?.root, "screen-player")?.widget, "voice.screen-share-player");
|
||||
assert.equal(findPart(voice?.root, "performance-panel")?.widget, "voice.performance-panel");
|
||||
assert.equal(findPart(voice?.root, "chat-input")?.bindValue, "message");
|
||||
assert.equal(findPart(voice?.root, "screen-share-start")?.widget, "voice.screen-share-start");
|
||||
assert.equal(findPart(voice?.root, "audio-controls")?.widget, "voice.audio-controls");
|
||||
assert.ok(skin.css.includes('[data-ws-plugin-part="kaak-workspace.channel-row"]'));
|
||||
assert.match(skin.css, /data-chat-open="false"[\s\S]*?grid-template-columns:[^;]*52px;/);
|
||||
assert.match(skin.css, /kaak-workspace\.chat-panel-toggle/);
|
||||
assert.match(skin.css, /kaak-workspace\.voice-stage[\s\S]*?grid-column: 3;/);
|
||||
assert.match(skin.css, /kaak-workspace\.conversation[\s\S]*?grid-column: 4;/);
|
||||
assert.match(skin.css, /kaak-workspace\.member-row[\s\S]*?min-height: 274px;/);
|
||||
assert.match(skin.css, /kaak-workspace\.member-cards[\s\S]*?\.voice-card[\s\S]*?min-height: 274px;/);
|
||||
assert.match(skin.css, /@keyframes ws-community-kaak-voice-kaak-member-speaking-ring/);
|
||||
assert.match(skin.css, /animation: ws-community-kaak-voice-kaak-member-speaking-ring 1\.8s ease-out infinite/);
|
||||
assert.match(skin.css, /@keyframes ws-community-kaak-voice-kaak-member-speaking-bars/);
|
||||
assert.match(skin.css, /animation: ws-community-kaak-voice-kaak-member-speaking-bars \.72s ease-in-out infinite alternate/);
|
||||
assert.match(skin.css, /@keyframes ws-community-kaak-voice-kaak-member-speaking-wave/);
|
||||
assert.match(skin.css, /animation: ws-community-kaak-voice-kaak-member-speaking-wave \.72s ease-in-out infinite alternate/);
|
||||
assert.match(skin.css, /kaak-workspace\.identity-entry[\s\S]*?position: absolute;/);
|
||||
assert.ok(skin.css.includes("@media (max-width: 820px)"));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user