diff --git a/src/components/GameTable.tsx b/src/components/GameTable.tsx index 98df6d1..4d2c9fa 100644 --- a/src/components/GameTable.tsx +++ b/src/components/GameTable.tsx @@ -142,7 +142,7 @@ function Scoreboard() { const game = useGameStore((s) => s.game); const { t } = useI18n(); return ( -
+
-
{label}
-
{score}
+
+
{label}
+
{score}
{t("score.tricks")}: {tricks}
@@ -235,7 +235,7 @@ function SeatAvatar({ seat, className }: { seat: Seat; className?: string }) { : { boxShadow: "0 0 0 1px rgba(212,175,55,0.2)" } } className={cn( - "relative size-12 rounded-full flex items-center justify-center font-bold text-xl", + "relative size-10 sm:size-12 rounded-full flex items-center justify-center font-bold text-lg sm:text-xl", team === 0 ? "bg-teal-700/80 text-teal-100" : "bg-rose-900/70 text-rose-100" )} > @@ -454,7 +454,7 @@ function TurnIndicator() { initial={{ opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0 }} - className="absolute bottom-[150px] left-1/2 -translate-x-1/2 z-30" + className="absolute bottom-[120px] sm:bottom-[150px] left-1/2 -translate-x-1/2 z-30" >
+
s.go); - const s = useSessionStore(); - const [tab, setTab] = useState("phone"); - const done = () => go("online"); return ( @@ -25,51 +19,39 @@ export function AuthScreen() {

{t("auth.subtitle")}

-
- setTab("phone")} icon={} label={t("auth.phone")} /> - setTab("email")} icon={} label={t("auth.email")} /> -
+ {/* Active method: phone OTP */} + - {tab === "phone" ? : } - -
- + {/* Coming soon (until email SMTP / Google are configured) */} +
+

{t("auth.otherSoon")}

+ } label={t("auth.email")} soon={t("common.soon")} /> + } label={t("auth.google")} soon={t("common.soon")} />
); } -function TabBtn({ - active, - onClick, +function SoonButton({ icon, label, + soon, }: { - active: boolean; - onClick: () => void; icon: React.ReactNode; label: string; + soon: string; }) { return ( ); } @@ -105,6 +87,7 @@ function PhoneForm({ onDone }: { onDone: () => void }) { setPhone(e.target.value)} placeholder={t("auth.phonePlaceholder")} @@ -125,6 +108,7 @@ function PhoneForm({ onDone }: { onDone: () => void }) { setCode(e.target.value)} placeholder={t("auth.codePlaceholder")} @@ -142,67 +126,6 @@ function PhoneForm({ onDone }: { onDone: () => void }) { ); } -function EmailForm({ onDone }: { onDone: () => void }) { - const { t } = useI18n(); - const signInEmail = useSessionStore((s) => s.signInEmail); - const signUpEmail = useSessionStore((s) => s.signUpEmail); - const [mode, setMode] = useState<"in" | "up">("in"); - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); - const [name, setName] = useState(""); - - const submit = async () => { - if (!email.trim() || !password.trim()) return; - if (mode === "in") await signInEmail(email.trim(), password); - else await signUpEmail(email.trim(), password, name.trim()); - onDone(); - }; - - return ( -
- {mode === "up" && ( -
- - setName(e.target.value)} - className="w-full rounded-xl bg-navy-900/70 gold-border px-4 py-3 text-cream outline-none focus:ring-2 focus:ring-gold-500/40" - /> -
- )} -
- - setEmail(e.target.value)} - className="w-full rounded-xl bg-navy-900/70 gold-border px-4 py-3 text-cream outline-none focus:ring-2 focus:ring-gold-500/40" - /> -
-
- - setPassword(e.target.value)} - className="w-full rounded-xl bg-navy-900/70 gold-border px-4 py-3 text-cream outline-none focus:ring-2 focus:ring-gold-500/40" - /> -
- - -
- ); -} - function GoogleIcon() { return ( diff --git a/src/lib/i18n.tsx b/src/lib/i18n.tsx index 9d7e5f4..556732f 100644 --- a/src/lib/i18n.tsx +++ b/src/lib/i18n.tsx @@ -177,6 +177,7 @@ const fa: Dict = { "auth.toggleSignup": "حساب ندارید؟ ثبت‌نام کنید", "auth.toggleSignin": "حساب دارید؟ وارد شوید", "auth.invalidCode": "کد نادرست است", + "auth.otherSoon": "سایر روش‌های ورود به‌زودی فعال می‌شوند", "reward.title": "پاداش بازی", "reward.rating": "امتیاز رتبه‌ای", @@ -403,6 +404,7 @@ const en: Dict = { "auth.toggleSignup": "No account? Sign up", "auth.toggleSignin": "Have an account? Sign in", "auth.invalidCode": "Invalid code", + "auth.otherSoon": "Other sign-in methods coming soon", "reward.title": "Match rewards", "reward.rating": "Rating",