PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / views / admin / customize / steps / Cabinet / common / Authentication / SendAccessLink.vue
ameliabooking / v3 / src / views / admin / customize / steps / Cabinet / common / Authentication Last commit date
SendAccessLink.vue 1 month ago SendAccessLinkSuccess.vue 2 days ago SetPass.vue 1 month ago SignIn.vue 1 month ago Skeleton.vue 1 month ago
SendAccessLink.vue
271 lines
1 <template>
2 <div class="am-asi" :style="cssVars">
3 <div class="am-asi__top">
4 <div class="am-asi__header">
5 {{ labelsDisplay('access_link_send') }}
6 </div>
7 <div class="am-asi__text">
8 {{ labelsDisplay('access_link_send_description') }}
9 </div>
10 </div>
11
12 <el-form
13 ref="authFormRef"
14 :model="infoFormData"
15 :rules="infoFormRules"
16 label-position="top"
17 class="am-asi__form"
18 :class="responsiveClass"
19 >
20 <template v-for="(item, index) in signInFormConstruction" :key="index">
21 <component
22 :is="item.template"
23 ref="customerCollectorRef"
24 v-model="infoFormData[index]"
25 v-bind="item.props"
26 @enter="submitForm"
27 ></component>
28 </template>
29 </el-form>
30
31 <AmButton
32 class="am-asi__btn"
33 :type="amCustomize[pageRenderKey][stepName].options.sendBtn.buttonType"
34 @click="submitForm"
35 >
36 {{ labelsDisplay('send') }}
37 </AmButton>
38
39 <div class="am-asi__footer">
40 <span class="am-asi__footer-link">
41 {{ labelsDisplay('sign_in') }}
42 </span>
43 </div>
44 </div>
45 </template>
46
47 <script setup>
48 // * import from Vue
49 import { ref, computed, inject } from 'vue'
50
51 // * Composables
52 import { useResponsiveClass } from '../../../../../../../assets/js/common/responsive.js'
53 import { useColorTransparency } from '../../../../../../../assets/js/common/colorManipulation'
54 import { useReactiveCustomize } from '../../../../../../../assets/js/admin/useReactiveCustomize.js'
55
56 // * Components
57 import { formFieldsTemplates } from '../../../../../../../assets/js/common/formFieldsTemplates'
58 import AmButton from '../../../../../../_components/button/AmButton.vue'
59
60 // * Customize
61 const { amCustomize } = useReactiveCustomize()
62
63 // * Labels
64 let langKey = inject('langKey')
65 let amLabels = inject('labels')
66
67 let pageRenderKey = inject('pageRenderKey')
68 let stepName = inject('stepName')
69
70 // * Label computed function
71 function labelsDisplay(label) {
72 let computedLabel = computed(() => {
73 return amCustomize.value[pageRenderKey.value][stepName.value].translations &&
74 amCustomize.value[pageRenderKey.value][stepName.value].translations[label] &&
75 amCustomize.value[pageRenderKey.value][stepName.value].translations[label][langKey.value]
76 ? amCustomize.value[pageRenderKey.value][stepName.value].translations[label][langKey.value]
77 : amLabels[label]
78 })
79
80 return computedLabel.value
81 }
82
83 /********
84 * Form *
85 ********/
86 // * Form reference
87 let authFormRef = ref(null)
88
89 // * Form data
90 let infoFormData = ref({
91 email: '',
92 })
93
94 // * Form validation rules
95 let infoFormRules = computed(() => {
96 return {
97 email: [
98 {
99 required: true,
100 message: labelsDisplay('enter_email_warning'),
101 trigger: 'submit',
102 },
103 ],
104 }
105 })
106
107 // * Form construction
108 let signInFormConstruction = ref({
109 email: {
110 template: formFieldsTemplates.text,
111 props: {
112 itemName: 'email',
113 itemType: 'email',
114 label: computed(() => labelsDisplay('email')),
115 placeholder: '',
116 class: 'am-asi__item',
117 },
118 },
119 })
120
121 // * Submit Form
122 function submitForm() {
123 authFormRef.value.validate((valid) => {
124 return !!valid
125 })
126 }
127
128 /*************
129 * Customize *
130 *************/
131
132 // * Responsive - Container Width
133 let cWidth = inject('containerWidth')
134
135 let responsiveClass = computed(() => useResponsiveClass(cWidth.value))
136
137 // * Fonts
138 let amFonts = inject('amFonts')
139
140 // * Colors block
141 let amColors = inject('amColors')
142
143 let cssVars = computed(() => {
144 return {
145 '--am-c-primary': amColors.value.colorPrimary,
146 '--am-c-success': amColors.value.colorSuccess,
147 '--am-c-error': amColors.value.colorError,
148 '--am-c-warning': amColors.value.colorWarning,
149 '--am-c-main-bgr': amColors.value.colorMainBgr,
150 '--am-c-main-heading-text': amColors.value.colorMainHeadingText,
151 '--am-c-main-text': amColors.value.colorMainText,
152 '--am-c-main-text-op70': useColorTransparency(amColors.value.colorMainText, 0.7),
153 '--am-c-main-text-op60': useColorTransparency(amColors.value.colorMainText, 0.6),
154 '--am-c-main-text-op40': useColorTransparency(amColors.value.colorMainText, 0.4),
155 '--am-c-main-text-op25': useColorTransparency(amColors.value.colorMainText, 0.25),
156 '--am-c-inp-bgr': amColors.value.colorInpBgr,
157 '--am-c-inp-border': amColors.value.colorInpBorder,
158 '--am-c-inp-text': amColors.value.colorInpText,
159 '--am-c-inp-placeholder': amColors.value.colorInpPlaceHolder,
160 '--am-c-btn-prim': amColors.value.colorBtnPrim,
161 '--am-c-btn-prim-text': amColors.value.colorBtnPrimText,
162 '--am-c-skeleton-op20': useColorTransparency(amColors.value.colorMainText, 0.2),
163 '--am-c-skeleton-op60': useColorTransparency(amColors.value.colorMainText, 0.6),
164 '--am-font-family': amFonts.value.fontFamily,
165
166 '--am-c-scroll-op30': useColorTransparency(amColors.value.colorPrimary, 0.3),
167 '--am-c-scroll-op10': useColorTransparency(amColors.value.colorPrimary, 0.1),
168 }
169 })
170 </script>
171
172 <script>
173 export default {
174 name: 'AuthReset',
175 key: 'accessLink',
176 }
177 </script>
178
179 <style lang="scss">
180 // am - amelia
181 // asi - authentication sign in
182 @mixin auth {
183 .am-asi {
184 max-width: 400px;
185 width: 100%;
186 background-color: var(--am-c-main-bgr);
187 box-shadow:
188 0 0 9px -4px var(--am-c-main-text-op40),
189 0px 17px 35px -12px var(--am-c-main-text-op25);
190 border-radius: 12px;
191 padding: 32px 24px 24px;
192 margin: 0 auto;
193 font-family: var(--am-font-family);
194
195 * {
196 font-family: var(--am-font-family);
197 box-sizing: border-box;
198 }
199
200 &__top {
201 display: flex;
202 flex-direction: column;
203 align-items: center;
204 margin: 0 0 32px;
205 }
206
207 &__header {
208 font-size: 24px;
209 font-weight: 500;
210 line-height: 1.33333;
211 color: var(--am-c-main-heading-text);
212 margin: 0 0 4px;
213 }
214
215 &__text {
216 font-size: 15px;
217 font-weight: 400;
218 line-height: 1.6;
219 text-align: center;
220 color: var(--am-c-main-text-op70);
221 }
222
223 &__form {
224 .am-ff {
225 &__item {
226 &-label {
227 font-size: 15px;
228 font-weight: 500;
229 color: var(--am-c-main-text);
230 }
231 }
232 }
233
234 .el-form {
235 &-item {
236 margin-bottom: 30px;
237
238 &__label {
239 margin: 0 0 4px;
240 }
241 }
242 }
243 }
244
245 &__btn {
246 width: 100%;
247 margin: 16px 0;
248 }
249
250 &__footer {
251 display: flex;
252 align-items: center;
253 justify-content: center;
254
255 &-link {
256 font-size: 15px;
257 font-weight: 400;
258 line-height: 1.6;
259 color: var(--am-c-primary);
260 cursor: pointer;
261 }
262 }
263 }
264 }
265
266 // Admin
267 #amelia-app-backend-new {
268 @include auth;
269 }
270 </style>
271