Skip to content

Commit d1c02c6

Browse files
committed
it clear
1 parent 7f574be commit d1c02c6

File tree

4 files changed

+8
-55
lines changed

4 files changed

+8
-55
lines changed

src/App.vue

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
<template>
22
<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
223
<v-content >
234
<navbar/>
245
<v-container fluid fill-height >
@@ -39,36 +20,9 @@
3920
<script>
4021
import Navbar from './components/navbar';
4122
export default {
42-
<<<<<<< HEAD
4323
components: {
4424
Navbar
4525
}
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
7226
}
7327
</script>
7428

src/components/add.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ data() {
106106
this.newGuest.lat = '';
107107
this.newGuest.long = '';
108108
console.log(ref);
109-
this.$router.push('dashboard');
109+
this.$router.go({path: this.$router.path});
110110
}).catch(err => {
111111
console.log(err);
112112
})

src/components/login.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
label="Password"
2424
v-model="user.password"
2525
type="password"
26-
:rules="[rules.required, rules.min]"></v-text-field>
26+
:rules="[rules.required, rules.min]"
27+
@keyup.enter="login"></v-text-field>
2728
</v-form>
2829
</v-card-text>
2930
<v-card-actions>
@@ -61,10 +62,11 @@ export default {
6162
methods:{
6263
6364
login (e){
64-
if (this.$refs.form.validate()){
65+
66+
if (this.$refs.form.validate()){
6567
firebase.auth().signInWithEmailAndPassword(this.user.email, this.user.password)
6668
.then(user =>{
67-
this.$emit('loginStatus', true);
69+
//this.$emit('loginStatus', true);
6870
//this.$router.push('/');//re-rendering th path
6971
this.$router.go({path: this.$router.path});
7072
}),
@@ -81,7 +83,3 @@ export default {
8183
}
8284
</script>
8385

84-
85-
<style>
86-
87-
</style>

src/components/register.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
name="cpassword"
3030
label="Confirm Password"
3131
type="password"
32-
:rules="passwordConfirmationRules"></v-text-field>
32+
:rules="passwordConfirmationRules"
33+
@keyup.enter="register"></v-text-field>
3334
</v-form>
3435
</v-card-text>
3536
<v-card-actions>

0 commit comments

Comments
 (0)