Add login modal experience (#16)
This commit is contained in:
1 parent
d536508293
commit
ccae7257e5
11 files changed
+95
-20
No files matched your search
@@ -30,7 +30,7 @@ export default defineComponent({
|
||||
this.accessToken = data.access;
|
||||
this.refreshToken = data.refresh;
|
||||
} else {
|
||||
this.$router.push({ name: ROUTE_AUTH_LOGIN });
|
||||
this.$store.dispatch('resetToken');
|
||||
return;
|
||||
}
|
||||
// if token acquired, get user info
|
||||
@@ -41,7 +41,7 @@ export default defineComponent({
|
||||
await this.$router.push(this.redirect);
|
||||
}
|
||||
} else {
|
||||
await this.$router.push({ name: ROUTE_AUTH_LOGIN });
|
||||
this.$store.dispatch('resetToken');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -250,8 +250,7 @@ export default defineComponent({
|
||||
},
|
||||
distributionLink() {
|
||||
const origin = window.location.origin;
|
||||
const newOrigin = origin.replace('hub.', 'auth.');
|
||||
return `${newOrigin}/auth/login?inviter_id=${this.$store.getters.user.id}&redirect=${origin}`;
|
||||
return `${origin}?inviter_id=${this.$store.getters.user.id}`;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in new issue
Block a user