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:
@@ -18,6 +18,7 @@ import { getChangeColor } from '@utils/colorUtils';
|
|||||||
// 导入子组件
|
// 导入子组件
|
||||||
import { EventFollowButton } from './atoms';
|
import { EventFollowButton } from './atoms';
|
||||||
import StockChangeIndicators from '@components/StockChangeIndicators';
|
import StockChangeIndicators from '@components/StockChangeIndicators';
|
||||||
|
import { GLASS_BLUR } from '@/constants/glassConfig';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态新闻事件卡片组件(极简版)
|
* 动态新闻事件卡片组件(极简版)
|
||||||
@@ -200,7 +201,7 @@ const DynamicNewsEventCard = React.memo(({
|
|||||||
? useColorModeValue('blue.50', 'blue.900')
|
? useColorModeValue('blue.50', 'blue.900')
|
||||||
: getChangeBasedBgColor(event.related_avg_chg)
|
: getChangeBasedBgColor(event.related_avg_chg)
|
||||||
}
|
}
|
||||||
backdropFilter="blur(10px)" // 毛玻璃效果
|
backdropFilter={GLASS_BLUR.sm} // 毛玻璃效果
|
||||||
borderWidth={isSelected ? "2px" : "1px"}
|
borderWidth={isSelected ? "2px" : "1px"}
|
||||||
borderColor={isSelected
|
borderColor={isSelected
|
||||||
? useColorModeValue('blue.500', 'blue.400')
|
? useColorModeValue('blue.500', 'blue.400')
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import {
|
|||||||
KeywordsCarousel,
|
KeywordsCarousel,
|
||||||
} from './atoms';
|
} from './atoms';
|
||||||
import StockChangeIndicators from '@components/StockChangeIndicators';
|
import StockChangeIndicators from '@components/StockChangeIndicators';
|
||||||
|
import { GLASS_BLUR } from '@/constants/glassConfig';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 横向布局的动态新闻事件卡片组件
|
* 横向布局的动态新闻事件卡片组件
|
||||||
@@ -136,7 +137,7 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
? selectedBg
|
? selectedBg
|
||||||
: getChangeBasedBgColor(event.related_avg_chg)
|
: getChangeBasedBgColor(event.related_avg_chg)
|
||||||
}
|
}
|
||||||
backdropFilter="blur(10px)" // 毛玻璃效果
|
backdropFilter={GLASS_BLUR.sm} // 毛玻璃效果
|
||||||
borderWidth={isSelected ? "2px" : "1px"}
|
borderWidth={isSelected ? "2px" : "1px"}
|
||||||
borderColor={isSelected
|
borderColor={isSelected
|
||||||
? selectedBorderColor
|
? selectedBorderColor
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import { logger } from '@utils/logger';
|
|||||||
import { getApiBase } from '@utils/apiConfig';
|
import { getApiBase } from '@utils/apiConfig';
|
||||||
import { useIndexQuote } from '@hooks/useIndexQuote';
|
import { useIndexQuote } from '@hooks/useIndexQuote';
|
||||||
import conceptStaticService from '@services/conceptStaticService';
|
import conceptStaticService from '@services/conceptStaticService';
|
||||||
|
import { GLASS_BLUR } from '@/constants/glassConfig';
|
||||||
|
|
||||||
// 定义动画
|
// 定义动画
|
||||||
const animations = `
|
const animations = `
|
||||||
@@ -634,7 +635,7 @@ const InfoModal = () => {
|
|||||||
|
|
||||||
{/* 弹窗 */}
|
{/* 弹窗 */}
|
||||||
<Modal isOpen={isOpen} onClose={onClose} size="lg" isCentered motionPreset="slideInBottom">
|
<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
|
<ModalContent
|
||||||
bg="linear-gradient(135deg, rgba(15,15,30,0.98) 0%, rgba(25,25,50,0.98) 100%)"
|
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)"
|
border="1px solid rgba(255,215,0,0.3)"
|
||||||
@@ -930,7 +931,7 @@ const HeroPanel = () => {
|
|||||||
px={4}
|
px={4}
|
||||||
py={2}
|
py={2}
|
||||||
bg="rgba(0,0,0,0.3)"
|
bg="rgba(0,0,0,0.3)"
|
||||||
backdropFilter="blur(10px)"
|
backdropFilter={GLASS_BLUR.sm}
|
||||||
borderBottom="1px solid rgba(255,255,255,0.05)"
|
borderBottom="1px solid rgba(255,255,255,0.05)"
|
||||||
justify="space-between"
|
justify="space-between"
|
||||||
align="center"
|
align="center"
|
||||||
|
|||||||
Reference in New Issue
Block a user