update pay promo

This commit is contained in:
2026-02-05 10:12:47 +08:00
parent dc72f922cc
commit 012807c2da
4 changed files with 91 additions and 53 deletions

View File

@@ -278,14 +278,15 @@ export const MarkdownWithCharts = ({ content, variant = 'auto' }) => {
{children}
</Box>
),
// 表格渲染
// 表格渲染 - 提高深色模式下的对比度
table: ({ children }) => (
<TableContainer
mb={4}
borderRadius="md"
border="1px solid"
borderColor={isDark ? 'rgba(255, 255, 255, 0.1)' : 'gray.200'}
borderColor={isDark ? 'rgba(255, 255, 255, 0.2)' : 'gray.200'}
overflowX="auto"
bg={isDark ? 'rgba(0, 0, 0, 0.3)' : 'white'}
>
<Table size="sm" variant="simple">
{children}
@@ -293,7 +294,7 @@ export const MarkdownWithCharts = ({ content, variant = 'auto' }) => {
</TableContainer>
),
thead: ({ children }) => (
<Thead bg={isDark ? 'rgba(255, 255, 255, 0.05)' : 'gray.50'}>
<Thead bg={isDark ? 'rgba(139, 92, 246, 0.15)' : 'gray.50'}>
{children}
</Thead>
),
@@ -301,7 +302,10 @@ export const MarkdownWithCharts = ({ content, variant = 'auto' }) => {
tr: ({ children }) => (
<Tr
_hover={{
bg: isDark ? 'rgba(255, 255, 255, 0.03)' : 'gray.50'
bg: isDark ? 'rgba(255, 255, 255, 0.08)' : 'gray.50'
}}
_odd={{
bg: isDark ? 'rgba(255, 255, 255, 0.02)' : 'transparent'
}}
>
{children}
@@ -310,9 +314,12 @@ export const MarkdownWithCharts = ({ content, variant = 'auto' }) => {
th: ({ children }) => (
<Th
fontSize="xs"
color={headingColor}
borderColor={isDark ? 'rgba(255, 255, 255, 0.1)' : 'gray.200'}
py={2}
fontWeight="bold"
color={isDark ? 'purple.200' : headingColor}
borderColor={isDark ? 'rgba(255, 255, 255, 0.15)' : 'gray.200'}
py={2.5}
textTransform="none"
letterSpacing="normal"
>
{children}
</Th>
@@ -320,9 +327,9 @@ export const MarkdownWithCharts = ({ content, variant = 'auto' }) => {
td: ({ children }) => (
<Td
fontSize="sm"
color={textColor}
color={isDark ? 'gray.50' : textColor}
borderColor={isDark ? 'rgba(255, 255, 255, 0.1)' : 'gray.200'}
py={2}
py={2.5}
>
{children}
</Td>

View File

@@ -234,7 +234,7 @@ const ChatArea = ({
/>
) : (
<motion.div
style={{ maxWidth: '896px', margin: '0 auto', width: '100%', padding: '16px' }}
style={{ maxWidth: '1200px', margin: '0 auto', width: '100%', padding: '16px 24px' }}
variants={animations.staggerContainer}
initial="initial"
animate="animate"
@@ -271,7 +271,7 @@ const ChatArea = ({
flexShrink={0}
boxShadow="0 -8px 32px 0 rgba(31, 38, 135, 0.37)"
>
<Box maxW="896px" mx="auto">
<Box maxW="1200px" mx="auto">
{/* 已上传文件预览 */}
{uploadedFiles.length > 0 && (
<HStack mb={3} flexWrap="wrap" spacing={2}>

View File

@@ -17,10 +17,9 @@ import {
Flex,
Button,
} from '@chakra-ui/react';
import { MessageSquare, Plus, Search, ChevronLeft, ChevronDown, MoreHorizontal } from 'lucide-react';
import { MessageSquare, Plus, Search, ChevronLeft, MoreHorizontal } from 'lucide-react';
import { animations } from '../../constants/animations';
import { groupSessionsByDate } from '../../utils/sessionUtils';
import DateGroup from './DateGroup';
import { GLASS_BLUR } from '@/constants/glassConfig';
/**
@@ -83,14 +82,14 @@ const LeftSidebar = ({
<AnimatePresence>
{isOpen && (
<motion.div
style={{ width: '320px', display: 'flex', flexDirection: 'column' }}
style={{ width: '260px', display: 'flex', flexDirection: 'column' }}
initial="initial"
animate="animate"
exit="exit"
variants={animations.slideInLeft}
>
<Box
w="320px"
w="260px"
h="100%"
display="flex"
flexDirection="column"
@@ -213,17 +212,53 @@ const LeftSidebar = ({
},
}}
>
{/* 按日期分组显示会话 */}
{/* 按日期分组显示会话 - 简化版 */}
{visibleGroups.map((group, index) => (
<DateGroup
key={group.dateKey}
label={group.label}
sessions={group.sessions}
currentSessionId={currentSessionId}
onSessionSwitch={onSessionSwitch}
defaultExpanded={index < 3} // 前3个分组默认展开
index={index}
/>
<Box key={group.dateKey} mb={3}>
{/* 简洁的日期标题 */}
<Text
fontSize="xs"
fontWeight="medium"
color="gray.500"
px={2}
mb={1.5}
textTransform="uppercase"
letterSpacing="wider"
>
{group.label}
</Text>
{/* 会话列表 */}
<VStack spacing={1} align="stretch">
{group.sessions.slice(0, index === 0 ? 10 : 5).map((session) => (
<Box
key={session.session_id}
as="button"
w="100%"
px={3}
py={2}
borderRadius="lg"
textAlign="left"
bg={currentSessionId === session.session_id ? 'rgba(139, 92, 246, 0.15)' : 'transparent'}
borderWidth={currentSessionId === session.session_id ? '1px' : '0'}
borderColor="purple.400"
_hover={{
bg: currentSessionId === session.session_id ? 'rgba(139, 92, 246, 0.2)' : 'rgba(255, 255, 255, 0.05)',
}}
onClick={() => onSessionSwitch(session.session_id)}
transition="all 0.15s"
>
<Text
fontSize="sm"
color={currentSessionId === session.session_id ? 'white' : 'gray.300'}
noOfLines={1}
fontWeight={currentSessionId === session.session_id ? 'medium' : 'normal'}
>
{session.title || '新对话'}
</Text>
</Box>
))}
</VStack>
</Box>
))}
{/* 查看更多按钮 */}
@@ -315,33 +350,28 @@ const LeftSidebar = ({
)}
</Box>
{/* 用户信息卡片 */}
<Box p={4} borderTop="1px solid" borderColor="rgba(255, 255, 255, 0.1)">
<HStack spacing={3}>
{/* 底部信息简化 */}
<Box p={3} borderTop="1px solid" borderColor="rgba(255, 255, 255, 0.08)">
<HStack spacing={2}>
<Avatar
src={user?.avatar}
name={user?.nickname}
size="sm"
size="xs"
bgGradient="linear(to-br, blue.500, purple.600)"
boxShadow="0 0 12px rgba(139, 92, 246, 0.4)"
/>
<Box flex={1} minW={0}>
<Text fontSize="sm" fontWeight="medium" color="gray.100" noOfLines={1}>
{user?.nickname || '未登录'}
</Text>
<Badge
bgGradient="linear(to-r, blue.500, purple.500)"
color="white"
px={2}
py={0.5}
borderRadius="full"
fontSize="xs"
fontWeight="semibold"
textTransform="none"
>
{user?.subscription_type || 'free'}
</Badge>
</Box>
<Text fontSize="xs" color="gray.400" noOfLines={1} flex={1}>
{user?.nickname || '未登录'}
</Text>
<Badge
bg="rgba(139, 92, 246, 0.2)"
color="purple.300"
px={1.5}
borderRadius="full"
fontSize="10px"
textTransform="uppercase"
>
{user?.subscription_type || 'free'}
</Badge>
</HStack>
</Box>
</Box>