From 4504d4e49a6c42dbc2aab30fd5bb4b310f91712b Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 30 May 2018 13:01:32 -0400 Subject: [PATCH] Moved logout to store, login still an issue --- src/layouts/default.vue | 17 ++++------------- src/pages/hello.vue | 18 ++++++++++++------ src/pages/login.vue | 8 ++++---- src/pages/success.vue | 11 ++++++----- src/pages/tag.vue | 7 ++++--- src/plugins/firebase.js | 2 ++ src/router/index.js | 2 +- src/router/routes.js | 4 ++-- src/store/index.js | 34 ++++++++++++++++++++-------------- 9 files changed, 55 insertions(+), 48 deletions(-) diff --git a/src/layouts/default.vue b/src/layouts/default.vue index fa91a37..e01ba55 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -57,8 +57,7 @@ diff --git a/src/pages/login.vue b/src/pages/login.vue index 6c7c10b..47e0e7d 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -2,7 +2,7 @@
Ashtag -
Ash trees are in danger!
+

Ash trees are in danger!

Can you help us find them all so we can stop the spread of a deadly beetle infestation?

Please login using one of your existing online identities to get started:

@@ -25,14 +25,14 @@ var credential = authResult.credential; console.log("user: " + user.displayName); this.sendToStore(user); - alert("Logging in"); + alert("Signing in"); return true; }.bind(this) // uiShown: function() { // //alert("Trying to sign in"); // } }, - signInSuccessUrl: 'http://localhost:8080/hello', + signInSuccessUrl: '/hello', signInOptions: [ this.$firebase.auth.GoogleAuthProvider.PROVIDER_ID, this.$firebase.auth.EmailAuthProvider.PROVIDER_ID @@ -43,7 +43,7 @@ }, methods: { sendToStore(user) { - this.$store.dispatch('setUser', user); //|| false) + this.$store.dispatch('setUser', user); } } } diff --git a/src/pages/success.vue b/src/pages/success.vue index e5d8987..bb92e4c 100644 --- a/src/pages/success.vue +++ b/src/pages/success.vue @@ -13,8 +13,8 @@ detail="You just got points for your tag." appear :actions="[ - { label: 'Tag Another', icon: 'alarm', handler: () => { window.history.go(-1) } }, - { label: 'Verify Photos', icon: 'done', handler: () => { window.location.replace('/#/istree') } } + { label: 'Tag Another', icon: 'alarm', handler: () => { window.location = '#/tag' } }, + { label: 'Verify Photos', icon: 'done', handler: () => { window.location = '#/hello' } } ]" class="q-mt-md" > @@ -43,12 +43,13 @@ export default { data () { return { tagPoints: this.$store.state.tagPoints, - center: { + center: this.userPosition, + /* { lat: 48.853, lng: 2.298 - }, + },*/ // userPosition: null, - zoom: 15 + zoom: 17 } }, computed: { diff --git a/src/pages/tag.vue b/src/pages/tag.vue index 7bafbab..56b7d61 100644 --- a/src/pages/tag.vue +++ b/src/pages/tag.vue @@ -1,7 +1,7 @@