diff --git a/apps/web/src/components/turnstile-box.tsx b/apps/web/src/components/turnstile-box.tsx
index aa6b9af..af31732 100644
--- a/apps/web/src/components/turnstile-box.tsx
+++ b/apps/web/src/components/turnstile-box.tsx
@@ -3,7 +3,7 @@ import * as React from "react"
declare global {
interface Window {
turnstile?: {
- render: (container: HTMLElement, options: { sitekey: string; callback: (token: string) => void; "expired-callback": () => void; "error-callback": () => void }) => string
+ render: (container: HTMLElement, options: { sitekey: string; size?: "normal" | "compact" | "flexible"; callback: (token: string) => void; "expired-callback": () => void; "error-callback": () => void }) => string
remove: (widgetId: string) => void
}
}
@@ -20,6 +20,7 @@ export function TurnstileBox({ siteKey, onToken }: { siteKey: string; onToken: (
ref.current.innerHTML = ""
widgetId = window.turnstile.render(ref.current, {
sitekey: siteKey,
+ size: "flexible",
callback: onToken,
"expired-callback": () => onToken(""),
"error-callback": () => onToken(""),
@@ -46,5 +47,5 @@ export function TurnstileBox({ siteKey, onToken }: { siteKey: string; onToken: (
if (widgetId && window.turnstile) window.turnstile.remove(widgetId)
}
}, [siteKey, onToken])
- return
+ return
}
diff --git a/apps/web/src/pages/login.tsx b/apps/web/src/pages/login.tsx
index 95c047a..c6de1d8 100644
--- a/apps/web/src/pages/login.tsx
+++ b/apps/web/src/pages/login.tsx
@@ -1,6 +1,7 @@
import * as React from "react"
import { Link, Navigate } from "react-router-dom"
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
+import { ArrowRight, KeyRound, LockKeyhole } from "lucide-react"
import { api } from "@/lib/api"
import { useMe } from "@/hooks/use-me"
import { TurnstileBox } from "@/components/turnstile-box"
@@ -34,42 +35,52 @@ export function LoginPage() {
const turnstileRequired = !!publicSettings.data?.turnstileEnabled
if (me.data?.user) return
return (
-
-
-
-
LanQin Email
+
)
diff --git a/apps/web/src/pages/register.tsx b/apps/web/src/pages/register.tsx
index 9384e77..d4ffcc4 100644
--- a/apps/web/src/pages/register.tsx
+++ b/apps/web/src/pages/register.tsx
@@ -1,6 +1,7 @@
import * as React from "react"
import { Link, Navigate, useNavigate } from "react-router-dom"
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
+import { ArrowLeft, ArrowRight, UserPlus } from "lucide-react"
import { api } from "@/lib/api"
import type { PublicDomain } from "@/lib/api"
import { useMe } from "@/hooks/use-me"
@@ -61,64 +62,78 @@ export function RegisterPage() {
const turnstileRequired = !!publicSettings.data?.turnstileEnabled
if (me.data?.user) return
return (
-
-
-
-
注册账号
+
+
+
+
LanQin Email
- {publicSettings.isSuccess && !publicSettings.data.openRegistration ? (
-
-
当前未开放注册
-