mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 13:02:49 +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
@@ -30,10 +30,10 @@ export function useWebSocket() {
|
||||
case 'stateChange':
|
||||
store.updateBotStatus(data.botId, data.status);
|
||||
if (data.queue) {
|
||||
store.setQueue(data.queue);
|
||||
store.setQueue(data.botId, data.queue);
|
||||
} else {
|
||||
// Queue not included in event; refresh it
|
||||
store.fetchQueue();
|
||||
// Queue not included in event; refresh for this specific bot
|
||||
store.fetchQueueForBot(data.botId);
|
||||
}
|
||||
break;
|
||||
case 'botConnected':
|
||||
|
||||
Reference in new issue
Block a user