feat: ssr login page no client prompt

This commit is contained in:
DIYgod 2025-07-10 19:41:11 +08:00
parent fd42f5ca54
commit d7fa7ecaff
No known key found for this signature in database
3 changed files with 13 additions and 12 deletions

View File

@ -116,16 +116,6 @@ export function Login() {
{t("redirect.instruction", { app_name: APP_NAME })}
</p>
<div className="center mt-8 flex flex-col gap-4 sm:flex-row">
<Button
variant="text"
buttonClassName="h-14 text-base px-10 rounded-full"
onClick={() => {
window.location.href = "/"
}}
>
{t("redirect.continueInBrowser")}
</Button>
<Button
variant="primary"
buttonClassName="h-12 !rounded-full px-10 text-lg"
@ -136,6 +126,15 @@ export function Login() {
</div>
{openFailed && callbackUrlWithScheme && (
<div className="text-text mt-8 w-[31rem] space-y-2 text-center text-sm">
<p className="text-base">
<Trans
t={t}
i18nKey="login.no_client"
components={{
weblink: <Link to="/" className="text-accent" />,
}}
/>
</p>
<p>{t("login.enter_token")}</p>
<p className="bg-fill-tertiary flex items-center justify-center gap-4 rounded-lg p-3">
<span className="blur-sm hover:blur-none">{callbackUrlWithScheme}</span>

View File

@ -41,7 +41,7 @@
"login.confirm_password.label": "Confirm Password",
"login.continueWith": "Continue with {{provider}}",
"login.email": "Email",
"login.enter_token": "If you aren't redirected automatically, copy the token below and paste it in the \"Enter authorization token to continue\" form on the Desktop App (v0.5.0+).",
"login.enter_token": "If you've installed the client but aren't redirected, copy the token below and paste it in the \"Enter authorization token to continue\" form on the client (v0.5.0+).",
"login.errors.unknown": "Errors Unknown",
"login.forget_password.description": "Enter the email address associated with your account and we'll send you an email about how to reset your password.",
"login.forget_password.email_invalid": "Invalid email",
@ -54,6 +54,7 @@
"login.logInWithEmail": "Sign in with email",
"login.new_password.label": "New Password",
"login.no_account": "Don't have an account? <strong>Sign up</strong>",
"login.no_client": "No client detected, you can <weblink>continue using the Web App</weblink>.",
"login.openApp": "Open App",
"login.or": "Or",
"login.password": "Password",

View File

@ -41,7 +41,7 @@
"login.confirm_password.label": "确认密码",
"login.continueWith": "使用 {{provider}} 登录",
"login.email": "邮件地址",
"login.enter_token": "如果未自动重定向,请复制下方令牌并粘贴到桌面应用v0.5.0 以上)的“输入授权令牌以继续”表单中。",
"login.enter_token": "如果你已经安装了客户端但未自动重定向,请复制下方令牌并粘贴到客户端v0.5.0 以上)的“输入授权令牌以继续”表单中。",
"login.errors.unknown": "未知错误",
"login.forget_password.description": "请输入与你的帐户关联的邮件地址,我们将向你发送一封关于如何重置密码的邮件。",
"login.forget_password.email_invalid": "无效的邮箱地址",
@ -54,6 +54,7 @@
"login.logInWithEmail": "使用邮件地址登录",
"login.new_password.label": "新密码",
"login.no_account": "没有账户?<strong>注册</strong>",
"login.no_client": "未检测到客户端,你可以<weblink>在 Web App 中继续</weblink>。",
"login.openApp": "打开应用",
"login.or": "或",
"login.password": "密码",