diff --git a/src/App.vue b/src/App.vue index dc693f471ad9c9828c6519d81cea07c8bd5ce5ee..12ad03a6b286a47ed6a392e7338562c82b213f64 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ <script setup lang="ts"> import { RouterView } from 'vue-router' -// import ErrorBoundaryCatcher from '@/components/Exceptions/ErrorBoundaryCatcher.vue'; +import ErrorBoundaryCatcher from '@/components/Exceptions/ErrorBoundaryCatcher.vue'; </script> <template> diff --git a/src/components/Configuration/ChallangeCheckBox.vue b/src/components/Configuration/ChallangeCheckBox.vue index 529a72e5a37ea7e16e17a39dbc3625155c6cc08a..2157aa34568ad97ab1634ba44fec076463914a74 100644 --- a/src/components/Configuration/ChallangeCheckBox.vue +++ b/src/components/Configuration/ChallangeCheckBox.vue @@ -16,6 +16,12 @@ const props = defineProps({ } }) +/** + * This method is run whenever a change has occurred in the checkbox. It retrieves + * the current value of the checkbox (true/false) and emits a data object containing + * the challenge's description and the checked value. + * @param event The event object containing information about the input's checked value. + */ const onChallengeChanged = (event: any) => { const value = event.target.checked const data = [props.text, value] diff --git a/src/components/Configuration/Configuration.vue b/src/components/Configuration/Configuration.vue index 8398e677734374a3f413feebd8b6017024aab5b5..a02e631534b19c2cebcbc3cb86beaac7ee1aa804 100644 --- a/src/components/Configuration/Configuration.vue +++ b/src/components/Configuration/Configuration.vue @@ -1,5 +1,5 @@ <script setup lang="ts"> -import ProgressBar from '@/components/Configuration/ProgressBar.vue' +import ProgressBar from '@/components/Configuration/ConfigurationProgressBar.vue' import { ref } from 'vue' import { useRouter } from 'vue-router' import { useRoute } from 'vue-router' @@ -17,7 +17,7 @@ let currentRoute = useRoute() let currentPath = currentRoute.fullPath // Sets the current path to a new path and updates progressbar -const onNewRouteEvent = (path) => { +const onNewRouteEvent = (path: string) => { currentPath = path percentage.value = (1/length) * configurationSteps[path] } diff --git a/src/components/Configuration/ProgressBar.vue b/src/components/Configuration/ConfigurationProgressBar.vue similarity index 100% rename from src/components/Configuration/ProgressBar.vue rename to src/components/Configuration/ConfigurationProgressBar.vue diff --git a/src/components/Login/LoginForm.vue b/src/components/Login/LoginForm.vue index 0d2476e38bc649774937dae44c5e3a056cad885a..6091ab82d28b5c081b081370cd01996d78d327d2 100644 --- a/src/components/Login/LoginForm.vue +++ b/src/components/Login/LoginForm.vue @@ -7,6 +7,7 @@ import { AuthenticationService, OpenAPI, LoginRequest } from '@/api'; import { useRouter, useRoute } from 'vue-router'; import handleUnknownError from '@/components/Exceptions/unkownErrorHandler'; import { useErrorStore } from '@/stores/ErrorStore'; +import SignUpLink from '@/components/SignUp/SignUpLink.vue' const emailRef = ref('') const passwordRef = ref('') @@ -95,6 +96,7 @@ const handleSubmit = async () => { <p class="text-danger">{{ errorMsg }}</p> <button1 id="confirmButton" type="submit" @click="handleSubmit" button-text="Login"></button1> + <SignUpLink/> </form> </div> </template> diff --git a/src/components/Login/LoginLink.vue b/src/components/Login/LoginLink.vue new file mode 100644 index 0000000000000000000000000000000000000000..0f23a2edbeed887995e5db725c0aac37092effa6 --- /dev/null +++ b/src/components/Login/LoginLink.vue @@ -0,0 +1,11 @@ +<script setup lang="ts"> + +</script> + +<template> + <p>Already have an account? <RouterLink to="/login">Login</RouterLink></p> +</template> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/components/SignUp/SignUpForm.vue b/src/components/SignUp/SignUpForm.vue index aefb991c0520a76089b48c023c8bcfc077de9280..dad760e62b52dab00c22e31e5c63dba26ad0c0bb 100644 --- a/src/components/SignUp/SignUpForm.vue +++ b/src/components/SignUp/SignUpForm.vue @@ -6,6 +6,7 @@ import { useRouter } from 'vue-router' import { AuthenticationService } from '@/api' import handleUnknownError from '@/components/Exceptions/unkownErrorHandler' import { useUserInfoStore } from '@/stores/UserStore' +import LoginLink from '@/components/Login/LoginLink.vue' const router = useRouter(); const userStore = useUserInfoStore(); @@ -113,6 +114,7 @@ const handleSubmit = async () => { <p class="text-danger">{{ errorMsg }}</p> <p v-if="!samePasswords" class="text-danger">The passwords are not identical</p> <button1 id="confirmButton" @click="handleSubmit" button-text="Sign up"></button1> + <LoginLink/> </form> </div> diff --git a/src/components/SignUp/SignUpLink.vue b/src/components/SignUp/SignUpLink.vue new file mode 100644 index 0000000000000000000000000000000000000000..f7c354b6b9d64f7cc776d64f5336d739a95fa116 --- /dev/null +++ b/src/components/SignUp/SignUpLink.vue @@ -0,0 +1,11 @@ +<script setup lang="ts"> + +</script> + +<template> + <p>Don't have an account? <RouterLink to="/sign-up">Sign up</RouterLink></p> +</template> + +<style scoped> + +</style> \ No newline at end of file