mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52: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
@@ -1,18 +1,5 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<!-- Bot Instance Selector -->
|
||||
<div class="bot-selector" v-if="store.bots.length > 1">
|
||||
<button
|
||||
v-for="bot in store.bots"
|
||||
:key="bot.id"
|
||||
class="bot-tab"
|
||||
:class="{ active: bot.id === store.activeBotId }"
|
||||
@click="store.setActiveBotId(bot.id)"
|
||||
>
|
||||
{{ bot.name }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Search Bar -->
|
||||
<div class="search-bar" @click="$router.push('/search')">
|
||||
<Icon icon="mdi:magnify" class="search-icon" />
|
||||
@@ -166,28 +153,6 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bot-selector {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.bot-tab {
|
||||
padding: 8px 20px;
|
||||
border-radius: var(--radius-md);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
background: var(--hover-bg);
|
||||
opacity: 0.6;
|
||||
transition: all var(--transition-fast);
|
||||
|
||||
&.active {
|
||||
background: var(--color-primary);
|
||||
color: white;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in new issue
Block a user