diff --git a/web/src/components/Queue.vue b/web/src/components/Queue.vue index a6a3c04..e7ed692 100644 --- a/web/src/components/Queue.vue +++ b/web/src/components/Queue.vue @@ -3,10 +3,10 @@

播放队列

{{ botQueue.length }} 首 -
- @@ -46,6 +46,7 @@ import { watch, computed } from 'vue'; import { Icon } from '@iconify/vue'; import axios from 'axios'; import { usePlayerStore } from '../stores/player.js'; +import { useSession } from '../composables/useSession.js'; import CoverArt from './CoverArt.vue'; const props = defineProps<{ @@ -57,6 +58,7 @@ defineEmits<{ }>(); const store = usePlayerStore(); +const { can } = useSession(); const botQueue = computed(() => store.queue); // Fetch queue when panel opens @@ -65,6 +67,7 @@ watch(() => props.open, (isOpen) => { }); async function playAtIndex(index: number) { + if (!can('player.control')) return; await store.playAtIndex(index); await store.fetchQueue(); }