From 1890cad8d910f9453a9541a4998912303a9a111f Mon Sep 17 00:00:00 2001 From: Flik Date: Thu, 22 Jan 2026 22:43:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=B7=BB=E5=8A=A0=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96UI=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 集成主题切换功能,支持浅色、深色和自动模式 - 添加SunnyOutline、MoonOutline、ContrastOutline图标用于主题选择 - 创建主题下拉菜单组件,允许用户切换不同主题模式 - 重构CSS样式使用CSS变量替代硬编码颜色值 - 优化导航栏、用户菜单、客户端卡片等组件的视觉效果 - 调整头部高度从60px到56px,修改品牌文字样式 - 更新按钮、下拉菜单、模态框等交互元素的样式 - 在客户端视图中添加心跳指示器显示连接状态 - 实现客户端页面数据自动轮询刷新功能 - 优化版本号显示逻辑,确保始终以v开头显示 - 修复更新检查按钮只在有可用更新时才显示的问题 --- web/src/views/ClientView.vue | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/web/src/views/ClientView.vue b/web/src/views/ClientView.vue index d298bd7..34ebddf 100644 --- a/web/src/views/ClientView.vue +++ b/web/src/views/ClientView.vue @@ -4,7 +4,7 @@ import { useRoute, useRouter } from 'vue-router' import { ArrowBackOutline, CreateOutline, TrashOutline, PushOutline, AddOutline, StorefrontOutline, DocumentTextOutline, - ExtensionPuzzleOutline, SettingsOutline, CloudDownloadOutline, RefreshOutline + ExtensionPuzzleOutline, SettingsOutline, RefreshOutline } from '@vicons/ionicons5' import GlassModal from '../components/GlassModal.vue' import GlassTag from '../components/GlassTag.vue' @@ -41,7 +41,6 @@ const clientVersion = ref('') // 客户端更新相关 const clientUpdate = ref(null) -const checkingUpdate = ref(false) const updatingClient = ref(false) // 系统状态相关 @@ -157,31 +156,6 @@ const formatBytes = (bytes: number): string => { } // 客户端更新 -const handleCheckClientUpdate = async () => { - if (!online.value) { - message.warning('客户端离线,无法检查更新') - return - } - if (!clientOs.value || !clientArch.value) { - message.warning('无法获取客户端平台信息') - return - } - checkingUpdate.value = true - try { - const { data } = await checkClientUpdate(clientOs.value, clientArch.value) - clientUpdate.value = data - if (data.download_url) { - message.success('找到客户端更新: ' + data.latest) - } else { - message.info('已是最新版本或未找到对应平台的更新包') - } - } catch (e: any) { - message.error(e.response?.data || '检查更新失败') - } finally { - checkingUpdate.value = false - } -} - const handleApplyClientUpdate = () => { if (!clientUpdate.value?.download_url) { message.error('没有可用的下载链接')