|
@@ -9,28 +9,8 @@ defineOptions({
|
|
|
name: 'LoginComponent',
|
|
name: 'LoginComponent',
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-withDefaults(
|
|
|
|
|
- defineProps<{
|
|
|
|
|
- loading?: boolean;
|
|
|
|
|
- showForgetPassword?: boolean;
|
|
|
|
|
- showRegister?: boolean;
|
|
|
|
|
- showRememberMe?: boolean;
|
|
|
|
|
- submitButtonText?: string;
|
|
|
|
|
- subTitle?: string;
|
|
|
|
|
- title?: string;
|
|
|
|
|
- }>(),
|
|
|
|
|
- {
|
|
|
|
|
- loading: false,
|
|
|
|
|
- showForgetPassword: true,
|
|
|
|
|
- showRegister: true,
|
|
|
|
|
- showRememberMe: true,
|
|
|
|
|
- submitButtonText: '',
|
|
|
|
|
- subTitle: '',
|
|
|
|
|
- title: '',
|
|
|
|
|
- },
|
|
|
|
|
-);
|
|
|
|
|
-
|
|
|
|
|
const emit = defineEmits(['goToForgetPassword', 'goToRegister', 'submit']);
|
|
const emit = defineEmits(['goToForgetPassword', 'goToRegister', 'submit']);
|
|
|
|
|
+const loading = ref(false);
|
|
|
const [Modal, modalApi] = useVbenModal();
|
|
const [Modal, modalApi] = useVbenModal();
|
|
|
|
|
|
|
|
const REMEMBER_ME_KEY = `REMEMBER_ME_USERNAME_${location.hostname}`;
|
|
const REMEMBER_ME_KEY = `REMEMBER_ME_USERNAME_${location.hostname}`;
|
|
@@ -138,11 +118,9 @@ defineExpose({
|
|
|
</div>
|
|
</div>
|
|
|
<div class="w-full px-[86px] py-[55px] sm:w-1/2">
|
|
<div class="w-full px-[86px] py-[55px] sm:w-1/2">
|
|
|
<div class="mb-6">
|
|
<div class="mb-6">
|
|
|
- <h2 class="text-[21px] font-bold">
|
|
|
|
|
- {{ title || 'Login' }}
|
|
|
|
|
- </h2>
|
|
|
|
|
|
|
+ <h2 class="text-[21px] font-bold">Login</h2>
|
|
|
<p class="text-muted-foreground mt-2 text-sm">
|
|
<p class="text-muted-foreground mt-2 text-sm">
|
|
|
- {{ subTitle || 'New user?' }}
|
|
|
|
|
|
|
+ New user?
|
|
|
<span class="cursor-pointer text-[#8B0046]" href="">
|
|
<span class="cursor-pointer text-[#8B0046]" href="">
|
|
|
Create an account
|
|
Create an account
|
|
|
</span>
|
|
</span>
|
|
@@ -155,10 +133,7 @@ defineExpose({
|
|
|
|
|
|
|
|
<!-- showRememberMe || showForgetPassword -->
|
|
<!-- showRememberMe || showForgetPassword -->
|
|
|
<div v-if="false" class="mb-6 flex justify-between">
|
|
<div v-if="false" class="mb-6 flex justify-between">
|
|
|
- <label
|
|
|
|
|
- v-if="showRememberMe"
|
|
|
|
|
- class="flex cursor-pointer items-center"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <label v-if="false" class="flex cursor-pointer items-center">
|
|
|
<input
|
|
<input
|
|
|
v-model="rememberMe"
|
|
v-model="rememberMe"
|
|
|
class="mr-2 h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-600"
|
|
class="mr-2 h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-600"
|
|
@@ -169,7 +144,7 @@ defineExpose({
|
|
|
</label>
|
|
</label>
|
|
|
|
|
|
|
|
<span
|
|
<span
|
|
|
- v-if="showForgetPassword"
|
|
|
|
|
|
|
+ v-if="false"
|
|
|
class="cursor-pointer text-sm font-normal text-blue-600 hover:underline"
|
|
class="cursor-pointer text-sm font-normal text-blue-600 hover:underline"
|
|
|
@click="handleGoToForgetPassword"
|
|
@click="handleGoToForgetPassword"
|
|
|
>
|
|
>
|
|
@@ -184,11 +159,11 @@ defineExpose({
|
|
|
class="m-auto mt-[39px] flex h-[50px] w-full cursor-pointer items-center justify-center rounded-[25px] bg-gradient-to-b from-[#8B0046] to-[#460023] text-[16px] text-white"
|
|
class="m-auto mt-[39px] flex h-[50px] w-full cursor-pointer items-center justify-center rounded-[25px] bg-gradient-to-b from-[#8B0046] to-[#460023] text-[16px] text-white"
|
|
|
@click="handleSubmit"
|
|
@click="handleSubmit"
|
|
|
>
|
|
>
|
|
|
- {{ submitButtonText || 'Login' }}
|
|
|
|
|
|
|
+ Login
|
|
|
</VbenButton>
|
|
</VbenButton>
|
|
|
|
|
|
|
|
<div
|
|
<div
|
|
|
- v-if="showRegister"
|
|
|
|
|
|
|
+ v-if="true"
|
|
|
class="mt-4 cursor-pointer text-sm text-[#7D7D7D] hover:underline"
|
|
class="mt-4 cursor-pointer text-sm text-[#7D7D7D] hover:underline"
|
|
|
@click="handleGoToRegister"
|
|
@click="handleGoToRegister"
|
|
|
>
|
|
>
|