mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat(web): add skinnable favorite server switching
This commit is contained in:
1 parent
ae1cd707be
commit
b6e4d349a2
19 files changed
+1220
-44
No files matched your search
@@ -32,11 +32,11 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
|
||||
{
|
||||
id: BUILTIN_ILLUSIA_SKIN_ID,
|
||||
name: "ILLUSIA风",
|
||||
version: "1.0.27",
|
||||
version: "1.0.28",
|
||||
author: "WebSpeak Project",
|
||||
license: "All rights reserved",
|
||||
description: "A bright original-character art skin for the home, voice room, and demo pages.",
|
||||
minAppVersion: "0.2.6",
|
||||
minAppVersion: "0.2.7-preview",
|
||||
previewUrl: "/skins/illusia-voice-preview.webp",
|
||||
installedAt: 0,
|
||||
builtIn: true,
|
||||
|
||||
@@ -132,7 +132,8 @@ test("the ILLUSIA visual-only example imports without replacing WebSpeak's base
|
||||
const skin = await importSkinPack(new File([bytes], "illusia-voice.wskin", { type: "application/octet-stream" }));
|
||||
assert.equal(skin.id, "community.illusia-voice");
|
||||
assert.equal(skin.name, "ILLUSIA风");
|
||||
assert.equal(skin.version, "1.0.27");
|
||||
assert.equal(skin.version, "1.0.28");
|
||||
assert.equal(skin.minAppVersion, "0.2.7-preview");
|
||||
assert.equal(skin.contentData, undefined);
|
||||
assert.equal(skin.previewBlob?.type, "image/webp");
|
||||
assert.ok(skin.assets["assets/background-composite.webp"]);
|
||||
@@ -152,6 +153,10 @@ test("the ILLUSIA visual-only example imports without replacing WebSpeak's base
|
||||
assert.match(skin.css, /language\.menu[^{}]*\[role="listbox"\]/);
|
||||
assert.match(skin.css, /language\.option/);
|
||||
assert.match(skin.css, /data-ws-skin-id="community\.illusia-voice"/);
|
||||
assert.match(skin.css, /data-ws-part="voice\.favorite-servers\.rail"/);
|
||||
assert.match(skin.css, /data-ws-part="voice\.favorite-servers\.strip\.server"\]\[data-ws-state="current"\]/);
|
||||
assert.match(skin.css, /data-ws-part="voice\.favorite-servers\.dialog"\]\s*\{[^}]*background:\s*linear-gradient/s);
|
||||
assert.match(skin.css, /data-ws-part="voice\.favorite-servers\.dialog\.input"\]:focus-visible\s*\{[^}]*box-shadow:/s);
|
||||
assert.match(skin.css, /data-ws-part="home\.join-card\.waveform"/);
|
||||
assert.match(skin.css, /data-ws-part="home\.join-card\.sonar"/);
|
||||
assert.match(skin.css, /data-ws-part="home\.join-card"\]\s*\{[^}]*background-image:\s*url\("wskin-asset:assets%2Fbanner-mascot-blob\.webp"\)/s);
|
||||
|
||||
@@ -33,7 +33,7 @@ export async function activateStoredSkin(): Promise<InstalledSkin | null> {
|
||||
return activateSkin(selectedId);
|
||||
}
|
||||
|
||||
export async function activateSkin(id: string, expectedVersion?: string, appVersion = "0.2.6", options: SkinLoadOptions = {}): Promise<InstalledSkin | null> {
|
||||
export async function activateSkin(id: string, expectedVersion?: string, appVersion = "0.2.7-preview", options: SkinLoadOptions = {}): Promise<InstalledSkin | null> {
|
||||
// An already retired page must not cancel a newer page's activation.
|
||||
options.signal?.throwIfAborted();
|
||||
pendingActivation?.cancel();
|
||||
|
||||
Reference in new issue
Block a user