Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
78903bae
authored
Mar 05, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: ui调整
parent
45ad3ba2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
86 deletions
+33
-86
public/logo.png
+0
-0
public/logo.svg
+0
-0
src/components/Layout/navbar.tsx
+1
-1
src/components/Layout/navbarPhone.tsx
+5
-6
src/components/Markdown/index.module.scss
+1
-0
src/pages/chat/index.tsx
+25
-29
src/styles/reset.scss
+1
-50
No files found.
public/logo.png
0 → 100644
View file @
78903bae
117 KB
public/logo.svg
deleted
100644 → 0
View file @
45ad3ba2
This diff is collapsed.
Click to expand it.
src/components/Layout/navbar.tsx
View file @
78903bae
...
...
@@ -34,7 +34,7 @@ const Navbar = ({
>
{
/* logo */
}
<
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
flex=
{
1
}
>
...
...
src/components/Layout/navbarPhone.tsx
View file @
78903bae
...
...
@@ -45,15 +45,15 @@ const NavbarPhone = ({
</
Flex
>
<
Drawer
isOpen=
{
isOpen
}
placement=
"left"
size=
{
'xs'
}
onClose=
{
onClose
}
>
<
DrawerOverlay
/>
<
DrawerContent
maxWidth=
{
'
6
0vw'
}
>
<
DrawerContent
maxWidth=
{
'
5
0vw'
}
>
<
DrawerBody
p=
{
4
}
>
<
Box
p
b
=
{
4
}
>
<
Image
src=
{
'/logo.
svg'
}
w=
{
'100%'
}
h=
{
'70px'
}
pt=
{
2
}
alt=
""
></
Image
>
<
Box
p
y
=
{
4
}
>
<
Image
src=
{
'/logo.
png'
}
margin=
{
'auto'
}
w=
{
'35'
}
h=
{
'35'
}
alt=
""
></
Image
>
</
Box
>
{
navbarList
.
map
((
item
)
=>
(
<
Flex
key=
{
item
.
label
}
mb=
{
4
}
mb=
{
5
}
alignItems=
{
'center'
}
justifyContent=
{
'center'
}
onClick=
{
()
=>
{
...
...
@@ -61,8 +61,7 @@ const NavbarPhone = ({
onClose
();
}
}
cursor=
{
'pointer'
}
fontSize=
{
'sm'
}
h=
{
'65px'
}
h=
{
'60px'
}
borderRadius=
{
'md'
}
{
...
(
item
.
activeLink
.
includes
(
router
.
pathname
)
?
{
...
...
src/components/Markdown/index.module.scss
View file @
78903bae
...
...
@@ -374,5 +374,6 @@
background-color
:
#222
;
color
:
#fff
;
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'
;
}
}
src/pages/chat/index.tsx
View file @
78903bae
...
...
@@ -49,36 +49,32 @@ const Chat = () => {
},
[]);
// 初始化聊天框
const
{
isInitialLoading
}
=
useQuery
(
[
chatId
,
windowId
],
()
=>
(
chatId
?
getInitChatSiteInfo
(
chatId
,
windowId
)
:
null
),
{
cacheTime
:
5
*
60
*
1000
,
onSuccess
(
res
)
{
if
(
!
res
)
return
;
router
.
replace
(
`/chat?chatId=
${
chatId
}
&windowId=
${
res
.
windowId
}
`
);
useQuery
([
chatId
,
windowId
],
()
=>
(
chatId
?
getInitChatSiteInfo
(
chatId
,
windowId
)
:
null
),
{
cacheTime
:
5
*
60
*
1000
,
onSuccess
(
res
)
{
if
(
!
res
)
return
;
router
.
replace
(
`/chat?chatId=
${
chatId
}
&windowId=
${
res
.
windowId
}
`
);
setChatSiteData
(
res
.
chatSite
);
setChatList
(
res
.
history
.
map
((
item
)
=>
({
...
item
,
status
:
'finish'
}))
);
scrollToBottom
();
setIsLoading
(
false
);
},
onError
()
{
toast
({
title
:
'初始化异常,请刷新'
,
status
:
'error'
,
isClosable
:
true
,
duration
:
5000
});
setIsLoading
(
false
);
}
setChatSiteData
(
res
.
chatSite
);
setChatList
(
res
.
history
.
map
((
item
)
=>
({
...
item
,
status
:
'finish'
}))
);
scrollToBottom
();
setIsLoading
(
false
);
},
onError
()
{
toast
({
title
:
'初始化异常,请刷新'
,
status
:
'error'
,
isClosable
:
true
,
duration
:
5000
});
setIsLoading
(
false
);
}
);
}
);
// gpt3 方法
const
gpt3ChatPrompt
=
useCallback
(
...
...
@@ -291,7 +287,7 @@ const Chat = () => {
borderBottom=
{
'1px solid rgba(0,0,0,0.1)'
}
>
<
Flex
maxW=
{
'800px'
}
m=
{
'auto'
}
alignItems=
{
'flex-start'
}
>
<
Box
mr=
{
4
}
>
<
Box
mr=
{
media
(
4
,
1
)
}
>
<
Image
src=
{
item
.
obj
===
'Human'
?
'/imgs/human.png'
:
'/imgs/modelAvatar.png'
}
alt=
"/imgs/modelAvatar.png"
...
...
src/styles/reset.scss
View file @
78903bae
...
...
@@ -24,56 +24,7 @@ td,
svg
{
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
{
height
:
100%
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment