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
5969f5e0
authored
Apr 28, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs and login direct
parent
ca8e940c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
public/docs/versionIntro.md
+6
-7
src/components/Layout/auth.tsx
+3
-1
src/pages/login/index.tsx
+5
-2
No files found.
public/docs/versionIntro.md
View file @
5969f5e0
### Fast GPT V2.8.1
### Fast GPT V3.0
*
新增 - 暂停聊天。
*
优化 - 知识库升级,内容条数不上限!
-
新增 - 模型共享市场,可以使用其他用户分享的模型。
*
优化 - 导入去重效果,可防止导出后的 csv 重复导入。
-
新增 - 邀请好友注册功能。
*
优化 - 聊天框,电脑端复制删除图标。
-
优化 - 选择文件,采用链式处理,避免卡死。
*
优化 - 聊天框,生成内容时,如果滚动条触底,则会自动向下滚动,不需要手动下滑。
-
修复 - 导入时分段问题。
\ No newline at end of file
src/components/Layout/auth.tsx
View file @
5969f5e0
...
@@ -34,7 +34,9 @@ const Auth = ({ children }: { children: JSX.Element }) => {
...
@@ -34,7 +34,9 @@ const Auth = ({ children }: { children: JSX.Element }) => {
{
{
onError
(
error
)
{
onError
(
error
)
{
console
.
log
(
'error->'
,
error
);
console
.
log
(
'error->'
,
error
);
router
.
replace
(
'/login'
);
router
.
replace
(
`/login?lastRoute=
${
encodeURIComponent
(
location
.
pathname
+
location
.
search
)}
`
);
toast
();
toast
();
},
},
onSettled
()
{
onSettled
()
{
...
...
src/pages/login/index.tsx
View file @
5969f5e0
...
@@ -13,6 +13,7 @@ const ForgetPasswordForm = dynamic(() => import('./components/ForgetPasswordForm
...
@@ -13,6 +13,7 @@ const ForgetPasswordForm = dynamic(() => import('./components/ForgetPasswordForm
const
Login
=
()
=>
{
const
Login
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
lastRoute
=
''
}
=
router
.
query
as
{
lastRoute
:
string
};
const
{
isPc
}
=
useScreen
();
const
{
isPc
}
=
useScreen
();
const
[
pageType
,
setPageType
]
=
useState
<
`
${
PageTypeEnum
}
`
>
(
PageTypeEnum
.
login
);
const
[
pageType
,
setPageType
]
=
useState
<
`
${
PageTypeEnum
}
`
>
(
PageTypeEnum
.
login
);
const
{
setUserInfo
}
=
useUserStore
();
const
{
setUserInfo
}
=
useUserStore
();
...
@@ -20,9 +21,11 @@ const Login = () => {
...
@@ -20,9 +21,11 @@ const Login = () => {
const
loginSuccess
=
useCallback
(
const
loginSuccess
=
useCallback
(
(
res
:
ResLogin
)
=>
{
(
res
:
ResLogin
)
=>
{
setUserInfo
(
res
.
user
,
res
.
token
);
setUserInfo
(
res
.
user
,
res
.
token
);
router
.
push
(
'/model/list'
);
setTimeout
(()
=>
{
router
.
push
(
lastRoute
?
decodeURIComponent
(
lastRoute
)
:
'/model/list'
);
},
100
);
},
},
[
router
,
setUserInfo
]
[
lastRoute
,
router
,
setUserInfo
]
);
);
function
DynamicComponent
({
type
}:
{
type
:
`
${
PageTypeEnum
}
`
})
{
function
DynamicComponent
({
type
}:
{
type
:
`
${
PageTypeEnum
}
`
})
{
...
...
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