perf: ui调整
This commit is contained in:
parent
45ad3ba22a
commit
78903baefa
BIN
public/logo.png
Normal file
BIN
public/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 16 KiB |
@ -34,7 +34,7 @@ const Navbar = ({
|
|||||||
>
|
>
|
||||||
{/* logo */}
|
{/* logo */}
|
||||||
<Box pb={4}>
|
<Box pb={4}>
|
||||||
<Image src={'/logo.svg'} width={50} height={100} alt=""></Image>
|
<Image src={'/logo.png'} width={'35'} height={'35'} alt=""></Image>
|
||||||
</Box>
|
</Box>
|
||||||
{/* 导航列表 */}
|
{/* 导航列表 */}
|
||||||
<Box flex={1}>
|
<Box flex={1}>
|
||||||
|
|||||||
@ -45,15 +45,15 @@ const NavbarPhone = ({
|
|||||||
</Flex>
|
</Flex>
|
||||||
<Drawer isOpen={isOpen} placement="left" size={'xs'} onClose={onClose}>
|
<Drawer isOpen={isOpen} placement="left" size={'xs'} onClose={onClose}>
|
||||||
<DrawerOverlay />
|
<DrawerOverlay />
|
||||||
<DrawerContent maxWidth={'60vw'}>
|
<DrawerContent maxWidth={'50vw'}>
|
||||||
<DrawerBody p={4}>
|
<DrawerBody p={4}>
|
||||||
<Box pb={4}>
|
<Box py={4}>
|
||||||
<Image src={'/logo.svg'} w={'100%'} h={'70px'} pt={2} alt=""></Image>
|
<Image src={'/logo.png'} margin={'auto'} w={'35'} h={'35'} alt=""></Image>
|
||||||
</Box>
|
</Box>
|
||||||
{navbarList.map((item) => (
|
{navbarList.map((item) => (
|
||||||
<Flex
|
<Flex
|
||||||
key={item.label}
|
key={item.label}
|
||||||
mb={4}
|
mb={5}
|
||||||
alignItems={'center'}
|
alignItems={'center'}
|
||||||
justifyContent={'center'}
|
justifyContent={'center'}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -61,8 +61,7 @@ const NavbarPhone = ({
|
|||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
cursor={'pointer'}
|
cursor={'pointer'}
|
||||||
fontSize={'sm'}
|
h={'60px'}
|
||||||
h={'65px'}
|
|
||||||
borderRadius={'md'}
|
borderRadius={'md'}
|
||||||
{...(item.activeLink.includes(router.pathname)
|
{...(item.activeLink.includes(router.pathname)
|
||||||
? {
|
? {
|
||||||
|
|||||||
@ -374,5 +374,6 @@
|
|||||||
background-color: #222;
|
background-color: #222;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
font-family: 'Söhne,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,36 +49,32 @@ const Chat = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// 初始化聊天框
|
// 初始化聊天框
|
||||||
const { isInitialLoading } = useQuery(
|
useQuery([chatId, windowId], () => (chatId ? getInitChatSiteInfo(chatId, windowId) : null), {
|
||||||
[chatId, windowId],
|
cacheTime: 5 * 60 * 1000,
|
||||||
() => (chatId ? getInitChatSiteInfo(chatId, windowId) : null),
|
onSuccess(res) {
|
||||||
{
|
if (!res) return;
|
||||||
cacheTime: 5 * 60 * 1000,
|
router.replace(`/chat?chatId=${chatId}&windowId=${res.windowId}`);
|
||||||
onSuccess(res) {
|
|
||||||
if (!res) return;
|
|
||||||
router.replace(`/chat?chatId=${chatId}&windowId=${res.windowId}`);
|
|
||||||
|
|
||||||
setChatSiteData(res.chatSite);
|
setChatSiteData(res.chatSite);
|
||||||
setChatList(
|
setChatList(
|
||||||
res.history.map((item) => ({
|
res.history.map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
status: 'finish'
|
status: 'finish'
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
scrollToBottom();
|
scrollToBottom();
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
},
|
},
|
||||||
onError() {
|
onError() {
|
||||||
toast({
|
toast({
|
||||||
title: '初始化异常,请刷新',
|
title: '初始化异常,请刷新',
|
||||||
status: 'error',
|
status: 'error',
|
||||||
isClosable: true,
|
isClosable: true,
|
||||||
duration: 5000
|
duration: 5000
|
||||||
});
|
});
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
});
|
||||||
|
|
||||||
// gpt3 方法
|
// gpt3 方法
|
||||||
const gpt3ChatPrompt = useCallback(
|
const gpt3ChatPrompt = useCallback(
|
||||||
@ -291,7 +287,7 @@ const Chat = () => {
|
|||||||
borderBottom={'1px solid rgba(0,0,0,0.1)'}
|
borderBottom={'1px solid rgba(0,0,0,0.1)'}
|
||||||
>
|
>
|
||||||
<Flex maxW={'800px'} m={'auto'} alignItems={'flex-start'}>
|
<Flex maxW={'800px'} m={'auto'} alignItems={'flex-start'}>
|
||||||
<Box mr={4}>
|
<Box mr={media(4, 1)}>
|
||||||
<Image
|
<Image
|
||||||
src={item.obj === 'Human' ? '/imgs/human.png' : '/imgs/modelAvatar.png'}
|
src={item.obj === 'Human' ? '/imgs/human.png' : '/imgs/modelAvatar.png'}
|
||||||
alt="/imgs/modelAvatar.png"
|
alt="/imgs/modelAvatar.png"
|
||||||
|
|||||||
@ -24,56 +24,7 @@ td,
|
|||||||
svg {
|
svg {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
body,
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
select,
|
|
||||||
textarea {
|
|
||||||
font: 12px/1.5tahoma, arial, \5b8b\4f53;
|
|
||||||
}
|
|
||||||
// h1, h2, h3, h4, h5, h6{ font-size:100%; }
|
|
||||||
address,
|
|
||||||
cite,
|
|
||||||
dfn,
|
|
||||||
em,
|
|
||||||
var {
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
pre,
|
|
||||||
samp {
|
|
||||||
font-family: couriernew, courier, monospace;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
sup {
|
|
||||||
vertical-align: text-top;
|
|
||||||
}
|
|
||||||
sub {
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
|
||||||
legend {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
fieldset,
|
|
||||||
img {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
select,
|
|
||||||
textarea {
|
|
||||||
font-size: 100%;
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
#__next {
|
#__next {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user