mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
feat(skin): add approved full-page surface composition
This commit is contained in:
1 parent
eabc78f36a
commit
d505815f28
19 files changed
+1261
-99
No files matched your search
@@ -0,0 +1,10 @@
|
||||
# Open Voice Surface scaffold
|
||||
|
||||
This importable schema v2 surface package exercises complete public home and voice pages using only declarative nodes and WebSpeak-owned controls. It includes server switching, channel navigation, visible members, chat, audio, whisper, screen sharing, connection controls, and the built-in language and skin selectors. It contains no discovery, events, shop, companion, advertising, or administration pages.
|
||||
|
||||
This is an implementation scaffold for testing the open-skin format, not a visual claim about KOOK. The current KOOK browser bridge does not expose the logged-in page, so its room-specific visual details remain unverified. Once the reference page can be read, the scaffold can be styled from the two authorized rooms without adding unrelated service pages.
|
||||
|
||||
- Source: [open-voice-surface](./open-voice-surface/)
|
||||
- Importable package: [open-voice-surface.wskin](./open-voice-surface.wskin)
|
||||
- Shared component and permission rules: [skin development guide](../SKIN_DEVELOPMENT.md)
|
||||
- Architecture and safety boundaries: [open skin spec](../OPEN_SKIN_SYSTEM_SPEC.zh-CN.md)
|
||||
Binary file not shown.
@@ -0,0 +1,205 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"components": [
|
||||
{
|
||||
"id": "open-voice-home",
|
||||
"name": "Open voice connection page",
|
||||
"page": "home",
|
||||
"mode": "surface",
|
||||
"accessibleName": "WebSpeak connection page",
|
||||
"permissions": ["ui.surface.replace"],
|
||||
"actions": {},
|
||||
"root": {
|
||||
"tag": "main",
|
||||
"part": "home",
|
||||
"children": [
|
||||
{
|
||||
"tag": "header",
|
||||
"part": "home-header",
|
||||
"children": [
|
||||
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
|
||||
{ "tag": "span", "part": "brand-name", "children": [{ "text": "VOICE SPACE" }] },
|
||||
{ "widget": "app.language-switcher", "part": "language" },
|
||||
{ "widget": "app.skin-switcher", "part": "skin" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "section",
|
||||
"part": "connection-card",
|
||||
"children": [
|
||||
{ "tag": "p", "part": "eyebrow", "children": [{ "text": "TEAM SPEAK · VOICE CLIENT" }] },
|
||||
{ "tag": "h1", "part": "title", "children": [{ "text": "Connect with your people" }] },
|
||||
{ "tag": "p", "part": "description", "children": [{ "text": "Join a voice server and continue where your community meets." }] },
|
||||
{ "widget": "home.connection-form", "part": "connection-form" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "footer",
|
||||
"part": "home-footer",
|
||||
"children": [{ "text": "Your connection and identity remain managed by WebSpeak." }]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "open-voice-workspace",
|
||||
"name": "Open voice workspace",
|
||||
"page": "voice",
|
||||
"mode": "surface",
|
||||
"accessibleName": "WebSpeak voice workspace",
|
||||
"permissions": [
|
||||
"ui.surface.replace",
|
||||
"session.status.read",
|
||||
"servers.quickList.read",
|
||||
"servers.quickList.switch",
|
||||
"session.channels.read",
|
||||
"session.members.read",
|
||||
"session.channel.join"
|
||||
],
|
||||
"actions": {
|
||||
"switch-server": {
|
||||
"type": "quickServers.switch",
|
||||
"args": { "quickServerId": "{{server.id}}" }
|
||||
},
|
||||
"join-channel": {
|
||||
"type": "voice.joinChannel",
|
||||
"args": { "channelId": "{{channel.id}}" }
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"tag": "main",
|
||||
"part": "workspace",
|
||||
"children": [
|
||||
{
|
||||
"tag": "header",
|
||||
"part": "workspace-header",
|
||||
"children": [
|
||||
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
|
||||
{ "tag": "strong", "part": "server-title", "children": [{ "text": "{{session.status.channelName}}" }] },
|
||||
{ "widget": "app.language-switcher", "part": "language" },
|
||||
{ "widget": "app.skin-switcher", "part": "skin" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "nav",
|
||||
"part": "quick-rail",
|
||||
"attributes": { "aria-label": "Favorite and recent servers" },
|
||||
"children": [
|
||||
{
|
||||
"tag": "div",
|
||||
"part": "quick-server-item",
|
||||
"repeat": { "path": "servers.quickList", "as": "server" },
|
||||
"children": [
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "quick-server",
|
||||
"attributes": {
|
||||
"type": "button",
|
||||
"aria-current": "{{server.current}}",
|
||||
"aria-label": "Switch to {{server.label}}"
|
||||
},
|
||||
"events": { "click": "switch-server" },
|
||||
"children": [
|
||||
{ "tag": "span", "part": "server-monogram", "children": [{ "text": "{{server.label}}" }] },
|
||||
{
|
||||
"tag": "small",
|
||||
"part": "server-kind",
|
||||
"when": { "path": "server.favorite", "equals": true },
|
||||
"children": [{ "text": "Favorite" }]
|
||||
},
|
||||
{
|
||||
"tag": "small",
|
||||
"part": "server-kind",
|
||||
"when": { "path": "server.kind", "equals": "recent" },
|
||||
"children": [{ "text": "Recent" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "nav",
|
||||
"part": "channels",
|
||||
"attributes": { "aria-label": "Voice channels" },
|
||||
"children": [
|
||||
{ "tag": "h2", "part": "section-title", "children": [{ "text": "VOICE CHANNELS" }] },
|
||||
{
|
||||
"tag": "div",
|
||||
"part": "channel-item",
|
||||
"repeat": { "path": "session.channels", "as": "channel" },
|
||||
"children": [
|
||||
{
|
||||
"tag": "button",
|
||||
"part": "channel-row",
|
||||
"attributes": {
|
||||
"type": "button",
|
||||
"aria-current": "{{channel.current}}",
|
||||
"aria-label": "Join {{channel.name}}"
|
||||
},
|
||||
"events": { "dblclick": "join-channel", "keydown": "join-channel" },
|
||||
"children": [
|
||||
{ "tag": "span", "part": "channel-glyph", "children": [{ "text": "◖" }] },
|
||||
{ "tag": "span", "part": "channel-name", "children": [{ "text": "{{channel.name}}" }] },
|
||||
{ "tag": "small", "part": "channel-count", "children": [{ "text": "{{channel.memberCount}}" }] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "section",
|
||||
"part": "conversation",
|
||||
"children": [
|
||||
{
|
||||
"tag": "header",
|
||||
"part": "conversation-heading",
|
||||
"children": [
|
||||
{ "tag": "h1", "part": "channel-title", "children": [{ "text": "{{session.status.channelName}}" }] },
|
||||
{ "tag": "span", "part": "connection-state", "children": [{ "text": "Connected" }] }
|
||||
]
|
||||
},
|
||||
{ "widget": "voice.chat-panel", "part": "chat" },
|
||||
{ "widget": "voice.screen-share-player", "part": "screen-share" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "aside",
|
||||
"part": "members-and-controls",
|
||||
"children": [
|
||||
{ "tag": "h2", "part": "section-title", "children": [{ "text": "IN THIS CHANNEL" }] },
|
||||
{
|
||||
"tag": "ul",
|
||||
"part": "member-list",
|
||||
"children": [
|
||||
{
|
||||
"tag": "li",
|
||||
"part": "member-row",
|
||||
"repeat": { "path": "session.members", "as": "member" },
|
||||
"children": [
|
||||
{ "tag": "span", "part": "member-avatar", "children": [{ "text": "{{member.name}}" }] },
|
||||
{ "tag": "span", "part": "member-name", "children": [{ "text": "{{member.name}}" }] },
|
||||
{
|
||||
"tag": "small",
|
||||
"part": "speaking-indicator",
|
||||
"when": { "path": "member.speaking", "equals": true },
|
||||
"attributes": { "aria-label": "Speaking" },
|
||||
"children": [{ "text": "Speaking" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ "widget": "voice.whisper-controls", "part": "whisper" },
|
||||
{ "widget": "voice.audio-controls", "part": "audio" },
|
||||
{ "widget": "voice.connection-controls", "part": "connection" },
|
||||
{ "widget": "voice.disconnect-control", "part": "disconnect" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"schemaVersion": 3,
|
||||
"packageType": "open-skin",
|
||||
"id": "community.open-voice-surface",
|
||||
"name": "Open Voice Surface",
|
||||
"version": "1.0.0",
|
||||
"author": "WebSpeak Project",
|
||||
"license": "AGPL-3.0-only",
|
||||
"description": "A complete, script-free public voice client surface scaffold.",
|
||||
"entry": "skin.css",
|
||||
"components": "components.json",
|
||||
"minAppVersion": "0.2.7-preview"
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--skin-voice-bg: #111318;
|
||||
--skin-voice-panel: #191c24;
|
||||
--skin-voice-raised: #222631;
|
||||
--skin-voice-text: #f0f1f5;
|
||||
--skin-voice-muted: #969baa;
|
||||
--skin-voice-accent: #8e7bff;
|
||||
--skin-voice-live: #62d5a7;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home"] {
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
justify-items: center;
|
||||
gap: 32px;
|
||||
padding: clamp(18px, 5vw, 56px);
|
||||
color: var(--skin-voice-text);
|
||||
background: radial-gradient(ellipse at 50% 42%, #25253c 0, var(--skin-voice-bg) 66%);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.home-header"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
width: min(100%, 1080px);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.brand-mark"],
|
||||
[data-ws-plugin-part="open-voice-workspace.brand-mark"] {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 14px;
|
||||
color: white;
|
||||
background: var(--skin-voice-accent);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.brand-name"] {
|
||||
margin-right: auto;
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .14em;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.connection-card"] {
|
||||
align-self: center;
|
||||
width: min(100%, 520px);
|
||||
padding: clamp(22px, 5vw, 42px);
|
||||
border: 1px solid #ffffff17;
|
||||
border-radius: 24px;
|
||||
background: color-mix(in srgb, var(--skin-voice-panel) 94%, transparent);
|
||||
box-shadow: 0 28px 90px #0008;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.eyebrow"],
|
||||
[data-ws-plugin-part="open-voice-workspace.section-title"] {
|
||||
color: var(--skin-voice-muted);
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .14em;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.title"] {
|
||||
margin: 10px 0;
|
||||
font-size: clamp(27px, 5vw, 40px);
|
||||
letter-spacing: -.04em;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-home.description"],
|
||||
[data-ws-plugin-part="open-voice-home.home-footer"] {
|
||||
color: var(--skin-voice-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace"] {
|
||||
display: grid;
|
||||
grid-template-columns: 72px 228px minmax(320px, 1fr) 252px;
|
||||
grid-template-rows: 62px minmax(0, 1fr);
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
color: var(--skin-voice-text);
|
||||
background: var(--skin-voice-bg);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.workspace-header"] {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 0 18px;
|
||||
border-bottom: 1px solid #ffffff12;
|
||||
background: #171920;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.server-title"] { margin-right: auto; }
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.quick-rail"] {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
overflow-y: auto;
|
||||
padding: 14px 8px;
|
||||
background: #171920;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.quick-server"] {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 4px;
|
||||
width: 52px;
|
||||
min-height: 58px;
|
||||
padding: 5px;
|
||||
border: 0;
|
||||
border-radius: 16px;
|
||||
color: var(--skin-voice-muted);
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.quick-server"][aria-current="true"] {
|
||||
color: white;
|
||||
background: var(--skin-voice-accent);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.server-monogram"] {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background: #ffffff18;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.server-kind"] { font-size: 8px; }
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channels"],
|
||||
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] {
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 18px 12px;
|
||||
background: var(--skin-voice-panel);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channels"] { grid-column: 2; grid-row: 2; }
|
||||
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] { grid-column: 4; grid-row: 2; }
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-row"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
padding: 9px 10px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
color: var(--skin-voice-muted);
|
||||
background: transparent;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-row"][aria-current="true"] {
|
||||
color: var(--skin-voice-text);
|
||||
background: var(--skin-voice-raised);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-name"] { flex: 1; }
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-count"] { font-size: 11px; }
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.conversation"] {
|
||||
grid-column: 3;
|
||||
grid-row: 2;
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr) auto;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
padding: 18px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.conversation-heading"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-height: 46px;
|
||||
border-bottom: 1px solid #ffffff12;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-title"] { margin-right: auto; }
|
||||
[data-ws-plugin-part="open-voice-workspace.connection-state"] { color: var(--skin-voice-live); font-size: 12px; }
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.member-list"] {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin: 12px 0 20px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.member-row"] {
|
||||
display: grid;
|
||||
grid-template-columns: 34px minmax(0, 1fr);
|
||||
align-items: center;
|
||||
column-gap: 10px;
|
||||
color: var(--skin-voice-text);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.member-avatar"] {
|
||||
grid-row: span 2;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
background: var(--skin-voice-raised);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.speaking-indicator"] { color: var(--skin-voice-live); font-size: 10px; }
|
||||
|
||||
[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"],
|
||||
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.disconnect-control"],
|
||||
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.whisper-controls"],
|
||||
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.screen-player"] {
|
||||
border-radius: 12px;
|
||||
color: var(--skin-voice-text);
|
||||
background-color: var(--skin-voice-panel);
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace"] button:focus-visible {
|
||||
outline: 2px solid var(--skin-voice-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
[data-ws-plugin-part="open-voice-workspace"] {
|
||||
grid-template-columns: 58px minmax(0, 1fr);
|
||||
grid-template-rows: 56px minmax(320px, 1fr) auto;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
[data-ws-plugin-part="open-voice-workspace.workspace-header"] { padding: 0 10px; }
|
||||
[data-ws-plugin-part="open-voice-workspace.quick-rail"] { grid-column: 1; grid-row: 2; }
|
||||
[data-ws-plugin-part="open-voice-workspace.channels"] {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 3;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 8px;
|
||||
}
|
||||
[data-ws-plugin-part="open-voice-workspace.section-title"] { display: none; }
|
||||
[data-ws-plugin-part="open-voice-workspace.channel-row"] { width: max-content; min-width: 130px; margin: 0; }
|
||||
[data-ws-plugin-part="open-voice-workspace.conversation"] {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
padding: 10px;
|
||||
}
|
||||
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 4;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
padding: 8px;
|
||||
}
|
||||
[data-ws-plugin-part="open-voice-workspace.member-list"] { grid-column: 1 / -1; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
[data-ws-plugin-part="open-voice-workspace"] *,
|
||||
[data-ws-plugin-part="open-voice-home"] * {
|
||||
scroll-behavior: auto;
|
||||
animation-duration: .01ms;
|
||||
animation-iteration-count: 1;
|
||||
transition-duration: .01ms;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user