diff --git a/web/src/views/Settings.vue b/web/src/views/Settings.vue index 25f2234..474f8a5 100644 --- a/web/src/views/Settings.vue +++ b/web/src/views/Settings.vue @@ -28,8 +28,8 @@
{{ bot.name }}
-
- {{ bot.connected ? '在线' : '离线' }} +
+ {{ botStatusText(bot) }}
@@ -375,6 +375,20 @@ import { usePlayerStore } from '../stores/player.js'; const store = usePlayerStore(); +function botStatusClass(bot: any) { + if (!bot.connected) return 'offline'; + if (bot.playing) return 'playing'; + if (bot.paused) return 'paused'; + return 'online'; +} + +function botStatusText(bot: any) { + if (!bot.connected) return '离线'; + if (bot.playing) return '播放中'; + if (bot.paused) return '已暂停'; + return '在线'; +} + const newBotName = ref(''); const newBotServer = ref(''); const newBotPort = ref(9987); @@ -752,6 +766,14 @@ onUnmounted(() => { background: rgba(51, 94, 234, 0.15); color: var(--color-primary); } + &.playing { + background: rgba(76, 175, 80, 0.15); + color: #4caf50; + } + &.paused { + background: rgba(255, 152, 0, 0.15); + color: #ff9800; + } } // Account cards