From dbdca20cba4978ac58f05733b9724d1865c24a45 Mon Sep 17 00:00:00 2001 From: EchoZenith <60392923+EchoZenith@users.noreply.github.com> Date: Sun, 24 May 2026 23:11:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81=E4=B8=8E=E5=BA=9F=E5=BC=83=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 移除全局css变量中多余的定义 2. 简化通知发送函数参数与逻辑 3. 删除测试通知接口与前端按钮 4. 修复图表容器盒模型样式问题 --- client/src/App.jsx | 7 ------- client/src/pages/Dashboard.jsx | 33 +++------------------------------ server.js | 17 ++++------------- 3 files changed, 7 insertions(+), 50 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index 68e64d7..0a18c66 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -16,13 +16,7 @@ const cssVars = ` --text-primary: #1a1a1a; --text-secondary: #666; --text-tertiary: #999; - --text-placeholder: #999; --border-light: #e8e8e8; - --shadow-card: 0 2px 8px rgba(0,0,0,0.08); - --color-blue: #4a90e2; - --color-orange: #f39c12; - --color-purple: #9b59b6; - --color-green: #27ae60; --tab-bg: #f0f2f5; --tab-bg-active: #333; --tab-text: #666; @@ -41,7 +35,6 @@ const cssVars = ` --text-secondary: #a0a0a0; --text-tertiary: #808080; --border-light: #333; - --shadow-card: none; --tab-bg: #2a2a2a; --tab-bg-active: #4a90e2; --tab-text: #808080; diff --git a/client/src/pages/Dashboard.jsx b/client/src/pages/Dashboard.jsx index 64a204a..5cc8d51 100644 --- a/client/src/pages/Dashboard.jsx +++ b/client/src/pages/Dashboard.jsx @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback, useRef } from 'react'; import { Button, Spin, message, DatePicker } from 'antd'; -import { LogoutOutlined, ReloadOutlined, BugOutlined } from '@ant-design/icons'; +import { LogoutOutlined, ReloadOutlined } from '@ant-design/icons'; import { Lightning, ChartLine, ChartHistogram, Timer } from '@icon-park/react'; import { Chart, registerables } from 'chart.js'; import dayjs from 'dayjs'; @@ -108,20 +108,6 @@ export default function Dashboard({ onLogout }) { onLogout(); }; - const handleTestNotify = async () => { - try { - const res = await fetch('/api/test-notify'); - const data = await res.json(); - if (data.success) { - message.success('测试消息已发送,请检查通知渠道'); - } else { - message.error('发送失败'); - } - } catch { - message.error('发送失败'); - } - }; - const handleSendReport = async () => { try { const res = await fetch('/api/send-report'); @@ -362,19 +348,6 @@ body { margin: 0; } > 手动获取 -