mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-01 20:42:50 +08:00
feat: make frontend fully support multiple independent bots
Store queue and timing state per-bot instead of globally, move bot selector from Home page into Navbar dropdown, show bot name badge in the player bar, and route WebSocket stateChange queues per-bot. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
75d359f65f
commit
bc9b2366d0
6 files changed
+316
-95
No files matched your search
@@ -28,7 +28,10 @@
|
||||
<CoverArt :url="currentSong.coverUrl" :size="40" />
|
||||
<div class="song-info">
|
||||
<div class="song-name">{{ currentSong.name }}</div>
|
||||
<div class="song-artist">{{ currentSong.artist }}</div>
|
||||
<div class="song-artist">
|
||||
<span v-if="showBotBadge" class="bot-badge">{{ activeBot?.name }}</span>
|
||||
{{ currentSong.artist }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,6 +89,7 @@ const showQueue = ref(false);
|
||||
const store = usePlayerStore();
|
||||
const activeBot = computed(() => store.activeBot);
|
||||
const currentSong = computed(() => store.currentSong);
|
||||
const showBotBadge = computed(() => store.bots.length > 1);
|
||||
|
||||
function toggleLyrics() {
|
||||
if (route.path === '/lyrics') {
|
||||
@@ -315,6 +319,22 @@ function cycleMode() {
|
||||
.song-artist {
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.bot-badge {
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
padding: 0 5px;
|
||||
background: rgba(51, 94, 234, 0.15);
|
||||
color: var(--color-primary);
|
||||
border-radius: 3px;
|
||||
line-height: 16px;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.player-center {
|
||||
|
||||
Reference in new issue
Block a user