From eb92b04e11f33504b9c5113be3e918b6d6ec9324 Mon Sep 17 00:00:00 2001 From: saopig1 Date: Mon, 30 Mar 2026 21:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=BA=E5=99=A8=E4=BA=BA=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA=20=E2=80=94=20=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF/=E6=92=AD=E6=94=BE=E4=B8=AD/=E5=B7=B2?= =?UTF-8?q?=E6=9A=82=E5=81=9C/=E7=A6=BB=E7=BA=BF=E5=9B=9B=E7=A7=8D?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前只有在线/离线两种,播放中也显示为在线。 现在:绿色=播放中,蓝色=在线,橙色=已暂停,灰色=离线 Co-Authored-By: Claude Opus 4.6 (1M context) --- web/src/views/Settings.vue | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) 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