mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
fix: show password protected channels
This commit is contained in:
1 parent
ff508a8eb9
commit
cec2a81549
23 files changed
+189
-27
No files matched your search
@@ -36,8 +36,12 @@
|
||||
<circle cx="6" cy="18" r="3" />
|
||||
<circle cx="16" cy="16" r="3" />
|
||||
</template>
|
||||
<path v-else-if="name === 'headset'" d="M4 14v-2a8 8 0 0 1 16 0v2M4 14h3v5H5a1 1 0 0 1-1-1zm16 0h-3v5h2a1 1 0 0 1-1-1z" />
|
||||
<path v-else-if="name === 'volume'" d="M4 10v4h3l4 3V7l-4 3zm10.5-2.5a6 6 0 0 1 0 9m2-11a9 9 0 0 1 0 13" />
|
||||
<path v-else-if="name === 'headset'" d="M4 14v-2a8 8 0 0 1 16 0v2M4 14h3v5H5a1 1 0 0 1-1-1zm16 0h-3v5h2a1 1 0 0 1-1-1z" />
|
||||
<path v-else-if="name === 'volume'" d="M4 10v4h3l4 3V7l-4 3zm10.5-2.5a6 6 0 0 1 0 9m2-11a9 9 0 0 1 0 13" />
|
||||
<template v-else-if="name === 'speaker'">
|
||||
<path d="M3 9v6h4l5 4V5L7 9H3Z" fill="currentColor" stroke="none" />
|
||||
<path d="M16 9a4 4 0 0 1 0 6m2.5-8.5a7.5 7.5 0 0 1 0 11" />
|
||||
</template>
|
||||
<path v-else-if="name === 'volume-off'" d="m4 4 16 16M4 10v4h3l4 3V7l-4 3z" />
|
||||
<template v-else-if="name === 'search'">
|
||||
<circle cx="10.8" cy="10.8" r="6.8" />
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
@click="emit('selectChannel', channelItem)"
|
||||
>
|
||||
<Icon
|
||||
name="volume"
|
||||
:name="channelItem.passwordProtected ? 'lock' : 'speaker'"
|
||||
:size="16"
|
||||
/>
|
||||
<span>{{ channelItem.name }}</span>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
class="ws-voice-channel-row"
|
||||
data-ws-part="voice.channel-tree.row"
|
||||
:data-drag-over="memberDragDrop && dragOverChannelId === node.channel.id ? 'true' : undefined"
|
||||
:title="`双击或按 Enter 加入 ${node.channel.name} / Double-click or press Enter to join`"
|
||||
:title="`双击或按 Enter 加入 ${node.channel.name} / Double-click or press Enter to join${node.channel.passwordProtected ? ' · 需要频道密码 / Channel password required' : ''}`"
|
||||
:data-password-protected="node.channel.passwordProtected ? 'true' : undefined"
|
||||
@click="emit('select', node.channel.id)"
|
||||
@dblclick.stop.prevent="join"
|
||||
@keydown.enter.prevent.stop="join"
|
||||
@@ -33,7 +34,13 @@
|
||||
@dragleave="handleChannelDragLeave($event)"
|
||||
@drop="handleChannelDrop($event)"
|
||||
>
|
||||
<Icon class="ws-voice-channel-type" data-ws-part="voice.channel-tree.icon" name="volume" :size="14" />
|
||||
<Icon
|
||||
class="ws-voice-channel-type"
|
||||
data-ws-part="voice.channel-tree.icon"
|
||||
:name="node.channel.passwordProtected ? 'lock' : 'speaker'"
|
||||
:data-password-protected="node.channel.passwordProtected ? 'true' : 'false'"
|
||||
:size="14"
|
||||
/>
|
||||
<span class="ws-voice-channel-name" data-ws-part="voice.channel-tree.name">{{ node.channel.name }}</span>
|
||||
<span v-if="selected && !current" class="ws-voice-channel-join-hint" data-ws-part="voice.channel-tree.join-hint">双击加入</span>
|
||||
<span class="ws-voice-channel-count" data-ws-part="voice.channel-tree.count">
|
||||
|
||||
@@ -46,7 +46,7 @@ export const BUILTIN_SKIN_CATALOG: SkinCatalogEntry[] = [
|
||||
{
|
||||
id: BUILTIN_KAAK_SKIN_ID,
|
||||
name: "KAAK",
|
||||
version: "3.1.76",
|
||||
version: "3.1.77",
|
||||
author: "WebSpeak Project",
|
||||
license: "AGPL-3.0-only",
|
||||
description: "A KOOK-inspired voice-room workspace with a searchable server header, TeamSpeak banner and welcome message, nested channel members, attached channel chat, and a compact WebSpeak audio dock.",
|
||||
|
||||
@@ -479,7 +479,7 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
|
||||
const file = new File([archive], "kaak-voice.wskin", { type: "application/octet-stream" });
|
||||
const skin = await importSkinPack(file);
|
||||
assert.equal(skin.id, "community.kaak-voice");
|
||||
assert.equal(skin.version, "3.1.76");
|
||||
assert.equal(skin.version, "3.1.77");
|
||||
assert.equal(BUILTIN_SKIN_CATALOG.find((entry) => entry.id === skin.id)?.version, skin.version);
|
||||
assert.equal(skin.schemaVersion, 3);
|
||||
const home = skin.pluginData?.components.find((component) => component.page === "home");
|
||||
@@ -545,8 +545,9 @@ test("the distributable KAAK package provides full home and voice surfaces", asy
|
||||
assert.equal(findPart(voice?.root, "identity-online")?.attributes?.role, "img");
|
||||
const voiceStageHeadingItem = findPart(voice?.root, "voice-stage-heading-item");
|
||||
assert.equal(voiceStageHeadingItem?.repeat?.path, "session.channels");
|
||||
const voiceStageHeading = findPart(voiceStageHeadingItem, "voice-stage-heading");
|
||||
assert.deepEqual(voiceStageHeading?.when, { path: "stagechannel.current", equals: true });
|
||||
const voiceStageHeading = findPart(voiceStageHeadingItem, "voice-stage-heading");
|
||||
assert.deepEqual(voiceStageHeading?.when, { path: "stagechannel.current", equals: true });
|
||||
assert.equal(findPart(voiceStageHeading, "voice-stage-glyph")?.children?.[0]?.text, "🔊︎");
|
||||
assert.equal(findPart(voiceStageHeading, "voice-stage-title")?.children?.[0]?.text, "{{stagechannel.name}}");
|
||||
assert.equal(findPart(voiceStageHeading, "voice-stage-member-count")?.children?.[0]?.text, "{{stagechannel.memberCountLabel}}");
|
||||
assert.deepEqual(findPart(voiceStageHeading, "voice-stage-capacity")?.when, { path: "stagechannel.maxClientsLimited", equals: true });
|
||||
|
||||
Reference in new issue
Block a user