fix(skins): expose screen-share status to custom members

This commit is contained in:
illusia committed 2026-10-11 23:06:06 +08:00
1 parent 7fe8719812
commit 8b5db8af1f
20 files changed
+295 -41

No files matched your search

@@ -1,5 +1,5 @@
{
"schemaVersion": 2,
"schemaVersion": 3,
"components": [
{
"id": "open-voice-home",
@@ -54,7 +54,17 @@
"servers.quickList.switch",
"session.channels.read",
"session.members.read",
"session.channel.join"
"session.channel.join",
"chat.channel.read",
"chat.channel.send",
"audio.status.read",
"audio.microphone.control",
"audio.output.control",
"voice.whisper.status.read",
"voice.whisper.control",
"voice.disconnect",
"voice.screenShare.read",
"voice.screenShare.control"
],
"actions": {
"switch-server": {
@@ -64,6 +74,10 @@
"join-channel": {
"type": "voice.joinChannel",
"args": { "channelId": "{{channel.id}}" }
},
"watch-screen-share": {
"type": "voice.joinScreenShare",
"args": { "streamId": "{{member.screenShareStreamId}}" }
}
},
"root": {
@@ -187,6 +201,27 @@
"when": { "path": "member.speaking", "equals": true },
"attributes": { "aria-label": "Speaking" },
"children": [{ "text": "Speaking" }]
},
{
"tag": "div",
"part": "member-screen-share",
"when": { "path": "member.screenSharing", "equals": true },
"children": [
{
"tag": "span",
"part": "member-screen-share-live",
"attributes": { "role": "status" },
"children": [{ "text": "Sharing screen" }]
},
{
"tag": "button",
"part": "member-screen-share-watch",
"when": { "path": "member.self", "equals": false },
"attributes": { "type": "button", "aria-label": "Watch {{member.name}}'s screen" },
"events": { "click": "watch-screen-share" },
"children": [{ "text": "Watch" }]
}
]
}
]
}
@@ -3,7 +3,7 @@
"packageType": "open-skin",
"id": "community.open-voice-surface",
"name": "Open Voice Surface",
"version": "1.0.0",
"version": "1.0.1",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A complete, script-free public voice client surface scaffold.",
+19
View File
@@ -231,6 +231,25 @@
[data-ws-plugin-part="open-voice-workspace.speaking-indicator"] { color: var(--skin-voice-live); font-size: 10px; }
[data-ws-plugin-part="open-voice-workspace.member-screen-share"] {
grid-column: 2;
display: flex;
align-items: center;
gap: 8px;
color: var(--skin-voice-live);
font-size: 10px;
}
[data-ws-plugin-part="open-voice-workspace.member-screen-share-watch"] {
min-height: 32px;
padding: 0 10px;
border: 1px solid color-mix(in srgb, var(--skin-voice-live) 50%, transparent);
border-radius: 7px;
color: var(--skin-voice-text);
background: var(--skin-voice-raised);
cursor: pointer;
}
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.chat"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.audio-controls"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.connection-controls"],