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:
saopig1andClaude Opus 4.6 committed 2026-03-30 20:45:24 +08:00
1 parent 75d359f65f
commit bc9b2366d0
6 files changed
+316 -95

No files matched your search

-35
View File
@@ -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;