feat: colormode

This commit is contained in:
archer
2023-03-20 18:38:00 +08:00
parent 405a75e23b
commit 3aeb510f43
2 changed files with 8 additions and 8 deletions

View File

@@ -132,7 +132,7 @@ const SlideBar = ({
w={'100%'} w={'100%'}
h={'100%'} h={'100%'}
py={3} py={3}
backgroundColor={'blackAlpha.800'} backgroundColor={'rgba(32,33,35,1)'}
color={'white'} color={'white'}
> >
{/* 新对话 */} {/* 新对话 */}

View File

@@ -361,7 +361,11 @@ const Chat = ({ chatId }: { chatId: string }) => {
}, [chatData.history, chatId, resetInputVal]); }, [chatData.history, chatId, resetInputVal]);
return ( return (
<Flex h={'100%'} flexDirection={media('row', 'column')}> <Flex
h={'100%'}
flexDirection={media('row', 'column')}
backgroundColor={useColorModeValue('blackAlpha.50', 'rgba(52,53,65)')}
>
{isPc ? ( {isPc ? (
<Box flex={'0 0 250px'} w={0} h={'100%'}> <Box flex={'0 0 250px'} w={0} h={'100%'}>
<SlideBar <SlideBar
@@ -414,11 +418,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
key={index} key={index}
py={media(9, 6)} py={media(9, 6)}
px={media(4, 2)} px={media(4, 2)}
backgroundColor={ backgroundColor={index % 2 === 0 ? useColorModeValue('white', 'rgba(68,70,84)') : ''}
index % 2 === 0
? useColorModeValue('blackAlpha.50', '')
: useColorModeValue('white', 'gray.700')
}
color={useColorModeValue('blackAlpha.700', 'white')} color={useColorModeValue('blackAlpha.700', 'white')}
borderBottom={'1px solid rgba(0,0,0,0.1)'} borderBottom={'1px solid rgba(0,0,0,0.1)'}
> >
@@ -494,7 +494,7 @@ const Chat = ({ chatId }: { chatId: string }) => {
maxHeight={'150px'} maxHeight={'150px'}
maxLength={chatData?.secret.contentMaxLen || -1} maxLength={chatData?.secret.contentMaxLen || -1}
overflowY={'auto'} overflowY={'auto'}
color={useColorModeValue('blackAlpha.600', 'white')} color={useColorModeValue('blackAlpha.700', 'white')}
onChange={(e) => { onChange={(e) => {
const textarea = e.target; const textarea = e.target;
setInputVal(textarea.value); setInputVal(textarea.value);