Skip to content
Snippets Groups Projects
Commit b9f99aca authored by Jens Christian Aanestad's avatar Jens Christian Aanestad
Browse files

feat/created new sign up component

parent 07e61fff
Branches feat/SignUp
No related tags found
2 merge requests!9Feat/login,!6feat/created new sign up component
Pipeline #273517 failed
...@@ -10,11 +10,11 @@ const handleSubmit = () => { ...@@ -10,11 +10,11 @@ const handleSubmit = () => {
<template> <template>
<div class="container-fluid"> <div class="container-fluid">
<form id="loginForm" @submit.prevent="handleSubmit"> <form id="loginForm" @submit.prevent="handleSubmit">
<BaseInput id="usernameInput" <BaseInput id="emailInput"
input-id="username" input-id="email"
type="text" type="text"
label="Username" label="Email"
placeholder="Enter username"/> placeholder="Enter your email"/>
<BaseInput id="passwordInput" <BaseInput id="passwordInput"
input-id="password" input-id="password"
type="password" type="password"
...@@ -27,24 +27,16 @@ const handleSubmit = () => { ...@@ -27,24 +27,16 @@ const handleSubmit = () => {
<style scoped> <style scoped>
.container-fluid { .container-fluid {
height: 91vh; max-width: 450px;
display: grid;
justify-items: center;
align-items: center;
}
#usernameInput, #passwordInput, #confirmButton {
margin: 15px 0;
}
#confirmButton {
justify-content: center;
} }
#loginForm { #loginForm {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-width: 280px; justify-items: center;
width: 40%; }
#emailInput, #passwordInput, #confirmButton {
margin: 1rem 0;
} }
</style> </style>
\ No newline at end of file
<script setup lang="ts">
import SignUpForm from '@/components/SignUp/SignUpForm.vue'
</script>
<template>
<SignUpForm/>
</template>
<style scoped>
</style>
\ No newline at end of file
<script setup lang="ts">
import BaseInput from '@/components/InputFields/BaseInput.vue'
import Button1 from '@/components/Buttons/Button1.vue'
const handleSubmit = () => {
alert("Expected to be transferred to initial configuration") // Todo remove this line
}
</script>
<template>
<div class="container">
<form id="signUpForm" @submit.prevent="handleSubmit">
<BaseInput id="firstNameInput"
input-id="first-name"
type="text"
label="First name"
placeholder="Enter your first name"/>
<BaseInput id="surnameInput"
input-id="surname"
type="text"
label="Surname"
placeholder="Enter your surname"/>
<BaseInput id="emailInput"
input-id="email"
type="text"
label="Email"
placeholder="Enter your email"/>
<BaseInput id="passwordInput"
input-id="password"
type="password"
label="Password"
placeholder="Enter password"/>
<BaseInput id="confirmPasswordInput"
input-id="confirmPassword"
type="password"
label="Confirm Password"
placeholder="Confirm password"/>
<button1 id="confirmButton" @click="handleSubmit" button-text="Sign up"></button1>
</form>
</div>
</template>
<style scoped>
.container {
max-width: 450px;
}
#signUpForm {
display: flex;
flex-direction: column;
justify-items: center;
}
#firstNameInput, #surnameInput, #emailInput, #passwordInput, #confirmButton, #confirmPasswordInput {
margin: 1rem 0;
}
</style>
\ No newline at end of file
// Import necessary dependencies from Vue Router and your views // Import necessary dependencies from Vue Router and your views
import { createRouter, createWebHistory } from 'vue-router'; import { createRouter, createWebHistory } from 'vue-router';
import LoginView from '../views/Authentication/LoginView.vue'; import LoginView from '../views/Authentication/LoginView.vue';
import SignUp from '@/components/SignUp/SignUp.vue'
const routes = [ const routes = [
{ {
...@@ -36,6 +37,11 @@ const routes = [ ...@@ -36,6 +37,11 @@ const routes = [
name: 'login', name: 'login',
component: LoginView, component: LoginView,
}, },
{
path: '/sign-up',
name: 'sign up',
component: () => import('@/views/Authentication/SignUpView.vue'),
},
{ {
path: '/:pathMatch(.*)*', path: '/:pathMatch(.*)*',
redirect: { name: 'not-found' }, redirect: { name: 'not-found' },
......
<script setup lang="ts">
import Footer from '@/components/BaseComponents/Footer.vue'
import Menu from '@/components/BaseComponents/Menu.vue'
import SignUp from '@/components/SignUp/SignUp.vue'
</script>
<template>
<Menu/>
<SignUp/>
<Footer/>
</template>
<style scoped>
</style>
\ No newline at end of file
...@@ -3,5 +3,7 @@ ...@@ -3,5 +3,7 @@
</script> </script>
<template> <template>
<RouterLink to="login">Login</RouterLink> <RouterLink to="login">Login</RouterLink>
<br/>
<RouterLink to="sign-up">Sign up</RouterLink>
</template> </template>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment