edit login & otp
This commit is contained in:
@@ -1,46 +1,60 @@
|
||||
<template>
|
||||
<AuthLayout title="منتایم" subtitle="ورود به حساب کاربری">
|
||||
<p
|
||||
v-if="error"
|
||||
class="mb-4 rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400"
|
||||
>
|
||||
{{ error }}
|
||||
</p>
|
||||
<AuthLayout brand subtitle="ورود به حساب کاربری">
|
||||
<div class="flex flex-1 flex-col justify-start gap-8 pt-10">
|
||||
<section class="flex flex-col items-center text-center">
|
||||
<AppLogo variant="vertical" class="mb-3 h-28 w-auto object-contain" />
|
||||
<p class="max-w-xs text-sm leading-7 text-muted">
|
||||
نوبتدهی آنلاین برای مشتریان<br />
|
||||
مدیریت ساده برای کسبوکار شما
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<AuthModeSwitch v-model="mode" />
|
||||
<section class="flex flex-col gap-4">
|
||||
<p
|
||||
v-if="error"
|
||||
class="rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400"
|
||||
>
|
||||
{{ error }}
|
||||
</p>
|
||||
|
||||
<form class="mt-auto space-y-4" @submit.prevent="onSubmit">
|
||||
<AppInput
|
||||
id="mobile"
|
||||
v-model="mobile"
|
||||
label="شماره موبایل"
|
||||
type="tel"
|
||||
inputmode="numeric"
|
||||
placeholder="09121234567"
|
||||
autocomplete="tel"
|
||||
ltr
|
||||
required
|
||||
/>
|
||||
<div class="flex flex-col gap-8">
|
||||
<AuthModeSwitch v-model="mode" />
|
||||
|
||||
<AppInput
|
||||
v-if="mode === 'password'"
|
||||
id="password"
|
||||
v-model="password"
|
||||
label="رمز عبور"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
ltr
|
||||
required
|
||||
/>
|
||||
<form class="flex flex-col gap-4" @submit.prevent="onSubmit">
|
||||
<AppInput
|
||||
id="mobile"
|
||||
v-model="mobile"
|
||||
label="شماره موبایل"
|
||||
type="tel"
|
||||
inputmode="numeric"
|
||||
placeholder="09121234567"
|
||||
autocomplete="tel"
|
||||
ltr
|
||||
required
|
||||
/>
|
||||
|
||||
<AppButton type="submit" :loading="loading">
|
||||
{{ mode === 'otp' ? 'دریافت کد تأیید' : 'ورود' }}
|
||||
</AppButton>
|
||||
</form>
|
||||
<AppInput
|
||||
v-if="mode === 'password'"
|
||||
id="password"
|
||||
v-model="password"
|
||||
label="رمز عبور"
|
||||
type="password"
|
||||
autocomplete="current-password"
|
||||
ltr
|
||||
required
|
||||
/>
|
||||
|
||||
<p v-if="mode === 'password'" class="mt-3 text-center text-xs text-muted">
|
||||
اولین بار؟ با کد یکبارمصرف وارد شوید و در پروفایل رمز بسازید.
|
||||
</p>
|
||||
<AppButton type="submit" :loading="loading">
|
||||
{{ mode === 'otp' ? 'دریافت کد تأیید' : 'ورود' }}
|
||||
</AppButton>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p v-if="mode === 'password'" class="text-center text-xs text-muted">
|
||||
اولین بار؟ با کد یکبارمصرف وارد شوید و در پروفایل رمز بسازید.
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
</AuthLayout>
|
||||
</template>
|
||||
|
||||
@@ -54,6 +68,7 @@ import AuthModeSwitch from '@/components/auth/AuthModeSwitch.vue';
|
||||
import type { AuthLoginMode } from '@/components/auth/AuthModeSwitch.vue';
|
||||
import AppButton from '@/components/ui/AppButton.vue';
|
||||
import AppInput from '@/components/ui/AppInput.vue';
|
||||
import AppLogo from '@/components/brand/AppLogo.vue';
|
||||
import AuthLayout from '@/layouts/AuthLayout.vue';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user