Add OTP and password login with profile password setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-23 13:14:44 +03:30
co-authored by Cursor
parent ebae7687af
commit be26c6d89a
5 changed files with 196 additions and 28 deletions
+27
View File
@@ -0,0 +1,27 @@
<template>
<div class="mb-4 flex rounded-xl border border-border bg-surface-3 p-1">
<button
type="button"
class="flex-1 rounded-lg py-2 text-sm font-medium transition"
:class="modelValue === 'otp' ? 'bg-surface text-text shadow-sm' : 'text-muted'"
@click="emit('update:modelValue', 'otp')"
>
کد یکبارمصرف
</button>
<button
type="button"
class="flex-1 rounded-lg py-2 text-sm font-medium transition"
:class="modelValue === 'password' ? 'bg-surface text-text shadow-sm' : 'text-muted'"
@click="emit('update:modelValue', 'password')"
>
رمز عبور
</button>
</div>
</template>
<script setup lang="ts">
export type AuthLoginMode = 'otp' | 'password';
defineProps<{ modelValue: AuthLoginMode }>();
const emit = defineEmits<{ 'update:modelValue': [value: AuthLoginMode] }>();
</script>