Skip to content

Commit

Permalink
A Signup View & Form
Browse files Browse the repository at this point in the history
  • Loading branch information
h4yfans committed Sep 23, 2017
1 parent f5b2139 commit 5a3eb7d
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"lint": "eslint --ext .js,.vue src"
},
"dependencies": {
"firebase": "^4.4.0",
"vue": "^2.4.2",
"vue-router": "^2.7.0",
"vuetify": "^0.15.1",
Expand Down
80 changes: 76 additions & 4 deletions src/components/User/Signup.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
<template>
<div>
<p>The Sign up Page</p>
</div>
</template>
<v-container>
<v-layout row>
<v-flex x12 sm6 offset-sm3>
<v-card>
<v-card-text>
<v-container>
<form>
<v-layout row>
<v-flex xs12>
<v-text-field
name="email"
label="Mail"
id="email"
v-model="email"
type="email"
required></v-text-field>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-text-field
name="password"
label="Password"
id="password"
v-model="password"
type="password"
required></v-text-field>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-text-field
name="confirmPassword"
label="Confirm Password"
id="confirmPassword"
v-model="confirmPassword"
type="password"
:rules="[comparePasswords]"></v-text-field>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-btn type="submit">Sign up</v-btn>
</v-flex>
</v-layout>
</form>
</v-container>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-container>
</template>

<script>
export default {
data () {
return {
email: '',
password: '',
confirmPassword: ''
}
},
computed: {
comparePasswords () {
return this.password !== this.confirmPassword ? 'Password do not match' : ''
}
},
methods: {
onSignup () {
// Vuex
console.log({email: this.email, password: this.password, confirmPassword: this.confirmPassword})
}
}
}
</script>
12 changes: 11 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Vue from 'vue'
import Vuetify from 'vuetify'
import './stylus/main.styl'
import App from './App'
import * as firebase from 'firebase'
import router from './router'
import {store} from './store'
import DateFilter from './filters/date'
Expand All @@ -19,5 +20,14 @@ new Vue({
router,
store,
template: '<App/>',
components: {App}
components: {App},
created () {
firebase.initializeApp({
apiKey: 'AIzaSyBjoaHdhc9MScDKHn8dYe13b4wQLpCPnOg',
authDomain: 'meetup-vue-h4yfans.firebaseapp.com',
databaseURL: 'https://meetup-vue-h4yfans.firebaseio.com',
projectId: 'meetup-vue-h4yfans',
storageBucket: 'meetup-vue-h4yfans.appspot.com'
})
}
})

0 comments on commit 5a3eb7d

Please sign in to comment.