login/checkout

This commit is contained in:
2025-06-30 15:27:46 +02:00
parent 012058b998
commit fd4b122936
11 changed files with 336 additions and 212 deletions

View File

@ -41,59 +41,37 @@
</div>
</UiContainer>
<UiContainer v-if="!userStore.vCodeVerify" class="flex py-20 sm:py-14">
<div class="hidden xl:block rounded-2xl min-w-[50%] h-[830px]" :style="{
<UiContainer v-if="userStore.vCodeVerify" class="flex py-20 sm:py-14">
<div class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]" :style="{
backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}" />
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12 ">
<div class="space-25-55">
<div class="space-y-[15px]">
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
<h2 class="h2-bold-bounded">{{ $t('verify_login') }}</h2>
<button @click="menuStore.navigateToItem()"
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer">{{
$t('back_to_home') }}</button>
</div>
<p>{{ $t('send_code') }} <span class="text-button font-semibold">test@ma-al.com</span> {{
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
<h2 class="h2-bold-bounded">{{ $t('verify_login') }}</h2>
<button @click="menuStore.navigateToItem()"
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer">{{
$t('back_to_home') }}</button>
</div>
<div class="space-y-[30px]">
<p>{{ $t('send_code') }} <span class="text-button font-semibold">{{ userStore.email }}</span> {{
$t('by_email') }}
</p>
</div>
<div class="space-y-[15px]">
<p class="pl-6">{{ $t('code') }}</p>
<input v-model="userStore.vCode" :placeholder="$t('code')" type="text"
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2" />
<div class="space-y-[15px]">
<p class="pl-6">{{ $t('code') }}</p>
<input v-model="userStore.vCode" :placeholder="$t('code')" type="text"
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2" />
</div>
</div>
</div>
<div class="py-[25px] sm:py-12 flex justify-center w-full">
<UiButtonArrow @click="userStore.logIn()" type="fill" :arrow="true">{{ $t('confirm') }}</UiButtonArrow>
<UiButtonArrow @click="userStore.sendFormCode(true)" type="fill" :arrow="true">{{ $t('confirm') }}
</UiButtonArrow>
</div>
</div>
</UiContainer>
<!-- v-if="store.vCodeVerify" -->
<div class="max-w-[590px] w-full">
<h3 class="mb-1 text-2xl font-bold">
{{ $t("FrontTranslations", "Verify your login") }}
</h3>
<span class="text-sm font-bold text-black">
{{ $t("FrontTranslations", "We send code to") }} <span class="text-yellow"> {{ userStore.vEmail }}</span>
{{ $t("FrontTranslations", "by") }} e-mail.</span>
<!-- <form
@submit.prevent="useUserStore().sendFormCode(`${vCode}`, vEmail, useRoute().query.to ? (useRoute().query.to as string) : undefined)">
<div class="flex flex-col w-full gap-10 mt-6">
<BaseInput v-model="vCode" :id="1"> {{ $t("FrontTranslations", "Code") }}</BaseInput>
</div>
<div class="flex flex-col">
<div class="flex">
<BaseButtonLogin id="2" type="submit">
{{ $t("FrontTranslations", "Confirm") }}
</BaseButtonLogin>
</div>
</div>
</form> -->
</div>
</template>
<script lang="ts" setup>
@ -113,7 +91,6 @@ defineProps<{
}[]
}
}>();
const store = useStore()
const userStore = useUserStore()
const menuStore = useMenuStore()
</script>