From e0e00d023f90199ccbfc9bb61344acc4a0d8b813 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 4 Nov 2025 02:00:54 +0800 Subject: [PATCH] :bug: Fix mail factor code use wrong title and template --- DysonNetwork.Pass/Account/AccountService.cs | 2 +- .../Emails/VerificationEmail.razor | 2 +- .../Resources/Localization/EmailResource.resx | 39 ++++++++++--------- .../Localization/EmailResource.zh-hans.resx | 39 ++++++++++--------- DysonNetwork.sln.DotSettings.user | 2 +- 5 files changed, 45 insertions(+), 39 deletions(-) diff --git a/DysonNetwork.Pass/Account/AccountService.cs b/DysonNetwork.Pass/Account/AccountService.cs index c6105e8..8207c30 100644 --- a/DysonNetwork.Pass/Account/AccountService.cs +++ b/DysonNetwork.Pass/Account/AccountService.cs @@ -450,7 +450,7 @@ public class AccountService( .SendTemplatedEmailAsync( account.Nick, contact.Content, - emailLocalizer["VerificationEmail"], + emailLocalizer["EmailCodeTitle"], new VerificationEmailModel { Name = account.Name, diff --git a/DysonNetwork.Pass/Emails/VerificationEmail.razor b/DysonNetwork.Pass/Emails/VerificationEmail.razor index 2763b19..71654a9 100644 --- a/DysonNetwork.Pass/Emails/VerificationEmail.razor +++ b/DysonNetwork.Pass/Emails/VerificationEmail.razor @@ -5,7 +5,7 @@ -

@(Localizer["VerificationHeader1"])

+

@(Localizer["CodeHeader1"])

@(Localizer["VerificationPara1"]) @@@Name,

@(Localizer["VerificationPara2"])

@(Localizer["VerificationPara3"])

diff --git a/DysonNetwork.Pass/Resources/Localization/EmailResource.resx b/DysonNetwork.Pass/Resources/Localization/EmailResource.resx index 89dd75c..b4a0b9f 100644 --- a/DysonNetwork.Pass/Resources/Localization/EmailResource.resx +++ b/DysonNetwork.Pass/Resources/Localization/EmailResource.resx @@ -81,24 +81,6 @@ If you didn't request this, you can ignore this email safety. - - Verify Your Email Address - - - Dear, - - - Thank you for creating an account on the Solar Network. We're excited to have you join our community! - - - To verify your email address and access all features of your account, please use the verification code below: - - - This code will expire in 30 minutes. Please enter it on the verification page to complete your registration. - - - If you didn't create this account, please ignore this email. - Verify your email address @@ -123,4 +105,25 @@ Verify your contact information + + Your email one-time-password + + + Email One-time-password + + + Dear, + + + Someone trying to use email auth factor to authorize an access request + + + If that is you, enter the code below to continue + + + This code will expire in 30 minutes. + + + If you didn't request this, you can ignore this email safely + \ No newline at end of file diff --git a/DysonNetwork.Pass/Resources/Localization/EmailResource.zh-hans.resx b/DysonNetwork.Pass/Resources/Localization/EmailResource.zh-hans.resx index fc4ed68..749af41 100644 --- a/DysonNetwork.Pass/Resources/Localization/EmailResource.zh-hans.resx +++ b/DysonNetwork.Pass/Resources/Localization/EmailResource.zh-hans.resx @@ -74,24 +74,6 @@ 重置您的密码 - - 验证您的电子邮箱 - - - 尊敬的 - - - 感谢您在 Solar Network 上注册账号,我们很高兴您即将加入我们的社区! - - - 请使用以下验证码来验证您的电子邮箱并获取账号的所有功能: - - - 此验证码将在30分钟后失效。请在验证页面输入此验证码以完成注册。 - - - 如果您并未创建此账号,请忽略此邮件。 - 验证您的电子邮箱 @@ -116,4 +98,25 @@ 验证您的联系信息 + + 您的一次性邮件验证码 + + + 邮件一次性验证码 + + + 尊敬的 + + + 有人正在尝试使用邮件验证码作为验证因子授权访问 + + + 如果那位用户就是您,输入下方的验证码来继续访问 + + + 验证码会在 30 分钟后过期 + + + 如果您未申请过本验证码,您可以安全的忽略这封邮件 + \ No newline at end of file diff --git a/DysonNetwork.sln.DotSettings.user b/DysonNetwork.sln.DotSettings.user index 00fc01b..700edb7 100644 --- a/DysonNetwork.sln.DotSettings.user +++ b/DysonNetwork.sln.DotSettings.user @@ -172,7 +172,7 @@ </SessionState> False - False + True True