mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat(skins): refine KAAK voice workspace fidelity
This commit is contained in:
1 parent
ad0aa5c120
commit
7f5d3e1b3c
14 files changed
+134
-35
No files matched your search
Binary file not shown.
@@ -46,7 +46,7 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
|
||||
{
|
||||
id: BUILTIN_KAAK_SKIN_ID,
|
||||
name: "KAAK",
|
||||
version: "3.0.1",
|
||||
version: "3.0.6",
|
||||
author: "WebSpeak Project",
|
||||
license: "AGPL-3.0-only",
|
||||
description: "A complete dark voice workspace with server switching, channels, chat, members, and host-owned voice controls.",
|
||||
|
||||
@@ -4,6 +4,7 @@ import test from "node:test";
|
||||
import { strToU8, zipSync } from "fflate";
|
||||
import { importSkinPack, resolveSkinCssAssets, SkinPackError } from "./skin-pack.js";
|
||||
import { scopeBuiltinThemeForCustomSkin } from "./skin-cascade.js";
|
||||
import { BUILTIN_SKIN_CATALOG } from "./skin-catalog.js";
|
||||
import type { SkinPluginDocument, SkinPluginNode } from "../../../src/shared/skin-plugin.js";
|
||||
import { createSkinExtensionWasmPrefixByteImmediateProbe } from "../../test/skin-extension-wasm-fixture.js";
|
||||
|
||||
@@ -463,7 +464,8 @@ 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.1");
|
||||
assert.equal(skin.version, "3.0.6");
|
||||
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");
|
||||
const voice = skin.pluginData?.components.find((component) => component.page === "voice");
|
||||
@@ -493,6 +495,13 @@ 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, "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, "member-group-label")?.children?.[0]?.text, "在线 / ONLINE");
|
||||
assert.equal(findPart(voice?.root, "member-avatar")?.children?.[0]?.text, "{{member.avatarInitial}}");
|
||||
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");
|
||||
|
||||
@@ -4,6 +4,7 @@ import { splitTeamSpeakTarget } from "./teamspeak-target.js";
|
||||
export interface SkinPluginQuickServer {
|
||||
id: string;
|
||||
label: string;
|
||||
monogram: string;
|
||||
current: boolean;
|
||||
kind: "favorite" | "recent";
|
||||
favorite: boolean;
|
||||
@@ -45,6 +46,7 @@ export function createSkinPluginQuickServerProjection(createId: () => string = r
|
||||
return {
|
||||
id: opaqueId,
|
||||
label: safeLabel,
|
||||
monogram: Array.from(safeLabel)[0] ?? "?",
|
||||
current: isCurrent(server),
|
||||
kind: server.isFavorite ? "favorite" : "recent",
|
||||
favorite: server.isFavorite,
|
||||
|
||||
@@ -63,6 +63,11 @@ test("skin quick-server data redacts connection targets and resolves only host-g
|
||||
const projection = createSkinPluginQuickServerProjection(() => `opaque-${++sequence}`);
|
||||
const rows = projection.project(servers, (server) => server.id === "voice2.example:9987");
|
||||
|
||||
assert.deepEqual(rows.map(({ label, monogram }) => [label, monogram]), [
|
||||
["Favorite 1", "F"],
|
||||
["Recent 2", "R"],
|
||||
["Friends", "F"],
|
||||
]);
|
||||
assert.deepEqual(rows.map(({ label, kind, favorite, current }) => [label, kind, favorite, current]), [
|
||||
["Favorite 1", "favorite", true, false],
|
||||
["Recent 2", "recent", false, false],
|
||||
|
||||
@@ -1532,6 +1532,7 @@ const skinPluginFavorites = computed(() => skinPluginQuickList.value
|
||||
const skinPluginMembers = computed(() => memberChannels.value.flatMap((item) => item.members.map((member) => ({
|
||||
id: String(member.id),
|
||||
name: member.nickname,
|
||||
avatarInitial: Array.from(member.nickname.trim())[0] ?? "?",
|
||||
channelId: item.id,
|
||||
status: member.away ? "away" : member.inputMuted ? "muted" : speakingIds.has(member.id) ? "speaking" : "online",
|
||||
speaking: speakingIds.has(member.id),
|
||||
|
||||
Reference in new issue
Block a user