Commit 9384419c by Archer

feat: 模型数量增加。滚动条位置

parent 38c093d9
......@@ -43,8 +43,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
const authCount = await Model.countDocuments({
userId
});
if (authCount >= 5) {
throw new Error('上限5个模型');
if (authCount >= 10) {
throw new Error('上限 10 个模型');
}
// 创建模型
......
......@@ -98,17 +98,18 @@ const SlideBar = ({
flexDirection={'column'}
w={'100%'}
h={'100%'}
p={3}
py={3}
backgroundColor={'blackAlpha.800'}
color={'white'}
>
{/* 新对话 */}
{getToken() && (
<Button
w={'100%'}
w={'90%'}
variant={'white'}
h={'40px'}
mb={4}
mx={'auto'}
leftIcon={<AddIcon />}
onClick={resetChat}
>
......@@ -117,7 +118,7 @@ const SlideBar = ({
)}
{/* 我的模型 & 历史记录 折叠框*/}
<Box flex={'1 0 0'} h={0} overflowY={'auto'}>
<Box flex={'1 0 0'} px={3} h={0} overflowY={'auto'}>
{isSuccess ? (
<Accordion defaultIndex={[0]} allowToggle>
<AccordionItem borderTop={0} borderBottom={0}>
......@@ -185,6 +186,7 @@ const SlideBar = ({
<Divider my={4} />
<Box px={3}>
{/* 分享 */}
{getToken() && (
<Flex
......@@ -222,6 +224,7 @@ const SlideBar = ({
<MyIcon name="share" fill={'white'} w={'16px'} h={'16px'} mr={4} />
分享当前对话
</Flex>
</Box>
</Flex>
);
};
......
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