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
Unverified
Commit
18e0212d
authored
May 08, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: ui show;fix: avatar
parent
f20a5fe9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
src/pages/chat/components/ModelList.tsx
+0
-1
src/pages/chat/components/PhoneSliderBar.tsx
+1
-1
src/pages/chat/index.tsx
+3
-3
src/pages/number/index.tsx
+3
-3
src/service/models/model.ts
+1
-1
No files found.
src/pages/chat/components/ModelList.tsx
View file @
18e0212d
...
@@ -29,7 +29,6 @@ const ModelList = ({ models, modelId }: { models: ModelListItemType[]; modelId:
...
@@ -29,7 +29,6 @@ const ModelList = ({ models, modelId }: { models: ModelListItemType[]; modelId:
}
}
:
{})}
:
{})}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
if
(
item
.
_id
===
modelId
)
return
;
router
.
replace
(
`/chat?modelId=${item._id}`
);
router
.
replace
(
`/chat?modelId=${item._id}`
);
}
}
}
}
>
>
...
...
src/pages/chat/components/PhoneSliderBar.tsx
View file @
18e0212d
...
@@ -115,7 +115,7 @@ const PhoneSliderBar = ({
...
@@ -115,7 +115,7 @@ const PhoneSliderBar = ({
onClose
();
onClose
();
}
}
}
}
>
>
<
Image
src=
{
item
.
avatar
}
mr=
{
2
}
alt=
{
''
}
w=
{
'16px'
}
h=
{
'16px'
}
/>
<
Image
src=
{
item
.
avatar
||
'/icon/logo.png'
}
mr=
{
2
}
alt=
{
''
}
w=
{
'16px'
}
h=
{
'16px'
}
/>
<
Box
className=
{
'textEllipsis'
}
flex=
{
'1 0 0'
}
w=
{
0
}
>
<
Box
className=
{
'textEllipsis'
}
flex=
{
'1 0 0'
}
w=
{
0
}
>
{
item
.
name
}
{
item
.
name
}
</
Box
>
</
Box
>
...
...
src/pages/chat/index.tsx
View file @
18e0212d
...
@@ -550,6 +550,7 @@ const Chat = ({
...
@@ -550,6 +550,7 @@ const Chat = ({
onClick={onOpenSlider}
onClick={onOpenSlider}
/>
/>
<Box>{chatData.model.name}</Box>
<Box>{chatData.model.name}</Box>
{chatId && (
<Menu autoSelect={false}>
<Menu autoSelect={false}>
<MenuButton lineHeight={1}>
<MenuButton lineHeight={1}>
<MyIcon
<MyIcon
...
@@ -563,7 +564,6 @@ const Chat = ({
...
@@ -563,7 +564,6 @@ const Chat = ({
<MenuItem onClick={() => router.replace(`/chat?modelId=${modelId}`)}>
<MenuItem onClick={() => router.replace(`/chat?modelId=${modelId}`)}>
新对话
新对话
</MenuItem>
</MenuItem>
{chatId && (
<MenuItem
<MenuItem
onClick={async () => {
onClick={async () => {
try {
try {
...
@@ -578,12 +578,12 @@ const Chat = ({
...
@@ -578,12 +578,12 @@ const Chat = ({
>
>
删除记录
删除记录
</MenuItem>
</MenuItem>
)}
<MenuItem onClick={() => onclickExportChat('html')}>导出HTML格式</MenuItem>
<MenuItem onClick={() => onclickExportChat('html')}>导出HTML格式</MenuItem>
<MenuItem onClick={() => onclickExportChat('pdf')}>导出PDF格式</MenuItem>
<MenuItem onClick={() => onclickExportChat('pdf')}>导出PDF格式</MenuItem>
<MenuItem onClick={() => onclickExportChat('md')}>导出Markdown格式</MenuItem>
<MenuItem onClick={() => onclickExportChat('md')}>导出Markdown格式</MenuItem>
</MenuList>
</MenuList>
</Menu>
</Menu>
)}
</Flex>
</Flex>
<Drawer isOpen={isOpenSlider} placement="
left
" size={'xs'} onClose={onCloseSlider}>
<Drawer isOpen={isOpenSlider} placement="
left
" size={'xs'} onClose={onCloseSlider}>
<DrawerOverlay backgroundColor={'rgba(255,255,255,0.5)'} />
<DrawerOverlay backgroundColor={'rgba(255,255,255,0.5)'} />
...
@@ -805,7 +805,7 @@ const Chat = ({
...
@@ -805,7 +805,7 @@ const Chat = ({
<
ModalOverlay
/>
<
ModalOverlay
/>
<
ModalContent
maxW=
{
'min(90vw, 600px)'
}
pr=
{
2
}
maxH=
{
'80vh'
}
overflowY=
{
'auto'
}
>
<
ModalContent
maxW=
{
'min(90vw, 600px)'
}
pr=
{
2
}
maxH=
{
'80vh'
}
overflowY=
{
'auto'
}
>
<
ModalCloseButton
/>
<
ModalCloseButton
/>
<
ModalBody
pt=
{
5
}
fontSize=
{
'sm'
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
>
<
ModalBody
pt=
{
5
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
>
{
showSystemPrompt
}
{
showSystemPrompt
}
</
ModalBody
>
</
ModalBody
>
</
ModalContent
>
</
ModalContent
>
...
...
src/pages/number/index.tsx
View file @
18e0212d
...
@@ -22,7 +22,7 @@ const NumberSetting = () => {
...
@@ -22,7 +22,7 @@ const NumberSetting = () => {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
userInfo
,
updateUserInfo
,
initUserInfo
,
setUserInfo
}
=
useUserStore
();
const
{
userInfo
,
updateUserInfo
,
initUserInfo
,
setUserInfo
}
=
useUserStore
();
const
{
setLoading
}
=
useGlobalStore
();
const
{
setLoading
}
=
useGlobalStore
();
const
{
register
,
handleSubmit
}
=
useForm
<
UserUpdateParams
>
({
const
{
register
,
handleSubmit
,
reset
}
=
useForm
<
UserUpdateParams
>
({
defaultValues
:
userInfo
as
UserType
defaultValues
:
userInfo
as
UserType
});
});
const
[
showPay
,
setShowPay
]
=
useState
(
false
);
const
[
showPay
,
setShowPay
]
=
useState
(
false
);
...
@@ -35,11 +35,11 @@ const NumberSetting = () => {
...
@@ -35,11 +35,11 @@ const NumberSetting = () => {
const
onclickSave
=
useCallback
(
const
onclickSave
=
useCallback
(
async
(
data
:
UserUpdateParams
)
=>
{
async
(
data
:
UserUpdateParams
)
=>
{
if
(
data
.
openaiKey
===
userInfo
?.
openaiKey
)
return
;
setLoading
(
true
);
setLoading
(
true
);
try
{
try
{
await
putUserInfo
(
data
);
await
putUserInfo
(
data
);
updateUserInfo
(
data
);
updateUserInfo
(
data
);
reset
(
data
);
toast
({
toast
({
title
:
'更新成功'
,
title
:
'更新成功'
,
status
:
'success'
status
:
'success'
...
@@ -47,7 +47,7 @@ const NumberSetting = () => {
...
@@ -47,7 +47,7 @@ const NumberSetting = () => {
}
catch
(
error
)
{}
}
catch
(
error
)
{}
setLoading
(
false
);
setLoading
(
false
);
},
},
[
setLoading
,
toast
,
updateUserInfo
,
userInfo
?.
openaiKey
]
[
reset
,
setLoading
,
toast
,
updateUserInfo
]
);
);
const
onSelectFile
=
useCallback
(
const
onSelectFile
=
useCallback
(
...
...
src/service/models/model.ts
View file @
18e0212d
...
@@ -19,7 +19,7 @@ const ModelSchema = new Schema({
...
@@ -19,7 +19,7 @@ const ModelSchema = new Schema({
},
},
avatar
:
{
avatar
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
'
/icon/logo.png
'
},
},
status
:
{
status
:
{
type
:
String
,
type
:
String
,
...
...
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