| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <div> | 
					
						
							| 
									
										
										
										
											2025-09-09 19:21:58 +02:00
										 |  |  |     <v-card-title class="pt-0"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <v-icon | 
					
						
							|  |  |  |         size="large" | 
					
						
							|  |  |  |         class="mr-3" | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |         {{ $globals.icons.user }} | 
					
						
							|  |  |  |       </v-icon> | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |       <span class="headline"> {{ $t("user-registration.account-details") }}</span> | 
					
						
							|  |  |  |     </v-card-title> | 
					
						
							|  |  |  |     <v-divider /> | 
					
						
							| 
									
										
										
										
											2025-09-09 19:21:58 +02:00
										 |  |  |     <v-card-text class="mt-2"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <v-form | 
					
						
							|  |  |  |         ref="domAccountForm" | 
					
						
							|  |  |  |         @submit.prevent | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |         <v-text-field | 
					
						
							|  |  |  |           v-model="accountDetails.username.value" | 
					
						
							|  |  |  |           autofocus | 
					
						
							|  |  |  |           v-bind="inputAttrs" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :label="$t('user.username')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :prepend-icon="$globals.icons.user" | 
					
						
							|  |  |  |           :rules="[validators.required]" | 
					
						
							|  |  |  |           :error-messages="usernameErrorMessages" | 
					
						
							|  |  |  |           @blur="validateUsername" | 
					
						
							|  |  |  |         /> | 
					
						
							|  |  |  |         <v-text-field | 
					
						
							|  |  |  |           v-model="accountDetails.fullName.value" | 
					
						
							|  |  |  |           v-bind="inputAttrs" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :label="$t('user.full-name')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :prepend-icon="$globals.icons.user" | 
					
						
							|  |  |  |           :rules="[validators.required]" | 
					
						
							|  |  |  |         /> | 
					
						
							|  |  |  |         <v-text-field | 
					
						
							|  |  |  |           v-model="accountDetails.email.value" | 
					
						
							|  |  |  |           v-bind="inputAttrs" | 
					
						
							|  |  |  |           :prepend-icon="$globals.icons.email" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :label="$t('user.email')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :rules="[validators.required, validators.email]" | 
					
						
							|  |  |  |           :error-messages="emailErrorMessages" | 
					
						
							|  |  |  |           @blur="validateEmail" | 
					
						
							|  |  |  |         /> | 
					
						
							|  |  |  |         <v-text-field | 
					
						
							|  |  |  |           v-model="credentials.password1.value" | 
					
						
							|  |  |  |           v-bind="inputAttrs" | 
					
						
							|  |  |  |           :type="pwFields.inputType.value" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :append-inner-icon="pwFields.passwordIcon.value" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :prepend-icon="$globals.icons.lock" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :label="$t('user.password')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :rules="[validators.required, validators.minLength(8), validators.maxLength(258)]" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           @click:append-inner="pwFields.togglePasswordShow" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |         /> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 18:39:08 +02:00
										 |  |  |         <UserPasswordStrength v-model="credentials.password1.value" /> | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |         <v-text-field | 
					
						
							|  |  |  |           v-model="credentials.password2.value" | 
					
						
							|  |  |  |           v-bind="inputAttrs" | 
					
						
							|  |  |  |           :type="pwFields.inputType.value" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :append-inner-icon="pwFields.passwordIcon.value" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :prepend-icon="$globals.icons.lock" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           :label="$t('user.confirm-password')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           :rules="[validators.required, credentials.passwordMatch]" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           @click:append-inner="pwFields.togglePasswordShow" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |         /> | 
					
						
							|  |  |  |         <div class="px-2"> | 
					
						
							|  |  |  |           <v-checkbox | 
					
						
							|  |  |  |             v-model="accountDetails.advancedOptions.value" | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             :label="$t('user.enable-advanced-content')" | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           /> | 
					
						
							|  |  |  |           <p class="text-caption mt-n4"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |             {{ $t("user.enable-advanced-content-description") }} | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |           </p> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </v-form> | 
					
						
							|  |  |  |     </v-card-text> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							|  |  |  | import { useDark } from "@vueuse/core"; | 
					
						
							|  |  |  | import { validators } from "~/composables/use-validators"; | 
					
						
							|  |  |  | import { useUserRegistrationForm } from "~/composables/use-users/user-registration-form"; | 
					
						
							|  |  |  | import { usePasswordField } from "~/composables/use-passwords"; | 
					
						
							|  |  |  | import UserPasswordStrength from "~/components/Domain/User/UserPasswordStrength.vue"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const inputAttrs = { | 
					
						
							|  |  |  |   validateOnBlur: true, | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |   class: "pb-1", | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   variant: "solo-filled" as any, | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | export default defineNuxtComponent({ | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |   components: { UserPasswordStrength }, | 
					
						
							|  |  |  |   setup() { | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |     definePageMeta({ | 
					
						
							|  |  |  |       layout: "blank", | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-11 08:28:54 -05:00
										 |  |  |     const isDark = useDark(); | 
					
						
							|  |  |  |     const langDialog = ref(false); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const pwFields = usePasswordField(); | 
					
						
							|  |  |  |     const { | 
					
						
							|  |  |  |       accountDetails, | 
					
						
							|  |  |  |       credentials, | 
					
						
							|  |  |  |       emailErrorMessages, | 
					
						
							|  |  |  |       usernameErrorMessages, | 
					
						
							|  |  |  |       validateUsername, | 
					
						
							|  |  |  |       validateEmail, | 
					
						
							|  |  |  |       domAccountForm, | 
					
						
							|  |  |  |     } = useUserRegistrationForm(); | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       accountDetails, | 
					
						
							|  |  |  |       credentials, | 
					
						
							|  |  |  |       emailErrorMessages, | 
					
						
							|  |  |  |       inputAttrs, | 
					
						
							|  |  |  |       isDark, | 
					
						
							|  |  |  |       langDialog, | 
					
						
							|  |  |  |       pwFields, | 
					
						
							|  |  |  |       usernameErrorMessages, | 
					
						
							|  |  |  |       validators, | 
					
						
							|  |  |  |       // Validators
 | 
					
						
							|  |  |  |       validateUsername, | 
					
						
							|  |  |  |       validateEmail, | 
					
						
							|  |  |  |       // Dom Refs
 | 
					
						
							|  |  |  |       domAccountForm, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <style lang="css" scoped> | 
					
						
							|  |  |  | .icon-primary { | 
					
						
							|  |  |  |   fill: var(--v-primary-base); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .icon-white { | 
					
						
							|  |  |  |   fill: white; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .icon-container { | 
					
						
							|  |  |  |   display: flex; | 
					
						
							|  |  |  |   flex-direction: column; | 
					
						
							|  |  |  |   align-items: center; | 
					
						
							|  |  |  |   width: 100%; | 
					
						
							|  |  |  |   position: relative; | 
					
						
							|  |  |  |   margin-top: 2.5rem; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .icon-divider { | 
					
						
							|  |  |  |   width: 100%; | 
					
						
							|  |  |  |   margin-bottom: -2.5rem; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .icon-avatar { | 
					
						
							|  |  |  |   border-color: rgba(0, 0, 0, 0.12); | 
					
						
							|  |  |  |   border: 2px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .bg-off-white { | 
					
						
							|  |  |  |   background: #f5f8fa; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .preferred-width { | 
					
						
							|  |  |  |   width: 840px; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | </style> |