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
6f37d7b4
authored
Aug 04, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default config
parent
94a241bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
23 deletions
+20
-23
client/data/config.json
+2
-5
client/src/pages/api/system/getInitData.ts
+5
-4
client/src/pages/api/user/sendAuthCode.ts
+0
-1
client/src/pages/chat/components/SliderApps.tsx
+1
-1
client/src/pages/login/components/LoginForm.tsx
+12
-12
No files found.
client/data/config.json
View file @
6f37d7b4
{
"FeConfig"
:
{
"show_emptyChat"
:
true
,
"show_register"
:
tru
e
,
"show_register"
:
fals
e
,
"show_appStore"
:
false
,
"show_userDetail"
:
tru
e
,
"show_userDetail"
:
fals
e
,
"show_git"
:
true
,
"systemTitle"
:
"FastAI"
,
"authorText"
:
"Made by FastAI Team."
},
"SystemParams"
:
{
"beianText"
:
""
,
"baiduTongji"
:
""
,
"googleClientVerKey"
:
""
,
"googleServiceVerKey"
:
""
,
"vectorMaxProcess"
:
15
,
"qaMaxProcess"
:
15
,
"pgIvfflatProbe"
:
20
,
...
...
client/src/pages/api/system/getInitData.ts
View file @
6f37d7b4
...
...
@@ -39,9 +39,9 @@ const defaultSystemEnv = {
};
const
defaultFeConfigs
=
{
show_emptyChat
:
true
,
show_register
:
tru
e
,
show_register
:
fals
e
,
show_appStore
:
false
,
show_userDetail
:
tru
e
,
show_userDetail
:
fals
e
,
show_git
:
true
,
systemTitle
:
'FastAI'
,
authorText
:
'Made by FastAI Team.'
...
...
@@ -90,8 +90,9 @@ const defaultVectorModels = [
export
async
function
getInitConfig
()
{
try
{
const
filename
=
process
.
env
.
NODE_ENV
===
'development'
?
'config.json.local'
:
'config.json'
;
const
res
=
JSON
.
parse
(
readFileSync
(
`data/
${
filename
}
`
,
'utf-8'
));
const
filename
=
process
.
env
.
NODE_ENV
===
'development'
?
'data/config.json.local'
:
'/app/data/config.json'
;
const
res
=
JSON
.
parse
(
readFileSync
(
filename
,
'utf-8'
));
console
.
log
(
res
);
global
.
systemEnv
=
res
.
SystemParams
||
defaultSystemEnv
;
...
...
client/src/pages/api/user/sendAuthCode.ts
View file @
6f37d7b4
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import
type
{
NextApiRequest
,
NextApiResponse
}
from
'next'
;
import
{
jsonRes
}
from
'@/service/response'
;
import
{
AuthCode
}
from
'@/service/models/authCode'
;
...
...
client/src/pages/chat/components/SliderApps.tsx
View file @
6f37d7b4
...
...
@@ -23,7 +23,7 @@ const SliderApps = ({ appId }: { appId: string }) => {
px=
{
3
}
borderRadius=
{
'md'
}
_hover=
{
{
bg
:
'myGray.200'
}
}
onClick=
{
()
=>
router
.
back
(
)
}
onClick=
{
()
=>
router
.
push
(
'/app/list'
)
}
>
<
IconButton
mr=
{
3
}
...
...
client/src/pages/login/components/LoginForm.tsx
View file @
6f37d7b4
...
...
@@ -87,16 +87,16 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
{
!!
errors
.
password
&&
errors
.
password
.
message
}
</
FormErrorMessage
>
</
FormControl
>
<
Flex
align=
{
'center'
}
justifyContent=
{
'space-between'
}
mt=
{
6
}
color=
{
'myBlue.600'
}
>
<
Box
cursor=
{
'pointer'
}
_hover=
{
{
textDecoration
:
'underline'
}
}
onClick=
{
()
=>
setPageType
(
'forgetPassword'
)
}
fontSize=
"sm"
>
忘记密码?
</
Box
>
{
feConfigs
?.
show_register
&&
(
{
feConfigs
?.
show_register
&&
(
<
Flex
align=
{
'center'
}
justifyContent=
{
'space-between'
}
mt=
{
6
}
color=
{
'myBlue.600'
}
>
<
Box
cursor=
{
'pointer'
}
_hover=
{
{
textDecoration
:
'underline'
}
}
onClick=
{
()
=>
setPageType
(
'forgetPassword'
)
}
fontSize=
"sm"
>
忘记密码?
</
Box
>
<
Box
cursor=
{
'pointer'
}
_hover=
{
{
textDecoration
:
'underline'
}
}
...
...
@@ -105,8 +105,8 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
>
注册账号
</
Box
>
)
}
</
Flex
>
</
Flex
>
)
}
<
Button
type=
"submit"
mt=
{
8
}
...
...
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