refactor(Community): 迁移毛玻璃效果到统一配置

- HeroPanel.js: 使用 GLASS_BLUR.sm 替代 blur(8px) 和 blur(10px)
- DynamicNewsEventCard.js: 使用 GLASS_BLUR.sm 替代 blur(10px)
- HorizontalDynamicNewsEventCard.js: 使用 GLASS_BLUR.sm 替代 blur(10px)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-26 11:30:07 +08:00
parent 50031d5961
commit 5eeb4f9e15
3 changed files with 7 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ import { getChangeColor } from '@utils/colorUtils';
// 导入子组件
import { EventFollowButton } from './atoms';
import StockChangeIndicators from '@components/StockChangeIndicators';
import { GLASS_BLUR } from '@/constants/glassConfig';
/**
* 动态新闻事件卡片组件(极简版)
@@ -200,7 +201,7 @@ const DynamicNewsEventCard = React.memo(({
? useColorModeValue('blue.50', 'blue.900')
: getChangeBasedBgColor(event.related_avg_chg)
}
backdropFilter="blur(10px)" // 毛玻璃效果
backdropFilter={GLASS_BLUR.sm} // 毛玻璃效果
borderWidth={isSelected ? "2px" : "1px"}
borderColor={isSelected
? useColorModeValue('blue.500', 'blue.400')

View File

@@ -27,6 +27,7 @@ import {
KeywordsCarousel,
} from './atoms';
import StockChangeIndicators from '@components/StockChangeIndicators';
import { GLASS_BLUR } from '@/constants/glassConfig';
/**
* 横向布局的动态新闻事件卡片组件
@@ -136,7 +137,7 @@ const HorizontalDynamicNewsEventCard = React.memo(({
? selectedBg
: getChangeBasedBgColor(event.related_avg_chg)
}
backdropFilter="blur(10px)" // 毛玻璃效果
backdropFilter={GLASS_BLUR.sm} // 毛玻璃效果
borderWidth={isSelected ? "2px" : "1px"}
borderColor={isSelected
? selectedBorderColor

View File

@@ -31,6 +31,7 @@ import { logger } from '@utils/logger';
import { getApiBase } from '@utils/apiConfig';
import { useIndexQuote } from '@hooks/useIndexQuote';
import conceptStaticService from '@services/conceptStaticService';
import { GLASS_BLUR } from '@/constants/glassConfig';
// 定义动画
const animations = `
@@ -634,7 +635,7 @@ const InfoModal = () => {
{/* 弹窗 */}
<Modal isOpen={isOpen} onClose={onClose} size="lg" isCentered motionPreset="slideInBottom">
<ModalOverlay bg="blackAlpha.700" backdropFilter="blur(8px)" />
<ModalOverlay bg="blackAlpha.700" backdropFilter={GLASS_BLUR.sm} />
<ModalContent
bg="linear-gradient(135deg, rgba(15,15,30,0.98) 0%, rgba(25,25,50,0.98) 100%)"
border="1px solid rgba(255,215,0,0.3)"
@@ -930,7 +931,7 @@ const HeroPanel = () => {
px={4}
py={2}
bg="rgba(0,0,0,0.3)"
backdropFilter="blur(10px)"
backdropFilter={GLASS_BLUR.sm}
borderBottom="1px solid rgba(255,255,255,0.05)"
justify="space-between"
align="center"