diff --git a/src/assets/fonts/nucleo.woff b/src/assets/fonts/nucleo.woff deleted file mode 100755 index c1350625..00000000 Binary files a/src/assets/fonts/nucleo.woff and /dev/null differ diff --git a/src/assets/fonts/nucleo.woff2 b/src/assets/fonts/nucleo.woff2 deleted file mode 100755 index b2b79da5..00000000 Binary files a/src/assets/fonts/nucleo.woff2 and /dev/null differ diff --git a/src/components/Auth/AuthBackground.js b/src/components/Auth/AuthBackground.js deleted file mode 100644 index 83533e21..00000000 --- a/src/components/Auth/AuthBackground.js +++ /dev/null @@ -1,55 +0,0 @@ -// src/components/Auth/AuthBackground.js -import React from "react"; -import { Box } from "@chakra-ui/react"; - -/** - * 认证页面通用背景组件 - * 用于登录和注册页面的动态渐变背景 - */ -export default function AuthBackground() { - return ( - - ); -} diff --git a/src/components/Auth/AuthFooter.js b/src/components/Auth/AuthFooter.js deleted file mode 100644 index 099267e7..00000000 --- a/src/components/Auth/AuthFooter.js +++ /dev/null @@ -1,58 +0,0 @@ -import React from "react"; -import { HStack, Text, Link as ChakraLink } from "@chakra-ui/react"; -import { Link } from "react-router-dom"; - -/** - * 认证页面底部组件 - * 包含页面切换链接和登录方式切换链接 - * - * 支持两种模式: - * 1. 页面模式:使用 linkTo 进行路由跳转 - * 2. 弹窗模式:使用 onClick 进行弹窗切换 - */ -export default function AuthFooter({ - // 左侧链接配置 - linkText, // 提示文本,如 "还没有账号," 或 "已有账号?" - linkLabel, // 链接文本,如 "去注册" 或 "去登录" - linkTo, // 链接路径,如 "/auth/sign-up" 或 "/auth/sign-in"(页面模式) - onClick, // 点击回调函数(弹窗模式,优先级高于 linkTo) - - // 右侧切换配置 - useVerificationCode, // 当前是否使用验证码登录 - onSwitchMethod // 切换登录方式的回调函数 -}) { - return ( - - {/* 左侧:页面切换链接(去注册/去登录) */} - {onClick ? ( - // 弹窗模式:使用 onClick - - {linkText} - {linkLabel} - - ) : ( - // 页面模式:使用 Link 组件跳转 - - {linkText} - {linkLabel} - - )} - - {/* 右侧:登录方式切换链接(仅在提供了切换方法时显示) */} - {onSwitchMethod && ( - { - e.preventDefault(); - onSwitchMethod(); - }} - > - {useVerificationCode ? '密码登陆' : '验证码登陆'} - - )} - - ); -} diff --git a/src/components/EventDetailPanel/MiniLineChart.js b/src/components/EventDetailPanel/MiniLineChart.js deleted file mode 100644 index c75801a8..00000000 --- a/src/components/EventDetailPanel/MiniLineChart.js +++ /dev/null @@ -1,94 +0,0 @@ -// src/components/EventDetailPanel/MiniLineChart.js -// Mini 折线图组件(用于股票卡片) - -import React from 'react'; -import { Box } from '@chakra-ui/react'; - -/** - * Mini 折线图组件 - * @param {Object} props - * @param {Array} props.data - 价格走势数据数组(15个数据点:前5+中5+后5) - * @param {number} props.width - 图表宽度(默认180) - * @param {number} props.height - 图表高度(默认60) - */ -const MiniLineChart = ({ data = [], width = 180, height = 60 }) => { - if (!data || data.length === 0) { - return null; - } - - // 计算最大值和最小值,用于归一化 - const max = Math.max(...data); - const min = Math.min(...data); - const range = max - min || 1; // 防止除以0 - - // 将数据点转换为 SVG 路径坐标 - const points = data.map((value, index) => { - const x = (index / (data.length - 1)) * width; - const y = height - ((value - min) / range) * height; - return `${x.toFixed(2)},${y.toFixed(2)}`; - }); - - // 构建 SVG 路径字符串 - const pathD = `M ${points.join(' L ')}`; - - // 判断整体趋势(比较第一个和最后一个值) - const isPositive = data[data.length - 1] >= data[0]; - const strokeColor = isPositive ? '#48BB78' : '#F56565'; // 绿色上涨,红色下跌 - - // 创建渐变填充区域路径 - const fillPathD = `${pathD} L ${width},${height} L 0,${height} Z`; - - return ( - - - - - - - - - - {/* 填充区域 */} - - - {/* 折线 */} - - - {/* 垂直分隔线(标记三个时间段) */} - {/* 前一天和当天之间 */} - - - {/* 当天和后一天之间 */} - - - - ); -}; - -export default MiniLineChart;