feat(frontend): rebuild auth around mobile-first flow
This commit is contained in:
@@ -643,8 +643,8 @@ export default function Profile() {
|
||||
<div className="flex flex-col items-start justify-between gap-8 lg:flex-row-reverse">
|
||||
<div className="flex flex-1 flex-col items-start gap-5 text-right lg:items-end">
|
||||
<div className="flex flex-wrap items-center gap-2 lg:justify-end">
|
||||
<Badge variant={me?.is_email_verified ? "default" : "secondary"}>
|
||||
{me?.is_email_verified ? "ایمیل تأیید شده" : "در انتظار تأیید ایمیل"}
|
||||
<Badge variant={me?.is_mobile_verified ? "default" : "secondary"}>
|
||||
{me?.is_mobile_verified ? "موبایل تأیید شده" : "نیازمند تأیید موبایل"}
|
||||
</Badge>
|
||||
{isAdminUser ? <Badge variant="outline">دسترسی مدیریتی</Badge> : null}
|
||||
<Badge variant="secondary">
|
||||
@@ -786,6 +786,7 @@ export default function Profile() {
|
||||
<CardTitle className="text-base">وضعیت حساب</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-1">
|
||||
<InfoRow label="موبایل" value={me?.mobile || "—"} />
|
||||
<InfoRow label="ایمیل" value={me?.email || "—"} />
|
||||
<InfoRow label="نام کاربری" value={me?.username || "—"} />
|
||||
<InfoRow
|
||||
@@ -793,18 +794,22 @@ export default function Profile() {
|
||||
value={me?.date_joined ? formatJalali(me.date_joined, false) : "—"}
|
||||
/>
|
||||
<InfoRow
|
||||
label="تأیید ایمیل"
|
||||
label="تأیید موبایل"
|
||||
value={
|
||||
<span className="inline-flex items-center gap-2">
|
||||
{me?.is_email_verified ? (
|
||||
{me?.is_mobile_verified ? (
|
||||
<BadgeCheck className="h-4 w-4 text-emerald-600" />
|
||||
) : (
|
||||
<Clock3 className="h-4 w-4 text-amber-600" />
|
||||
)}
|
||||
{me?.is_email_verified ? "تأیید شده" : "در انتظار"}
|
||||
{me?.is_mobile_verified ? "تأیید شده" : "در انتظار"}
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
<InfoRow
|
||||
label="اتصال گوگل"
|
||||
value={me?.has_google_link ? "متصل" : "متصل نیست"}
|
||||
/>
|
||||
<InfoRow
|
||||
label="سطح دسترسی"
|
||||
value={isAdminUser ? "مدیریتی" : "کاربر عادی"}
|
||||
@@ -829,7 +834,7 @@ export default function Profile() {
|
||||
|
||||
<Button variant="secondary" className="justify-between rounded-2xl py-6" asChild>
|
||||
<Link to="/reset-password">
|
||||
<span>درخواست تغییر رمز عبور</span>
|
||||
<span>بازیابی یا تغییر رمز با موبایل</span>
|
||||
<Mail className="h-4 w-4" />
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user