feat: implement user authentication, profile management, and email verification with i18n support
This commit is contained in:
parent
06db182c46
commit
b2365a4c6a
6 changed files with 271 additions and 17 deletions
|
|
@ -7,12 +7,14 @@
|
|||
const props = defineProps<{
|
||||
modelValue: any; // userData (firstName, lastName, phone, etc.)
|
||||
loading: boolean;
|
||||
verifying?: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: any): void;
|
||||
(e: 'submit'): void;
|
||||
(e: 'upload', file: File): void;
|
||||
(e: 'verify'): void;
|
||||
}>();
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
@ -153,9 +155,28 @@ const handleFileUpload = (event: Event) => {
|
|||
class="premium-q-input"
|
||||
:rules="emailRules"
|
||||
hide-bottom-space
|
||||
disable
|
||||
readonly
|
||||
:hint="$t('profile.emailHint')"
|
||||
/>
|
||||
>
|
||||
<template v-slot:append>
|
||||
<div v-if="modelValue.emailVerifiedAt" class="flex items-center gap-1">
|
||||
<q-icon name="check_circle" color="positive" />
|
||||
<span class="text-green-600 text-xs font-bold">{{ $t('profile.emailVerified') || 'ยืนยันแล้ว' }}</span>
|
||||
</div>
|
||||
<q-btn
|
||||
v-else
|
||||
flat
|
||||
dense
|
||||
no-caps
|
||||
color="negative"
|
||||
icon="mark_email_read"
|
||||
:label="$t('profile.verifyEmail') || 'ยืนยัน'"
|
||||
class="text-sm font-bold"
|
||||
:loading="verifying"
|
||||
@click="$emit('verify')"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue