File tree Expand file tree Collapse file tree 4 files changed +8
-55
lines changed Expand file tree Collapse file tree 4 files changed +8
-55
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<v-app >
3
- <<<<<<< HEAD
4
- =======
5
- <v-toolbar dark color =" cyan darken-1" v-show =" isLoggedIn" >
6
- <v-toolbar-side-icon ></v-toolbar-side-icon >
7
- <v-toolbar-title class =" white--text" >{{title}}</v-toolbar-title >
8
- <v-spacer ></v-spacer >
9
- <v-btn to =" /dashboard" outline >
10
- <v-icon >person_add</v-icon >
11
- Dashboard
12
- </v-btn >
13
- <v-btn to =" /add" outline >
14
- <v-icon >person_add</v-icon >
15
- Add Guest
16
- </v-btn >
17
- <v-btn flat @click =" logout" >
18
- <v-icon >exit_to_app</v-icon >
19
- </v-btn >
20
- </v-toolbar >
21
- >>>>>>> feb45de64ec349a35717bf212a5be4b5b648b2ab
22
3
<v-content >
23
4
<navbar />
24
5
<v-container fluid fill-height >
39
20
<script >
40
21
import Navbar from ' ./components/navbar' ;
41
22
export default {
42
- <<<<<< < HEAD
43
23
components: {
44
24
Navbar
45
25
}
46
- ====== =
47
- data (){
48
- return {
49
- title: " BlakCoder's Guestbook" ,
50
- isLoggedIn: false ,
51
- currentUser: ' ' ,
52
- }
53
- },
54
- methods: {
55
- logout (e ){
56
- firebase .auth ().signOut ()
57
- .then (() => {
58
- this .$router .push (' /' );
59
- this .isLoggedIn = false ;
60
- this .currentUser = false ;
61
- });
62
- },
63
-
64
- },
65
- created () {
66
- if (firebase .auth ().currentUser ){
67
- this .isLoggedIn = true ;
68
- this .currentUser = firebase .auth ().currentUser .email ;
69
- }
70
- },
71
- >>>>>> > feb45de64ec349a35717bf212a5be4b5b648b2ab
72
26
}
73
27
</script >
74
28
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ data() {
106
106
this .newGuest .lat = ' ' ;
107
107
this .newGuest .long = ' ' ;
108
108
console .log (ref);
109
- this .$router .push ( ' dashboard ' );
109
+ this .$router .go ({path : this . $router . path } );
110
110
}).catch (err => {
111
111
console .log (err);
112
112
})
Original file line number Diff line number Diff line change 23
23
label =" Password"
24
24
v-model =" user.password"
25
25
type =" password"
26
- :rules =" [rules.required, rules.min]" ></v-text-field >
26
+ :rules =" [rules.required, rules.min]"
27
+ @keyup.enter =" login" ></v-text-field >
27
28
</v-form >
28
29
</v-card-text >
29
30
<v-card-actions >
@@ -61,10 +62,11 @@ export default {
61
62
methods: {
62
63
63
64
login (e ){
64
- if (this .$refs .form .validate ()){
65
+
66
+ if (this .$refs .form .validate ()){
65
67
firebase .auth ().signInWithEmailAndPassword (this .user .email , this .user .password )
66
68
.then (user => {
67
- this .$emit (' loginStatus' , true );
69
+ // this.$emit('loginStatus', true);
68
70
// this.$router.push('/');//re-rendering th path
69
71
this .$router .go ({path: this .$router .path });
70
72
}),
@@ -81,7 +83,3 @@ export default {
81
83
}
82
84
</script >
83
85
84
-
85
- <style >
86
-
87
- </style >
Original file line number Diff line number Diff line change 29
29
name =" cpassword"
30
30
label =" Confirm Password"
31
31
type =" password"
32
- :rules =" passwordConfirmationRules" ></v-text-field >
32
+ :rules =" passwordConfirmationRules"
33
+ @keyup.enter =" register" ></v-text-field >
33
34
</v-form >
34
35
</v-card-text >
35
36
<v-card-actions >
You can’t perform that action at this time.
0 commit comments