From c3ccf5a03f8254c2e6befe82293b378a613a4216 Mon Sep 17 00:00:00 2001 From: haorwen Date: Fri, 12 Dec 2025 23:46:53 +0800 Subject: [PATCH] chore: update version to 0.9.31 in package.json and add magic link authentication strings in English and Chinese --- package.json | 2 +- public/locales/en/auth.json | 1 + public/locales/zh/auth.json | 1 + src/routes/login/MagicLinkLogin.tsx | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ccded63a..101cfc85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vocechat-web", - "version": "0.9.30", + "version": "0.9.31", "homepage": "https://voce.chat", "dependencies": { "@metamask/onboarding": "^1.0.1", diff --git a/public/locales/en/auth.json b/public/locales/en/auth.json index 2ecd96f5..b2f20f98 100644 --- a/public/locales/en/auth.json +++ b/public/locales/en/auth.json @@ -7,6 +7,7 @@ "password": "Sign in with Password", "oidc": "Sign in with OIDC", "passkey": "Sign in with Passkey", + "magic_link": "Sign in with a Magic Link", "passkey_authenticating": "Authenticating...", "passkey_error_not_supported": "Your browser doesn't support Passkey", "passkey_error_cancelled": "User cancelled or timeout", diff --git a/public/locales/zh/auth.json b/public/locales/zh/auth.json index b82c5228..032c84be 100644 --- a/public/locales/zh/auth.json +++ b/public/locales/zh/auth.json @@ -7,6 +7,7 @@ "password": "账号密码登录", "oidc": "OIDC登录", "passkey": "使用通行密钥登录", + "magic_link": "使用邀请链接登录", "passkey_authenticating": "认证中...", "passkey_error_not_supported": "您的浏览器不支持通行密钥", "passkey_error_cancelled": "用户取消或超时", diff --git a/src/routes/login/MagicLinkLogin.tsx b/src/routes/login/MagicLinkLogin.tsx index de11bdd8..cc9d09ba 100644 --- a/src/routes/login/MagicLinkLogin.tsx +++ b/src/routes/login/MagicLinkLogin.tsx @@ -1,4 +1,5 @@ import { useNavigate } from "react-router-dom"; +import { useTranslation } from "react-i18next"; import Button from "@/components/styled/Button"; @@ -7,13 +8,14 @@ type Props = { }; export default function MagicLinkLogin({ email }: Props) { const navigate = useNavigate(); + const { t } = useTranslation("auth", { keyPrefix: "login" }); const handleLogin = () => { navigate(`/send_magic_link/${email}`); }; return ( ); }