mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat(kaak): expose member volume actions
This commit is contained in:
1 parent
1e4fa08220
commit
bdd8e39a35
17 files changed
+105
-28
No files matched your search
@@ -204,8 +204,8 @@ test("schema v3 trusted widgets can omit screen-share UI and request only the pe
|
||||
document.schemaVersion = 3;
|
||||
document.components[0].actions = {};
|
||||
document.components[0].permissions = ["session.members.read", "session.memberAvatars.read"];
|
||||
document.components[0].root = { tag: "main", children: [{ widget: "voice.member-cards", options: { screenShare: false } }] };
|
||||
assert.deepEqual(parseSkinPluginDocument(document).components[0].root.children?.[0]?.options, { screenShare: false });
|
||||
document.components[0].root = { tag: "main", children: [{ widget: "voice.member-cards", options: { screenShare: false, memberActions: true } }] };
|
||||
assert.deepEqual(parseSkinPluginDocument(document).components[0].root.children?.[0]?.options, { screenShare: false, memberActions: true });
|
||||
|
||||
const memberCardsDefault = structuredClone(document);
|
||||
memberCardsDefault.components[0].root.children![0] = { widget: "voice.member-cards" };
|
||||
@@ -226,6 +226,14 @@ test("schema v3 trusted widgets can omit screen-share UI and request only the pe
|
||||
invalidOption.components[0].root.children![0] = { widget: "voice.member-cards", options: { screenShare: "false" } as never };
|
||||
errorCode(() => parseSkinPluginDocument(invalidOption), "SKIN_PLUGIN_WIDGET_OPTIONS_INVALID");
|
||||
|
||||
const memberActionsOnWrongWidget = structuredClone(document);
|
||||
memberActionsOnWrongWidget.components[0].root.children![0] = { widget: "voice.performance-panel", options: { memberActions: true } };
|
||||
errorCode(() => parseSkinPluginDocument(memberActionsOnWrongWidget), "SKIN_PLUGIN_WIDGET_OPTIONS_INVALID");
|
||||
|
||||
const invalidMemberActions = structuredClone(document);
|
||||
invalidMemberActions.components[0].root.children![0] = { widget: "voice.member-cards", options: { memberActions: "yes" } as never };
|
||||
errorCode(() => parseSkinPluginDocument(invalidMemberActions), "SKIN_PLUGIN_WIDGET_OPTIONS_INVALID");
|
||||
|
||||
const legacyOption = structuredClone(document);
|
||||
legacyOption.schemaVersion = 2;
|
||||
legacyOption.components[0].root.children![0] = { widget: "voice.member-cards", options: { screenShare: false } };
|
||||
|
||||
Reference in new issue
Block a user