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

+2
View File
@@ -59,12 +59,14 @@
</div>
<SkinLoadRecoveryNotice :error="skinLoadError" :language="language" @use-built-in="switchToBuiltInAfterLoadError" />
<InstanceAuthorization :language="language" />
<HostChrome :language="language" />
</template>
<script setup lang="ts">
import { computed, onMounted, ref } from "vue";
import Icon from "../components/Icon.vue";
import InstanceAuthorization from '../components/InstanceAuthorization.vue';
import HostChrome from '../components/HostChrome.vue';
import "../styles/skin-plugin.css";
import SkinPluginOutlet from "../components/SkinPluginOutlet.js";
import LanguageSwitcher from "../components/LanguageSwitcher.vue";
+6 -3
View File
@@ -259,15 +259,16 @@
data-ws-part="home.footer"
>
<div class="ws-skin-mount-slot" data-ws-skin-mount="home.footer.before"></div>
<span>WebSpeak</span><span class="footer-separator">·</span
><span>{{ t("teamSpeakClient") }}</span
<span data-ws-part="home.footer.decoration">WebSpeak</span><span class="footer-separator" data-ws-part="home.footer.decoration">·</span
><span data-ws-part="home.footer.decoration">{{ t("teamSpeakClient") }}</span
><span class="footer-spacer"></span
><button
type="button"
class="clear-local-button"
data-ws-part="home.footer.clear"
@click="clearBrowserData"
>{{ t("clearLocalData") }}</button
><span class="footer-separator">·</span><span>{{ t("browserSupport") }}</span>
><span class="footer-separator" data-ws-part="home.footer.decoration">·</span><span data-ws-part="home.footer.decoration">{{ t("browserSupport") }}</span>
</footer>
<!-- QQ community modal -->
@@ -871,6 +872,7 @@
</div>
<PluginPanel :session-token="pluginSession" :gateway-url="pluginVoiceSocket?.url ?? ''" :connected="voiceState.connected" :language="language" />
<HostChrome :language="language" :connected="voiceState.connected" />
<IdentityImportDialog
v-if="identityImportOpen"
v-model="identityImportText"
@@ -1004,6 +1006,7 @@ import { useWebClientChannels, type TreeChannel } from "../composables/useWebCli
import { useWebClientConnection } from "../composables/useWebClientConnection.js";
import { useWebClientMembers } from "../composables/useWebClientMembers.js";
import PluginPanel from "../components/PluginPanel.vue";
import HostChrome from "../components/HostChrome.vue";
import InstanceAuthorization from '../components/InstanceAuthorization.vue';
import { useVoiceWebSocket, type ChannelMember, type ChatMessage } from "../composables/useVoiceWebSocket.js";
import { useWebClientScreenShare } from "../composables/useWebClientScreenShare.js";