mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat: add KAAK context menu to channel tree members
This commit is contained in:
1 parent
3459c8410c
commit
3476d4716a
14 files changed
+48
-14
No files matched your search
@@ -301,7 +301,7 @@ test("trusted channel tree and server switcher widgets require scoped read and c
|
||||
children: [
|
||||
{ widget: "voice.server-switcher", part: "server-switcher" },
|
||||
{ widget: "voice.server-header", part: "server-header" },
|
||||
{ widget: "voice.channel-tree", part: "channel-tree" },
|
||||
{ widget: "voice.channel-tree", part: "channel-tree", options: { layout: "server-sidebar", memberActions: true } },
|
||||
],
|
||||
};
|
||||
assert.deepEqual(parseSkinPluginDocument(document).components[0].root.children?.map(({ widget }) => widget), [
|
||||
@@ -309,6 +309,7 @@ test("trusted channel tree and server switcher widgets require scoped read and c
|
||||
"voice.server-header",
|
||||
"voice.channel-tree",
|
||||
]);
|
||||
assert.deepEqual(parseSkinPluginDocument(document).components[0].root.children?.[2]?.options, { layout: "server-sidebar", memberActions: true });
|
||||
|
||||
for (const missingPermission of [
|
||||
"session.status.read",
|
||||
|
||||
@@ -63,7 +63,7 @@ export type SkinPluginHostWidget = typeof SKIN_PLUGIN_HOST_WIDGETS[number];
|
||||
export interface SkinPluginWidgetOptions {
|
||||
/** Hide screen-share UI and its stream details for widgets that support it. */
|
||||
screenShare?: boolean;
|
||||
/** Show the trusted member actions trigger on desktop member cards. */
|
||||
/** Enable host member actions on member cards and a right-click menu on channel-tree rows. */
|
||||
memberActions?: boolean;
|
||||
/** Select a supported host presentation for audio controls or a channel tree. */
|
||||
layout?: "default" | "room-panel" | "server-sidebar";
|
||||
@@ -439,9 +439,11 @@ export function parseSkinPluginDocument(input: unknown): SkinPluginDocument {
|
||||
if (rawNode.options !== undefined) {
|
||||
const supportedOptions = rawNode.widget === "voice.member-cards"
|
||||
? new Set(["screenShare", "memberActions"])
|
||||
: rawNode.widget === "voice.channel-tree"
|
||||
? new Set(["layout", "memberActions"])
|
||||
: rawNode.widget === "voice.performance-panel"
|
||||
? new Set(["screenShare"])
|
||||
: rawNode.widget === "voice.audio-controls" || rawNode.widget === "voice.channel-tree"
|
||||
: rawNode.widget === "voice.audio-controls"
|
||||
? new Set(["layout"])
|
||||
: new Set<string>();
|
||||
if (!isRecord(rawNode.options)
|
||||
|
||||
Reference in new issue
Block a user