fix: show password protected channels

This commit is contained in:
illusia committed 2026-10-12 10:34:06 +08:00
1 parent ff508a8eb9
commit cec2a81549
23 files changed
+189 -27

No files matched your search

+6 -2
View File
@@ -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">