mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-06 05:22:49 +08:00
feat(skins): bundle the Classic 4.1.16 skin with the client
Add Classic (community.ts3-classic-console) as a bundled skin next to KAAK: example sources under docs/examples/ts3-classic-console, a reproducible skin:classic:build script that also packs chrome.json and writes identical archives to docs/examples/ and web/public/skins/, a built-in catalog entry and bundled package URL, and admin registry protection against replace, disable and delete. Classic stays outside the official consent-free skin list, so visitors without instance consent still see only Day, Night and ILLUSIA.
This commit is contained in:
1 parent
001457d004
commit
25b0a01ae7
24 files changed
+3590
-20
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { zipSync } from "fflate";
|
||||
|
||||
// Classic release 4.1.16 layout: the five package files sit at the ZIP root,
|
||||
// in this order, and the archive also carries the skin's chrome.json.
|
||||
const sourceDirectory = new URL("../../docs/examples/ts3-classic-console/", import.meta.url);
|
||||
const sourceFiles = ["manifest.json", "skin.css", "content.json", "components.json", "chrome.json"];
|
||||
const files = Object.fromEntries(await Promise.all(sourceFiles.map(async (name) => [
|
||||
name,
|
||||
await readFile(new URL(name, sourceDirectory)),
|
||||
])));
|
||||
// Fixed ZIP timestamp (local-component constructor, independent of the build
|
||||
// machine's time zone) so rebuilding reproduces the published 4.1.16 archive
|
||||
// byte for byte instead of stamping the current time.
|
||||
const releaseTimestamp = new Date(2026, 11, 4, 13, 10, 52);
|
||||
const archive = zipSync(files, { level: 9, mtime: releaseTimestamp });
|
||||
|
||||
await Promise.all([
|
||||
writeFile(fileURLToPath(new URL("../../docs/examples/ts3-classic-console.wskin", import.meta.url)), archive),
|
||||
writeFile(fileURLToPath(new URL("../public/skins/ts3-classic-console.wskin", import.meta.url)), archive),
|
||||
]);
|
||||
Reference in new issue
Block a user