Merge branch 'feature/form-max-with'

This commit is contained in:
Hubert Van De Walle 2020-04-13 19:47:16 +02:00
commit 60b2774540
3 changed files with 30 additions and 8 deletions

View File

@ -0,0 +1,13 @@
<template>
<div class="row d-flex justify-content-center">
<div class="mt-3 col-md-6">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: "Centered"
}
</script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <Centered>
<b-card class="mt-3" header="Sign in"> <b-card header="Sign in">
<b-form @submit.prevent="signin"> <b-form @submit.prevent="signin">
<b-form-group id="username-group" label="Username:" label-for="username"> <b-form-group id="username-group" label="Username:" label-for="username">
@ -33,15 +33,19 @@
</b-alert> </b-alert>
</b-card> </b-card>
</div> </Centered>
</template> </template>
<script> <script>
import Api from '@/api' import Api from '@/api'
import {mapMutations} from "vuex"; import {mapMutations} from "vuex";
import Centered from '@/components/Centered'
export default { export default {
name: "SignupForm", name: "SignupForm",
components: {
Centered
},
data() { data() {
return { return {
form: { form: {

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <Centered>
<b-card class="mt-3" header="Create an account"> <b-card header="Create an account">
<b-form @submit.prevent="handleSubmit"> <b-form @submit.prevent="handleSubmit">
<b-form-group <b-form-group
id="email-group" id="email-group"
@ -44,7 +44,8 @@
</b-form-invalid-feedback> </b-form-invalid-feedback>
</b-form-group> </b-form-group>
<b-form-group id="password-confirm-group" label="Confirm password:" label-for="password-confirm"> <b-form-group id="password-confirm-group" label="Confirm password:"
label-for="password-confirm">
<b-form-input <b-form-input
id="password-confirm" id="password-confirm"
v-model="form.passwordConfirm" v-model="form.passwordConfirm"
@ -67,16 +68,20 @@
<b-alert :show="error" variant="danger" dismissible class="mt-3"> <b-alert :show="error" variant="danger" dismissible class="mt-3">
An error occurred while attempting to create your account An error occurred while attempting to create your account
</b-alert> </b-alert>
</b-card> </b-card>
</div> </Centered>
</template> </template>
<script> <script>
import Api from '@/api' import Api from '@/api'
import Centered from '@/components/Centered'
export default { export default {
name: "SignupForm", name: "SignupForm",
components: {
Centered
},
data() { data() {
return { return {
form: { form: {