Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
3847d8c5
authored
Jan 21, 2026
by
Seefs
Committed by
GitHub
Jan 21, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2696 from Bliod-Cook/email-verification-fix
parents
db11bfdb
61087f7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
web/src/components/auth/RegisterForm.jsx
+23
-5
No files found.
web/src/components/auth/RegisterForm.jsx
View file @
3847d8c5
...
@@ -31,7 +31,15 @@ import {
...
@@ -31,7 +31,15 @@ import {
onDiscordOAuthClicked
,
onDiscordOAuthClicked
,
}
from
'../../helpers'
;
}
from
'../../helpers'
;
import
Turnstile
from
'react-turnstile'
;
import
Turnstile
from
'react-turnstile'
;
import
{
Button
,
Card
,
Checkbox
,
Divider
,
Form
,
Icon
,
Modal
}
from
'@douyinfe/semi-ui'
;
import
{
Button
,
Card
,
Checkbox
,
Divider
,
Form
,
Icon
,
Modal
,
}
from
'@douyinfe/semi-ui'
;
import
Title
from
'@douyinfe/semi-ui/lib/es/typography/title'
;
import
Title
from
'@douyinfe/semi-ui/lib/es/typography/title'
;
import
Text
from
'@douyinfe/semi-ui/lib/es/typography/text'
;
import
Text
from
'@douyinfe/semi-ui/lib/es/typography/text'
;
import
{
import
{
...
@@ -121,7 +129,7 @@ const RegisterForm = () => {
...
@@ -121,7 +129,7 @@ const RegisterForm = () => {
setTurnstileEnabled
(
true
);
setTurnstileEnabled
(
true
);
setTurnstileSiteKey
(
status
.
turnstile_site_key
);
setTurnstileSiteKey
(
status
.
turnstile_site_key
);
}
}
// 从 status 获取用户协议和隐私政策的启用状态
// 从 status 获取用户协议和隐私政策的启用状态
setHasUserAgreement
(
status
.
user_agreement_enabled
||
false
);
setHasUserAgreement
(
status
.
user_agreement_enabled
||
false
);
setHasPrivacyPolicy
(
status
.
privacy_policy_enabled
||
false
);
setHasPrivacyPolicy
(
status
.
privacy_policy_enabled
||
false
);
...
@@ -235,7 +243,7 @@ const RegisterForm = () => {
...
@@ -235,7 +243,7 @@ const RegisterForm = () => {
setVerificationCodeLoading
(
true
);
setVerificationCodeLoading
(
true
);
try
{
try
{
const
res
=
await
API
.
get
(
const
res
=
await
API
.
get
(
`/api/verification?email=
${
inputs
.
email
}
&turnstile=
${
turnstileToken
}
`
,
`/api/verification?email=
${
encodeURIComponent
(
inputs
.
email
)
}
&turnstile=
${
turnstileToken
}
`
,
);
);
const
{
success
,
message
}
=
res
.
data
;
const
{
success
,
message
}
=
res
.
data
;
if
(
success
)
{
if
(
success
)
{
...
@@ -405,7 +413,15 @@ const RegisterForm = () => {
...
@@ -405,7 +413,15 @@ const RegisterForm = () => {
theme=
'outline'
theme=
'outline'
className=
'w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className=
'w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
type=
'tertiary'
type=
'tertiary'
icon=
{
<
SiDiscord
style=
{
{
color
:
'#5865F2'
,
width
:
'20px'
,
height
:
'20px'
}
}
/>
}
icon=
{
<
SiDiscord
style=
{
{
color
:
'#5865F2'
,
width
:
'20px'
,
height
:
'20px'
,
}
}
/>
}
onClick=
{
handleDiscordClick
}
onClick=
{
handleDiscordClick
}
loading=
{
discordLoading
}
loading=
{
discordLoading
}
>
>
...
@@ -619,7 +635,9 @@ const RegisterForm = () => {
...
@@ -619,7 +635,9 @@ const RegisterForm = () => {
htmlType=
'submit'
htmlType=
'submit'
onClick=
{
handleSubmit
}
onClick=
{
handleSubmit
}
loading=
{
registerLoading
}
loading=
{
registerLoading
}
disabled=
{
(
hasUserAgreement
||
hasPrivacyPolicy
)
&&
!
agreedToTerms
}
disabled=
{
(
hasUserAgreement
||
hasPrivacyPolicy
)
&&
!
agreedToTerms
}
>
>
{
t
(
'注册'
)
}
{
t
(
'注册'
)
}
</
Button
>
</
Button
>
...
...
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