login
This commit is contained in:
57
components/ui/CheckoutInput.vue
Normal file
57
components/ui/CheckoutInput.vue
Normal file
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div class="space-y-[15px]">
|
||||
<p :for="`base-input-${id}`" class="pl-6">
|
||||
<slot />
|
||||
</p>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex relative">
|
||||
<input :id="`base-input-${id}`" :value="modelValue" :type="!isPasswordVisible ? type : 'text'"
|
||||
:placeholder="placeholder" :disabled="disabled"
|
||||
@input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
|
||||
@focus="$emit('focus')" @blur="$emit('blur')"
|
||||
class="border border-block placeholder:text-gray dark:placeholder:text-button-disabled rounded-lg px-6 h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2 text-button" />
|
||||
<i v-if="disabled"
|
||||
class="uil uil-lock-alt text-[22px] absolute right-6 top-1/2 -translate-y-1/2 text-gray" />
|
||||
|
||||
<div v-if="type === 'password'" class="order-2 ml-1.5 cursor-pointer" :title="!isPasswordVisible ? $t('Panel.Component.InputDefault', 'Show password') : $t('Panel.Component.InputDefault', 'Hide password')
|
||||
" @click="isPasswordVisible = !isPasswordVisible">
|
||||
<FaceObserver class="ml-4 text-xl leading-6" :isPasswordVisible="isPasswordVisible" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <p class="mt-2 text-xs text-red-600">{{ validationText }}</p> -->
|
||||
|
||||
<!-- <p v-if="!validation && validation != null" class="mt-2 text-xs text-red-600">
|
||||
{{ validationText }}
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import FaceObserver from './FaceObserver.vue';
|
||||
|
||||
defineEmits(["update:modelValue", "focus", "blur"]);
|
||||
|
||||
defineProps<{
|
||||
modelValue?: string | any;
|
||||
modelModifiers?: object;
|
||||
id: number;
|
||||
type?: string;
|
||||
disabled?: boolean;
|
||||
placeholder?: string;
|
||||
validation?: boolean | null;
|
||||
validationText?: string;
|
||||
}>();
|
||||
|
||||
const isPasswordVisible = ref(false);
|
||||
|
||||
</script>
|
||||
<style>
|
||||
input:-webkit-autofill,
|
||||
input:-webkit-autofill:hover,
|
||||
input:-webkit-autofill:focus,
|
||||
input:-webkit-autofill:active {
|
||||
transition: background-color 5000s ease-in-out 0s;
|
||||
}
|
||||
</style>
|
15
components/ui/FaceObserver.vue
Normal file
15
components/ui/FaceObserver.vue
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<svg v-if="isPasswordVisible" xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 -960 960 960" width="16px" fill="#000000"><path d="m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z"/></svg>
|
||||
<svg v-else xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 -960 960 960" width="16px" fill="#000000"><path d="M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"/></svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
isPasswordVisible: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -11,15 +11,15 @@
|
||||
<image :href="src" clip-path="url(#customClip)" preserveAspectRatio="xMidYMid slice" width="100%"
|
||||
height="100%" />
|
||||
|
||||
<foreignObject x="640" y="280" width="calc(100% - 640px - 1px)" height="calc(100% - 280px)">
|
||||
<slot name="button"></slot>
|
||||
<foreignObject x="640" y="285" width="calc(100% - 640px - 1px)" height="calc(100% - 285px)">
|
||||
<slot name="button" />
|
||||
</foreignObject>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="block md:hidden">
|
||||
<img :src="src" width="100%" height="100%" class="object-contain rounded-2xl my-4" />
|
||||
<div class="flex justify-center">
|
||||
<slot name="button"></slot>
|
||||
<slot name="button" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user