fix: ui;perf: docs

This commit is contained in:
archer
2023-05-14 22:04:19 +08:00
parent d31bdf0ee0
commit ca99837dab
6 changed files with 20 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
import type { NextApiRequest, NextApiResponse } from 'next';
import { jsonRes } from '@/service/response';
import { Chat, Model, connectToDatabase, Collection } from '@/service/mongo';
import { Chat, Model, connectToDatabase, Collection, ShareChat } from '@/service/mongo';
import { authToken } from '@/service/utils/auth';
import { PgClient } from '@/service/pg';
import { authModel } from '@/service/utils/auth';
@@ -40,6 +40,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
modelId
});
// 删除分享链接
await ShareChat.deleteMany({
modelId
});
// 删除模型
await Model.deleteOne({
_id: modelId,

View File

@@ -97,7 +97,7 @@ const PcSliderBar = ({
{isPc && (
<Box
className={styles.newChat}
zIndex={1000}
zIndex={1001}
w={'90%'}
h={'40px'}
my={5}
@@ -117,7 +117,7 @@ const PcSliderBar = ({
<Box
className={styles.modelListContainer}
position={'absolute'}
w={'110%'}
w={'115%'}
left={0}
top={'40px'}
transition={'0.15s ease-out'}

View File

@@ -681,7 +681,12 @@ const Chat = ({
color={'white'}
/>
</Flex>
<Box position={'relative'} h={'100%'} bg={'white'} overflow={'hidden'}>
<Box
position={'relative'}
h={'100%'}
bg={'white'}
overflow={foldSliderBar ? 'hidden' : 'visible'}
>
<History
onclickDelHistory={onclickDelHistory}
onclickExportChat={onclickExportChat}
@@ -967,7 +972,7 @@ const Chat = ({
{
<Modal isOpen={!!showSystemPrompt} onClose={() => setShowSystemPrompt('')}>
<ModalOverlay />
<ModalContent maxW={'min(90vw, 600px)'} pr={2} maxH={'80vh'} overflowY={'auto'}>
<ModalContent pt={5} maxW={'min(90vw, 600px)'} h={'80vh'} overflow={'overlay'}>
<ModalCloseButton />
<ModalBody pt={5} whiteSpace={'pre-wrap'} textAlign={'justify'}>
{showSystemPrompt}