diff --git a/src/constants/importanceLevels.js b/src/constants/importanceLevels.js index 83a26495..62564344 100644 --- a/src/constants/importanceLevels.js +++ b/src/constants/importanceLevels.js @@ -2,11 +2,11 @@ // 事件重要性等级配置 import { - WarningIcon, - WarningTwoIcon, - InfoIcon, - CheckCircleIcon, -} from '@chakra-ui/icons'; + AlertTriangle, + AlertCircle, + Info, + CheckCircle, +} from 'lucide-react'; /** * 重要性等级配置 @@ -21,7 +21,7 @@ export const IMPORTANCE_LEVELS = { colorScheme: 'red', badgeBg: '#dc2626', // 圆形徽章背景色 - 红色 badgeColor: 'white', // 圆形徽章文字颜色 - 白色 - icon: WarningIcon, + icon: AlertTriangle, label: 'S级', stampText: 'S', // 印章文字 stampFont: "'STKaiti', 'KaiTi', 'SimKai', serif", // 楷体 @@ -37,7 +37,7 @@ export const IMPORTANCE_LEVELS = { colorScheme: 'red', badgeBg: '#ea580c', // 圆形徽章背景色 - 橙色 badgeColor: 'white', // 圆形徽章文字颜色 - 白色 - icon: WarningTwoIcon, + icon: AlertCircle, label: 'A级', stampText: 'A', // 印章文字 stampFont: "'STXingkai', 'FangSong', 'STFangsong', cursive", // 行楷/草书 @@ -53,7 +53,7 @@ export const IMPORTANCE_LEVELS = { colorScheme: 'red', badgeBg: '#2563eb', // 圆形徽章背景色 - 蓝色 badgeColor: 'white', // 圆形徽章文字颜色 - 白色 - icon: InfoIcon, + icon: Info, label: 'B级', stampText: 'B', // 印章文字 stampFont: "'STKaiti', 'KaiTi', 'SimKai', serif", // 楷体 @@ -69,7 +69,7 @@ export const IMPORTANCE_LEVELS = { colorScheme: 'red', badgeBg: '#10b981', // 圆形徽章背景色 - 青绿色(替代灰色) badgeColor: 'white', // 圆形徽章文字颜色 - 白色 - icon: CheckCircleIcon, + icon: CheckCircle, label: 'C级', stampText: 'C', // 印章文字 stampFont: "'STKaiti', 'KaiTi', 'SimKai', serif", // 楷体 diff --git a/src/constants/notificationTypes.js b/src/constants/notificationTypes.js index 8c67c099..a1244a52 100644 --- a/src/constants/notificationTypes.js +++ b/src/constants/notificationTypes.js @@ -3,7 +3,7 @@ * 金融资讯通知系统 - 类型定义和常量 */ -import { MdCampaign, MdTrendingUp, MdTrendingDown, MdArticle, MdAssessment } from 'react-icons/md'; +import { Megaphone, TrendingUp, TrendingDown, FileText, BarChart2 } from 'lucide-react'; // 通知类型 export const NOTIFICATION_TYPES = { @@ -106,7 +106,7 @@ export const getPriorityBorderWidth = (priority) => { export const NOTIFICATION_TYPE_CONFIGS = { [NOTIFICATION_TYPES.ANNOUNCEMENT]: { name: '公告通知', - icon: MdCampaign, + icon: Megaphone, colorScheme: 'blue', // 亮色模式 bg: 'blue.50', @@ -123,8 +123,8 @@ export const NOTIFICATION_TYPE_CONFIGS = { name: '股票动向', // 图标根据涨跌动态设置 getIcon: (priceChange) => { - if (!priceChange) return MdTrendingUp; - return priceChange.startsWith('+') ? MdTrendingUp : MdTrendingDown; + if (!priceChange) return TrendingUp; + return priceChange.startsWith('+') ? TrendingUp : TrendingDown; }, // 颜色根据涨跌动态设置 getColorScheme: (priceChange) => { @@ -173,7 +173,7 @@ export const NOTIFICATION_TYPE_CONFIGS = { }, [NOTIFICATION_TYPES.EVENT_ALERT]: { name: '事件动向', - icon: MdArticle, + icon: FileText, colorScheme: 'orange', // 亮色模式 bg: 'orange.50', @@ -188,7 +188,7 @@ export const NOTIFICATION_TYPE_CONFIGS = { }, [NOTIFICATION_TYPES.ANALYSIS_REPORT]: { name: '分析报告', - icon: MdAssessment, + icon: BarChart2, colorScheme: 'purple', // 亮色模式 bg: 'purple.50', diff --git a/src/contexts/NotificationContext.js b/src/contexts/NotificationContext.js index 757e5d8f..0518fd0d 100644 --- a/src/contexts/NotificationContext.js +++ b/src/contexts/NotificationContext.js @@ -7,8 +7,8 @@ */ import React, { createContext, useContext, useState, useEffect, useCallback, useRef } from 'react'; -import { useToast, Box, HStack, Text, Button, CloseButton, VStack, Icon } from '@chakra-ui/react'; -import { BellIcon } from '@chakra-ui/icons'; +import { useToast, Box, HStack, Text, Button, CloseButton, VStack } from '@chakra-ui/react'; +import { Bell } from 'lucide-react'; import { useSelector } from 'react-redux'; import { selectIsMobile } from '@/store/slices/deviceSlice'; import { logger } from '../utils/logger'; @@ -282,7 +282,7 @@ export const NotificationProvider = ({ children }) => { {icon && ( - + {title} @@ -592,7 +592,7 @@ export const NotificationProvider = ({ children }) => { > - + 浏览器通知已被拒绝 diff --git a/src/layouts/components/BackToTopButton.js b/src/layouts/components/BackToTopButton.js index 9f236a1a..17e1aaba 100644 --- a/src/layouts/components/BackToTopButton.js +++ b/src/layouts/components/BackToTopButton.js @@ -1,7 +1,7 @@ // src/layouts/components/BackToTopButton.js import React, { useState, useEffect, useCallback, useRef, memo } from 'react'; import { IconButton } from '@chakra-ui/react'; -import { FiArrowUp } from 'react-icons/fi'; +import { ArrowUp } from 'lucide-react'; /** * 返回顶部按钮组件 @@ -69,7 +69,7 @@ const BackToTopButton = memo(({ return ( } + icon={} position="fixed" bottom={position.bottom} right={position.right} diff --git a/src/utils/priceFormatters.js b/src/utils/priceFormatters.js index b4642867..b4a7ff25 100644 --- a/src/utils/priceFormatters.js +++ b/src/utils/priceFormatters.js @@ -2,7 +2,7 @@ // 价格相关的工具函数 - 中国A股配色:红涨绿跌 import React from 'react'; -import { TriangleUpIcon, TriangleDownIcon } from '@chakra-ui/icons'; +import { ChevronUp, ChevronDown } from 'lucide-react'; /** * 获取价格变化的文字颜色 @@ -98,10 +98,10 @@ export const formatPriceChange = (value, decimals = 2) => { export const PriceArrow = ({ value }) => { if (value === null || value === undefined) return null; - const Icon = value > 0 ? TriangleUpIcon : TriangleDownIcon; - const color = value > 0 ? 'red.500' : 'green.500'; + const Icon = value > 0 ? ChevronUp : ChevronDown; + const color = value > 0 ? '#e53e3e' : '#38a169'; // red.500 : green.500 - return ; + return ; }; // ==================== 货币/数值格式化 ==================== diff --git a/src/variables/general.js b/src/variables/general.js index 83c88b52..a9eb800e 100755 --- a/src/variables/general.js +++ b/src/variables/general.js @@ -34,17 +34,7 @@ import { SlackLogo, SpotifyLogo, } from "components/Icons/Icons.js"; -import { AiOutlineExclamation } from "react-icons/ai"; -import { - FaArrowDown, - FaArrowUp, - FaBell, - FaCreditCard, - FaFilePdf, - FaHtml5, - FaShoppingCart, -} from "react-icons/fa"; -import { SiDropbox } from "react-icons/si"; +import { AlertCircle, ArrowDown, ArrowUp, Bell, CreditCard, FileText, Code, ShoppingCart, Box } from "lucide-react"; export const dashboardTableData = [ { @@ -93,31 +83,31 @@ export const dashboardTableData = [ export const timelineData = [ { - logo: FaBell, + logo: Bell, title: "$2400, Design changes", date: "22 DEC 7:20 PM", color: "blue.500", }, { - logo: FaHtml5, + logo: Code, title: "New order #4219423", date: "21 DEC 11:21 PM", color: "orange", }, { - logo: FaShoppingCart, + logo: ShoppingCart, title: "Server Payments for April", date: "21 DEC 9:28 PM", color: "blue.400", }, { - logo: FaCreditCard, + logo: CreditCard, title: "New card added for order #3210145", date: "20 DEC 3:52 PM", color: "orange.300", }, { - logo: SiDropbox, + logo: Box, title: "Unlock packages for Development", date: "19 DEC 11:35 PM", color: "purple", @@ -131,13 +121,13 @@ export const timelineData = [ export const timelineProjectsData = [ { - logo: FaBell, + logo: Bell, title: "$2400, Design changes", titleColor: "#fff", date: "22 DEC 7:20 PM", color: "blue.500", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "blue.500", @@ -146,13 +136,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaHtml5, + logo: Code, title: "New order #4219423", titleColor: "#fff", date: "21 DEC 11:21 PM", color: "red.500", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "red.500", @@ -165,13 +155,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaShoppingCart, + logo: ShoppingCart, title: "Server Payments for April", titleColor: "#fff", date: "21 DEC 9:28 PM", color: "green.400", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "green.400", @@ -184,13 +174,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaCreditCard, + logo: CreditCard, title: "New card added for order #3210145", titleColor: "#fff", date: "20 DEC 3:52 PM", color: "orange.300", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "orange.300", @@ -207,13 +197,13 @@ export const timelineProjectsData = [ ], }, { - logo: SiDropbox, + logo: Box, title: "Unlock packages for Development", titleColor: "#fff", date: "19 DEC 11:35 PM", color: "purple.400", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "purple.400", @@ -222,13 +212,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaBell, + logo: Bell, title: "$2400, Design changes", titleColor: "#fff", date: "22 DEC 7:20 PM", color: "green.400", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "green.400", @@ -237,13 +227,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaHtml5, + logo: Code, title: "New order #4219423", titleColor: "#fff", date: "21 DEC 11:21 PM", color: "orange", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "red.500", @@ -256,13 +246,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaShoppingCart, + logo: ShoppingCart, title: "Server Payments for April", titleColor: "#fff", date: "21 DEC 9:28 PM", color: "blue.400", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "blue.400", @@ -275,13 +265,13 @@ export const timelineProjectsData = [ ], }, { - logo: FaCreditCard, + logo: CreditCard, title: "New card added for order #3210145", titleColor: "#fff", date: "20 DEC 3:52 PM", color: "orange.300", description: - "People care about how you see the world, how you think, what motivates you, what you’re struggling with or afraid of.", + "People care about how you see the world, how you think, what motivates you, what you're struggling with or afraid of.", tags: [ { bgTag: "orange.300", @@ -346,31 +336,31 @@ export const rtlDashboardTableData = [ export const rtlTimelineData = [ { - logo: FaBell, + logo: Bell, title: "$2400, تغييرات في التصميم", date: "22 DEC 7:20 PM", color: "blue.500", }, { - logo: FaHtml5, + logo: Code, title: "طلب جديد #4219423", date: "21 DEC 11:21 PM", color: "orange", }, { - logo: FaShoppingCart, + logo: ShoppingCart, title: "مدفوعات الخادم لشهر أبريل", date: "21 DEC 9:28 PM", color: "blue.400", }, { - logo: FaCreditCard, + logo: CreditCard, title: "تمت إضافة بطاقة جديدة للطلب #3210145", date: "20 DEC 3:52 PM", color: "orange.300", }, { - logo: SiDropbox, + logo: Box, title: "فتح الحزم من أجل التنمية", date: "19 DEC 11:35 PM", color: "purple", @@ -482,35 +472,35 @@ export const invoicesData = [ date: "March, 01, 2020", code: "#MS-415646", price: "$180", - logo: FaFilePdf, + logo: FileText, format: "PDF", }, { date: "February, 10, 2020", code: "#RV-126749", price: "$250", - logo: FaFilePdf, + logo: FileText, format: "PDF", }, { date: "April, 05, 2020", code: "#FB-212562", price: "$560", - logo: FaFilePdf, + logo: FileText, format: "PDF", }, { date: "June, 25, 2019", code: "#QW-103578", price: "$120", - logo: FaFilePdf, + logo: FileText, format: "PDF", }, { date: "March, 01, 2019", code: "#AR-803481", price: "$300", - logo: FaFilePdf, + logo: FileText, format: "PDF", }, ]; @@ -541,13 +531,13 @@ export const newestTransactions = [ name: "Netflix", date: "27 March 2022, at 12:30 PM", price: "- $2,500", - logo: FaArrowDown, + logo: ArrowDown, }, { name: "Apple", date: "27 March 2022, at 12:30 PM", price: "+ $2,500", - logo: FaArrowUp, + logo: ArrowUp, }, ]; @@ -556,25 +546,25 @@ export const olderTransactions = [ name: "Stripe", date: "26 March 2022, at 13:45 PM", price: "+ $800", - logo: FaArrowUp, + logo: ArrowUp, }, { name: "HubSpot", date: "26 March 2022, at 12:30 PM", price: "+ $1,700", - logo: FaArrowUp, + logo: ArrowUp, }, { name: "Webflow", date: "26 March 2022, at 05:00 PM", price: "Pending", - logo: AiOutlineExclamation, + logo: AlertCircle, }, { name: "Microsoft", date: "25 March 2022, at 16:30 PM", price: "- $987", - logo: FaArrowDown, + logo: ArrowDown, }, ]; @@ -583,19 +573,19 @@ export const transactionsCRM = [ name: "Netflix", date: "26 March 2022, at 13:45 PM", price: "- $2500", - logo: FaArrowDown, + logo: ArrowDown, }, { name: "Apple", date: "26 March 2022, at 12:30 PM", price: "+ $2500", - logo: FaArrowUp, + logo: ArrowUp, }, { name: "Stripe", date: "26 March 2022, at 05:00 PM", price: "+ $9900", - logo: FaArrowUp, + logo: ArrowUp, }, ]; @@ -604,19 +594,19 @@ export const revenueCRM = [ name: "via Paypal", date: "27 March 2022, at 12:30 PM", price: "+ $8700", - logo: FaArrowUp, + logo: ArrowUp, }, { name: "Partner #01424", date: "27 March 2022, at 12:30 PM", price: "+ $12000", - logo: FaArrowUp, + logo: ArrowUp, }, { name: "Services", date: "26 March 2022, at 10:10 PM", price: "- $1900", - logo: FaArrowDown, + logo: ArrowDown, }, ];