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:
OddTurtleHead committed 2026-11-11 18:06:20 +08:00
1 parent 33ba062686
commit f8d61d22ef
45 files changed
+3535 -558

No files matched your search

@@ -1,6 +1,7 @@
import { computed, reactive, ref, type Ref } from "vue";
import { DEFAULT_TEAM_SPEAK_PORT, splitTeamSpeakTarget } from "../services/teamspeak-target.js";
import { APP_VERSION } from "../services/app-version.js";
import { setInstanceHiddenParts } from "../services/host-chrome.js";
import type { Language } from "../i18n/web-client.js";
interface RelayOption {
@@ -58,7 +59,11 @@ export function useWebClientPublicConfig({
visitorNumber?: unknown;
visitorTotal?: unknown;
accelerationRelays?: unknown;
hiddenHostParts?: unknown;
};
if (Array.isArray(config.hiddenHostParts)) {
setInstanceHiddenParts(config.hiddenHostParts.filter((part): part is string => typeof part === "string"));
}
if (typeof config.version === "string" && config.version.trim()) appVersion.value = config.version.trim();
visitorNumber.value = Number.isSafeInteger(config.visitorNumber) && Number(config.visitorNumber) > 0 ? Number(config.visitorNumber) : null;
visitorTotal.value = Number.isSafeInteger(config.visitorTotal) && Number(config.visitorTotal) > 0 ? Number(config.visitorTotal) : null;