Add login modal experience (#16)

This commit is contained in:
AceDataCloud committed 2024-01-03 01:12:47 +08:00
1 parent d536508293
commit ccae7257e5
11 files changed
+95 -20

No files matched your search

+2 -2
View File
@@ -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');
}
}
});
+1 -2
View File
@@ -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: {