mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat: add host chrome theming and a skin-proof recovery layer
Allow skins to theme host chrome through a second scope and explicit visibleParts. Official and built-in skins stay decoration-free by default. Harden the CSS compiler so skins cannot hide the document root, push protected controls off-screen, or target the host layer with sibling selectors. Move recovery and authorization UI into a closed Shadow DOM on the top layer, so a third-party skin cannot block the built-in skin reset.
This commit is contained in:
1 parent
33ba062686
commit
f8d61d22ef
45 files changed
+3535
-558
No files matched your search
@@ -22,7 +22,11 @@ const skin = id => ({ id, name: id, version: "1.0.0", minAppVersion: "0.2.6",
|
||||
css: `[data-ws-skin="${id}"] { --skin-test: blue; }`, assets: {}, installedAt: 1 });
|
||||
const json = body => new Response(JSON.stringify(body));
|
||||
class Element {
|
||||
dataset = {}; textContent = ""; id = "";
|
||||
dataset = {}; textContent = ""; id = ""; attributes = new Map();
|
||||
setAttribute(name, value) { this.attributes.set(String(name), String(value)); }
|
||||
getAttribute(name) { return this.attributes.get(String(name)) ?? null; }
|
||||
hasAttribute(name) { return this.attributes.has(String(name)); }
|
||||
removeAttribute(name) { this.attributes.delete(String(name)); }
|
||||
append(el) { elements.set(el.id, el); }
|
||||
remove() { elements.delete(this.id); }
|
||||
matches() { return false; }
|
||||
|
||||
Reference in new issue
Block a user