refactor(glass): 批次2 - 迁移 Company 页面使用统一毛玻璃配置

迁移以下 5 个 Company 模块文件:
- fui.ts: FUI_GLASS 改用全局 GLASS_BLUR/BG/BORDER 常量
- index.ts: GLASS 常量改用全局配置
- AnalysisModal.tsx: GLASS_BLUR.sm 替换 blur(8px)
- DynamicTrackingNavSkeleton.tsx: GLASS_BLUR.lg 替换 blur(20px)
- CompanyOverviewNavSkeleton.tsx: GLASS_BLUR.lg 替换 blur(20px)

保持 FUI_GLASS 导出不变,确保向后兼容

🤖 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 16:22:19 +08:00
parent 8643a38a81
commit 5c4bcce125
5 changed files with 35 additions and 25 deletions

View File

@@ -29,6 +29,7 @@ import {
GitBranch, GitBranch,
Info, Info,
} from 'lucide-react'; } from 'lucide-react';
import { GLASS_BLUR } from '@/constants/glassConfig';
// 深空 FUI 主题配置(与 SubTabContainer 保持一致) // 深空 FUI 主题配置(与 SubTabContainer 保持一致)
const DEEP_SPACE = { const DEEP_SPACE = {
@@ -112,7 +113,7 @@ const CompanyOverviewNavSkeleton: React.FC = () => {
{/* 导航栏容器 - compact 模式(无外边距) */} {/* 导航栏容器 - compact 模式(无外边距) */}
<Flex <Flex
bg={DEEP_SPACE.bgGlass} bg={DEEP_SPACE.bgGlass}
backdropFilter="blur(20px)" backdropFilter={GLASS_BLUR.lg}
borderBottom="1px solid" borderBottom="1px solid"
borderColor={DEEP_SPACE.borderGold} borderColor={DEEP_SPACE.borderGold}
borderRadius={0} borderRadius={0}

View File

@@ -18,6 +18,7 @@ import {
CardBody, CardBody,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { Newspaper, Megaphone, Calendar, BarChart2 } from 'lucide-react'; import { Newspaper, Megaphone, Calendar, BarChart2 } from 'lucide-react';
import { GLASS_BLUR } from '@/constants/glassConfig';
// 深空 FUI 主题配置(与 SubTabContainer 保持一致) // 深空 FUI 主题配置(与 SubTabContainer 保持一致)
const DEEP_SPACE = { const DEEP_SPACE = {
@@ -73,7 +74,7 @@ const DynamicTrackingNavSkeleton: React.FC = () => {
{/* 导航栏容器 */} {/* 导航栏容器 */}
<Flex <Flex
bg={DEEP_SPACE.bgGlass} bg={DEEP_SPACE.bgGlass}
backdropFilter="blur(20px)" backdropFilter={GLASS_BLUR.lg}
borderBottom="1px solid" borderBottom="1px solid"
borderColor={DEEP_SPACE.borderGold} borderColor={DEEP_SPACE.borderGold}
borderRadius={DEEP_SPACE.radiusLG} borderRadius={DEEP_SPACE.radiusLG}

View File

@@ -20,6 +20,7 @@ import { FileText, TrendingUp, Building2, Newspaper, BookOpen } from 'lucide-rea
import MarkdownRenderer from './MarkdownRenderer'; import MarkdownRenderer from './MarkdownRenderer';
import { formatNumber } from '../utils/formatUtils'; import { formatNumber } from '../utils/formatUtils';
import type { AnalysisModalProps, RiseAnalysis, Theme } from '../types'; import type { AnalysisModalProps, RiseAnalysis, Theme } from '../types';
import { GLASS_BLUR } from '@/constants/glassConfig';
// FUI 风格颜色常量 // FUI 风格颜色常量
const FUI = { const FUI = {
@@ -381,7 +382,7 @@ const AnalysisModal: React.FC<AnalysisModalProps> = ({ isOpen, onClose, content
<Modal isOpen={isOpen} onClose={onClose} size="4xl" scrollBehavior="inside" isCentered> <Modal isOpen={isOpen} onClose={onClose} size="4xl" scrollBehavior="inside" isCentered>
<ModalOverlay <ModalOverlay
bg="rgba(0, 0, 0, 0.8)" bg="rgba(0, 0, 0, 0.8)"
backdropFilter="blur(8px)" backdropFilter={GLASS_BLUR.sm}
/> />
<ModalContent <ModalContent
bg="linear-gradient(145deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 26, 0.99) 100%)" bg="linear-gradient(145deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 26, 0.99) 100%)"

View File

@@ -6,8 +6,13 @@
* - Linear.app: 极简、精致微交互、清晰层次 * - Linear.app: 极简、精致微交互、清晰层次
* - James Turrell: 柔和光影渐变、沉浸式氛围 * - James Turrell: 柔和光影渐变、沉浸式氛围
* - HeroUI: 现代组件风格 * - HeroUI: 现代组件风格
*
* 注意: Glassmorphism 配置已迁移至全局 @/constants/glassConfig.ts
* 此处 FUI_GLASS 保留向后兼容,实际使用统一配置
*/ */
import { GLASS_BLUR, GLASS_BG, GLASS_BORDER } from '@/constants/glassConfig';
// ============================================ // ============================================
// 核心色彩系统 // 核心色彩系统
// ============================================ // ============================================
@@ -111,31 +116,31 @@ export const FUI_GLOW = {
} as const; } as const;
// ============================================ // ============================================
// Glassmorphism 配置 // Glassmorphism 配置(使用全局统一配置)
// ============================================ // ============================================
export const FUI_GLASS = { export const FUI_GLASS = {
// 背景模糊 // 背景模糊 - 使用全局配置
blur: { blur: {
sm: 'blur(8px)', sm: GLASS_BLUR.sm,
md: 'blur(16px)', md: GLASS_BLUR.md,
lg: 'blur(24px)', lg: GLASS_BLUR.lg,
xl: 'blur(40px)', xl: GLASS_BLUR.xl,
}, },
// 玻璃背景 // 玻璃背景 - 使用全局配置
bg: { bg: {
light: 'rgba(255, 255, 255, 0.03)', light: GLASS_BG.light,
medium: 'rgba(255, 255, 255, 0.05)', medium: GLASS_BG.strong,
dark: 'rgba(0, 0, 0, 0.2)', dark: GLASS_BG.dark,
gold: 'rgba(212, 175, 55, 0.05)', gold: GLASS_BG.gold,
}, },
// 边框 // 边框 - 使用全局配置
border: { border: {
subtle: '1px solid rgba(255, 255, 255, 0.05)', subtle: GLASS_BORDER.subtle,
default: '1px solid rgba(212, 175, 55, 0.15)', default: GLASS_BORDER.default,
emphasis: '1px solid rgba(212, 175, 55, 0.3)', emphasis: GLASS_BORDER.emphasis,
}, },
} as const; } as const;

View File

@@ -93,15 +93,17 @@ export const GLOW = {
} as const; } as const;
/** /**
* 玻璃效果 * 玻璃效果 - 使用全局统一配置
*/ */
import { GLASS_BLUR, GLASS_BG } from '@/constants/glassConfig';
export const GLASS = { export const GLASS = {
blur: 'blur(16px)', blur: GLASS_BLUR.md,
blurSm: 'blur(8px)', blurSm: GLASS_BLUR.sm,
blurLg: 'blur(24px)', blurLg: GLASS_BLUR.lg,
bgLight: 'rgba(255, 255, 255, 0.03)', bgLight: GLASS_BG.light,
bgDark: 'rgba(0, 0, 0, 0.2)', bgDark: GLASS_BG.dark,
bgGold: 'rgba(212, 175, 55, 0.05)', bgGold: GLASS_BG.gold,
} as const; } as const;
/** /**