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
a45d9333
authored
Jul 29, 2025
by
伍闲犬
Committed by
GitHub
Jul 29, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix the login container; fix the incorrect input of captcha enter trigger (#5327)
parent
6ed9198c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
17 deletions
+23
-17
projects/app/src/components/support/user/safe/SendCodeAuthModal.tsx
+20
-14
projects/app/src/pageComponents/login/LoginModal.tsx
+1
-1
projects/app/src/pageComponents/login/index.tsx
+2
-2
No files found.
projects/app/src/components/support/user/safe/SendCodeAuthModal.tsx
View file @
a45d9333
...
...
@@ -32,6 +32,20 @@ const SendCodeAuthModal = ({
runAsync
:
getCaptcha
}
=
useRequest2
(()
=>
getCaptchaPic
(
username
),
{
manual
:
false
});
const
onSubmit
=
async
({
code
}:
{
code
:
string
})
=>
{
await
onSendCode
({
username
,
captcha
:
code
});
onClose
();
};
const
onError
=
(
err
:
any
)
=>
{
console
.
log
(
err
);
};
const
handleEnterKeyDown
=
(
e
:
React
.
KeyboardEvent
<
HTMLInputElement
>
)
=>
{
if
(
e
.
key
.
toLowerCase
()
!==
'enter'
)
return
;
handleSubmit
(
onSubmit
,
onError
)();
};
return
(
<
MyModal
isOpen=
{
true
}
>
<
ModalBody
pt=
{
8
}
>
...
...
@@ -55,25 +69,17 @@ const SendCodeAuthModal = ({
/>
</
Skeleton
>
<
Input
placeholder=
{
t
(
'common:support.user.captcha_placeholder'
)
}
{
...
register
('
code
')}
/>
<
Input
placeholder=
{
t
(
'common:support.user.captcha_placeholder'
)
}
{
...
register
('
code
')}
onKeyDown=
{
handleEnterKeyDown
}
/>
</
ModalBody
>
<
ModalFooter
gap=
{
2
}
>
<
Button
isLoading=
{
onSending
}
variant=
{
'whiteBase'
}
onClick=
{
onClose
}
>
{
t
(
'common:Cancel'
)
}
</
Button
>
<
Button
isLoading=
{
onSending
}
onClick=
{
handleSubmit
(
({
code
})
=>
{
return
onSendCode
({
username
,
captcha
:
code
}).
then
(()
=>
{
onClose
();
});
},
(
err
)
=>
{
console
.
log
(
err
);
}
)
}
>
<
Button
isLoading=
{
onSending
}
onClick=
{
handleSubmit
(
onSubmit
,
onError
)
}
>
{
t
(
'common:Confirm'
)
}
</
Button
>
</
ModalFooter
>
...
...
projects/app/src/pageComponents/login/LoginModal.tsx
View file @
a45d9333
...
...
@@ -23,7 +23,7 @@ const LoginModal = ({ onSuccess }: LoginModalProps) => {
maxW=
"556px"
maxH=
{
[
'100vh'
,
'90vh'
]
}
borderRadius=
{
[
0
,
'16px'
]
}
overflow=
"
auto
"
overflow=
"
hidden
"
>
<
Box
px=
{
[
'5vw'
,
'88px'
]
}
...
...
projects/app/src/pageComponents/login/index.tsx
View file @
a45d9333
...
...
@@ -242,9 +242,9 @@ export const LoginContainer = ({
/>
)
}
<
Box
position=
"relative"
w=
"full"
h=
"full"
>
<
Box
position=
"relative"
w=
"full"
flex=
{
'1 0 0'
}
>
{
/* main content area */
}
<
Box
w=
{
[
'100%'
,
'380px'
]
}
minH=
{
[
'100vh'
,
'600px'
]
}
flex=
{
'1 0 0'
}
>
<
Box
w=
{
[
'100%'
,
'380px'
]
}
flex=
{
'1 0 0'
}
>
{
pageType
&&
DynamicComponent
?
DynamicComponent
:
<
Loading
fixed=
{
false
}
/>
}
</
Box
>
...
...
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