Merge remote-tracking branch 'origin/main' into feature/design-implementation

This commit is contained in:
saopig1 committed 2026-05-06 12:37:33 +08:00
commit 877c431b13
19 files changed
+1353 -389

No files matched your search

+25
View File
@@ -3,6 +3,14 @@
<div class="queue-header">
<h3 class="queue-title">播放队列</h3>
<span class="queue-count">{{ botQueue.length }} 首</span>
<button
v-if="botQueue.length > 0"
class="clear-btn"
@click="clearAndStop"
title="清空队列并停止播放"
>
<Icon icon="mdi:stop-circle-outline" />
</button>
<button class="close-btn" @click="$emit('close')">
<Icon icon="mdi:close" />
</button>
@@ -70,6 +78,15 @@ async function removeSong(index: number) {
// Ignore
}
}
async function clearAndStop() {
try {
await store.stop();
await store.fetchQueue();
} catch {
// Ignore
}
}
</script>
<style lang="scss" scoped>
@@ -117,6 +134,14 @@ async function removeSong(index: number) {
&:hover { opacity: 1; }
}
.clear-btn {
font-size: 18px;
opacity: 0.6;
transition: opacity var(--transition-fast);
color: var(--text-primary);
&:hover { opacity: 1; }
}
.queue-empty {
padding: 40px 20px;
text-align: center;
+2 -1
View File
@@ -28,9 +28,10 @@
<script setup lang="ts">
import { Icon } from '@iconify/vue';
import CoverArt from './CoverArt.vue';
import { Song } from '../stores/player.js';
defineProps<{
song: { id: string; name: string; artist: string; album: string; duration: number; coverUrl: string; platform: string };
song: Song;
index: number;
active?: boolean;
}>();