feat(skin): preserve screen share user gesture

This commit is contained in:
illusia committed 2026-10-10 15:53:50 +08:00
1 parent e20219b010
commit b0b4a02a21
14 files changed
+209 -19

No files matched your search

+10
View File
@@ -35,6 +35,7 @@
:page="showVoiceShell ? 'voice' : 'home'"
:context="skinPluginContext"
:actions="skinPluginActions"
:widgets="skinPluginWidgets"
:read-session-status="readSkinRuntimeSessionStatus"
@surface-change="skinRuntimePluginSurfaceActive = $event"
@restore-skin="switchToBuiltIn"
@@ -1618,6 +1619,15 @@ const skinPluginActions = {
};
const skinPluginWidgets = {
"voice.screen-share-start": () => h("button", {
type: "button",
class: "skin-runtime-screen-share-start",
disabled: !voiceState.connected || screenShareActive.value || screenShareStarting.value,
"aria-label": t("startScreenShare"),
onClick: () => {
if (voiceState.connected && !screenShareActive.value && !screenShareStarting.value) void startScreenShare();
},
}, [h(Icon, { name: "share", size: 16 }), h("span", null, t("startScreenShare"))]),
"home.connection-form": () => h(JoinForm, {
autofocusNickname: !isMobileViewport.value,
serverHost: serverHost.value,