refactor(icons): 迁移公共模块图标到 lucide-react

- constants/importanceLevels.js: 重要性等级图标
- constants/notificationTypes.js: 通知类型图标
- contexts/NotificationContext.js: 通知上下文图标
- layouts/components/BackToTopButton.js: 返回顶部按钮
- utils/priceFormatters.js: 价格格式化图标
- variables/general.js: 通用变量图标

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-25 12:25:54 +08:00
parent c820cfa804
commit ccbef35cf3
6 changed files with 71 additions and 81 deletions

View File

@@ -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", // 楷体

View File

@@ -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',