feat: 在重置密码页面添加登录和注册链接;更新中文翻译以支持“注册”文本

This commit is contained in:
2025-09-24 12:32:42 +08:00
parent 7823264d80
commit f2f3e90c4d
2 changed files with 12 additions and 2 deletions

View File

@ -16,8 +16,9 @@ import { useTranslations } from "next-intl"
import { toast } from "sonner" import { toast } from "sonner"
import { InputOTPControlled } from "@/components/common/input-otp" import { InputOTPControlled } from "@/components/common/input-otp"
import { BaseErrorResponse } from "@/models/resp" import { BaseErrorResponse } from "@/models/resp"
import { loginPath } from "@/hooks/use-route" import { loginPath, registerPath } from "@/hooks/use-route"
import router from "next/router" import router from "next/router"
import Link from "next/link"
export function ResetPasswordForm({ export function ResetPasswordForm({
className, className,
@ -108,8 +109,16 @@ export function ResetPasswordForm({
> >
{t("title")} {t("title")}
</Button> </Button>
<div className="text-center text-sm">
<Link href={loginPath} className="underline underline-offset-4">
{commonT("login")}
</Link>
{" "}
<Link href={registerPath} className="underline underline-offset-4">
{commonT("register")}
</Link>
</div>
</div> </div>
{/* TODO 回归登录和注册链接 */} {/* TODO 回归登录和注册链接 */}
</div> </div>
</form> </form>

View File

@ -64,6 +64,7 @@
"minutesAgo": "分钟前", "minutesAgo": "分钟前",
"obtain": "获取", "obtain": "获取",
"password": "密码", "password": "密码",
"register": "注册",
"secondsAgo": "秒前", "secondsAgo": "秒前",
"send_verify_code": "发送验证码", "send_verify_code": "发送验证码",
"submit": "提交", "submit": "提交",