mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
feat(web/queue): gate remove/clear by member capability or guest removeClear
This commit is contained in:
1 parent
b17057cc41
commit
28cff59a6f
1 file changed
+3
-3
@@ -4,7 +4,7 @@
|
|||||||
<h3 class="queue-title">播放队列</h3>
|
<h3 class="queue-title">播放队列</h3>
|
||||||
<span class="queue-count">{{ botQueue.length }} 首</span>
|
<span class="queue-count">{{ botQueue.length }} 首</span>
|
||||||
<button
|
<button
|
||||||
v-if="botQueue.length > 0 && can('player.control')"
|
v-if="botQueue.length > 0 && (can('player.control') || guestCan('removeClear'))"
|
||||||
class="clear-btn"
|
class="clear-btn"
|
||||||
@click="clearAndStop"
|
@click="clearAndStop"
|
||||||
title="清空队列并停止播放"
|
title="清空队列并停止播放"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="queue-song-name">{{ song.name }}</div>
|
<div class="queue-song-name">{{ song.name }}</div>
|
||||||
<div class="queue-song-artist">{{ song.artist }}</div>
|
<div class="queue-song-artist">{{ song.artist }}</div>
|
||||||
</div>
|
</div>
|
||||||
<button v-if="can('player.queue')" class="remove-btn" @click="removeSong(i)" title="移除">
|
<button v-if="can('player.queue') || guestCan('removeClear')" class="remove-btn" @click="removeSong(i)" title="移除">
|
||||||
<Icon icon="mdi:close" />
|
<Icon icon="mdi:close" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +58,7 @@ defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
|
|
||||||
const store = usePlayerStore();
|
const store = usePlayerStore();
|
||||||
const { can } = useSession();
|
const { can, guestCan } = useSession();
|
||||||
const botQueue = computed(() => store.queue);
|
const botQueue = computed(() => store.queue);
|
||||||
|
|
||||||
// Fetch queue when panel opens
|
// Fetch queue when panel opens
|
||||||
|
|||||||
Reference in new issue
Block a user