diff --git a/src/account/AppLoginPage.vue b/src/account/AppLoginPage.vue
index 947f476..b3258d4 100644
--- a/src/account/AppLoginPage.vue
+++ b/src/account/AppLoginPage.vue
@@ -3,10 +3,9 @@
-
{{messages.link_label_account}}
+
{{messages.link_label_account}}
{{messages.link_label_bubble}}
-
@@ -32,9 +31,9 @@
created () {
linkPrefix = this.$route.path;
if (user !== null && (typeof user.token !== 'undefined' && user.token !== null)) {
- if (this.$route.path !== '' || this.$route.path !== '/'){
- if (this.$route.path === '/applogin') {
- this.$route.path = '/';
+ if (linkPrefix !== '' || linkPrefix !== '/'){
+ if (linkPrefix === '/applogin') {
+ linkPrefix = '/';
} else {
console.warn('AppLoginPage.created: route path is not empty, sending to login page');
this.$router.push('/login');
@@ -47,18 +46,18 @@
return;
}
},
- beforeRouteUpdate (to, from, next) {
- // TODO add /me verification
-
- if (user !== null && (typeof user.token !== 'undefined' && user.token !== null)) {
- next();
- } else {
- next('/login');
- }
- },
methods: {
...mapActions('account', ['checkSession', 'validateAccount']),
- ...mapActions('system', ['loadSystemConfigs', 'loadMessages'])
+ ...mapActions('system', ['loadSystemConfigs', 'loadMessages']),
+ checkMeSession () {
+ const user = util.currentUser();
+ if (user !== null && (typeof user.token !== 'undefined' && user.token !== null)) {
+ this.checkSession({messages: this.messages, errors: this.errors});
+ this.$router.push('/me');
+ } else {
+ this.$router.push('/login');
+ }
+ },
},
watch: {
user (u) {