Commit 1ac3edcc by archer

perf: ui

parent d3959a91
......@@ -4,6 +4,7 @@ import { Box } from '@chakra-ui/react';
const Loading = () => {
return (
<Box
minW={'100px'}
w={'100%'}
h={'80px'}
backgroundImage={'url("/imgs/loading.gif")'}
......
......@@ -77,6 +77,7 @@ const MermaidBlock = ({ code }: { code: string }) => {
<Box
ref={dom}
className={styles.mermaid}
minW={'100px'}
minH={'50px'}
py={4}
dangerouslySetInnerHTML={{ __html: svg }}
......
......@@ -147,13 +147,14 @@ const PcSliderBar = ({
</Box>
)}
{/* chat history */}
<Box flex={'1 0 0'} h={0} overflow={'overlay'} userSelect={'none'}>
<Box flex={'1 0 0'} h={0} pl={2} overflowY={'scroll'} userSelect={'none'}>
{history.map((item) => (
<Flex
key={item._id}
position={'relative'}
alignItems={'center'}
p={3}
borderRadius={'md'}
mb={[2, 0]}
cursor={'pointer'}
transition={'background-color .2s ease-in'}
......@@ -162,7 +163,7 @@ const PcSliderBar = ({
}}
{...(item._id === chatId
? {
backgroundImage: `${theme.lgColor.activeBlueGradient}`
backgroundImage: `${theme.lgColor.activeBlueGradient} !important`
}
: {
bg: item.top ? 'myGray.200' : ''
......
......@@ -205,7 +205,7 @@ const Home = () => {
py={[2, 3]}
onClick={() => router.push(`/model`)}
>
点击开始
立即开始
</Button>
</Flex>
</Flex>
......
......@@ -87,7 +87,7 @@ const KbList = ({ kbId }: { kbId: string }) => {
/>
</Tooltip>
</Flex>
<Box flex={'1 0 0'} h={0} overflow={'overlay'} userSelect={'none'}>
<Box flex={'1 0 0'} h={0} pl={[0, 2]} overflowY={'scroll'} userSelect={'none'}>
{kbs.map((item) => (
<Flex
key={item._id}
......@@ -97,6 +97,8 @@ const KbList = ({ kbId }: { kbId: string }) => {
mb={[2, 0]}
cursor={'pointer'}
transition={'background-color .2s ease-in'}
borderRadius={['', 'md']}
borderBottom={['1px solid #f4f4f4', 'none']}
_hover={{
backgroundImage: ['', theme.lgColor.hoverBlueGradient]
}}
......
......@@ -119,7 +119,7 @@ const ModelList = ({ modelId }: { modelId: string }) => {
onChange={(id: any) => setCurrentTab(id)}
/>
</Flex>
<Box flex={'1 0 0'} h={0} overflow={'overlay'} userSelect={'none'}>
<Box flex={'1 0 0'} h={0} pl={[0, 2]} overflowY={'scroll'} userSelect={'none'}>
{currentModels.list.map((item) => (
<Flex
key={item._id}
......@@ -129,6 +129,8 @@ const ModelList = ({ modelId }: { modelId: string }) => {
mb={[2, 0]}
cursor={'pointer'}
transition={'background-color .2s ease-in'}
borderRadius={['', 'md']}
borderBottom={['1px solid #f4f4f4', 'none']}
_hover={{
backgroundImage: ['', theme.lgColor.hoverBlueGradient]
}}
......
......@@ -269,13 +269,13 @@ ${e.password ? `密码为: ${e.password}` : ''}`;
</Flex>
<Flex alignItems={'center'} mt={5}>
<Box flex={'0 0 80px'} w={0}>
收藏人数:
收藏人数
</Box>
<Box>{getValues('share.collection')}人</Box>
</Flex>
{isOwner && (
<Flex mt={5} alignItems={'center'}>
<Box flex={'0 0 100px'}>删除应用</Box>
<Box flex={'0 0 80px'}>删除应用</Box>
<Button
colorScheme={'gray'}
variant={'base'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment