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
61087f7a
authored
Jan 20, 2026
by
Bliod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix email send
parent
b311d482
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 @
61087f7a
...
...
@@ -31,7 +31,15 @@ import {
onDiscordOAuthClicked
,
}
from
'../../helpers'
;
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
Text
from
'@douyinfe/semi-ui/lib/es/typography/text'
;
import
{
...
...
@@ -121,7 +129,7 @@ const RegisterForm = () => {
setTurnstileEnabled
(
true
);
setTurnstileSiteKey
(
status
.
turnstile_site_key
);
}
// 从 status 获取用户协议和隐私政策的启用状态
setHasUserAgreement
(
status
.
user_agreement_enabled
||
false
);
setHasPrivacyPolicy
(
status
.
privacy_policy_enabled
||
false
);
...
...
@@ -235,7 +243,7 @@ const RegisterForm = () => {
setVerificationCodeLoading
(
true
);
try
{
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
;
if
(
success
)
{
...
...
@@ -405,7 +413,15 @@ const RegisterForm = () => {
theme=
'outline'
className=
'w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
type=
'tertiary'
icon=
{
<
SiDiscord
style=
{
{
color
:
'#5865F2'
,
width
:
'20px'
,
height
:
'20px'
}
}
/>
}
icon=
{
<
SiDiscord
style=
{
{
color
:
'#5865F2'
,
width
:
'20px'
,
height
:
'20px'
,
}
}
/>
}
onClick=
{
handleDiscordClick
}
loading=
{
discordLoading
}
>
...
...
@@ -619,7 +635,9 @@ const RegisterForm = () => {
htmlType=
'submit'
onClick=
{
handleSubmit
}
loading=
{
registerLoading
}
disabled=
{
(
hasUserAgreement
||
hasPrivacyPolicy
)
&&
!
agreedToTerms
}
disabled=
{
(
hasUserAgreement
||
hasPrivacyPolicy
)
&&
!
agreedToTerms
}
>
{
t
(
'注册'
)
}
</
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