login redirects now carry over to the register page

This commit is contained in:
Thaum Rystra
2020-05-15 15:16:59 +02:00
parent cf110db67d
commit 41b05064c8
3 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,6 @@
</template> </template>
<script> <script>
import router from '/imports/ui/router.js';
export default{ export default{
data() { data() {
return { return {
@@ -116,7 +115,7 @@
if (error){ if (error){
this.error = error.reason; this.error = error.reason;
} else { } else {
router.push('characterList'); this.$router.push(this.$route.query.redirect || 'characterList');
} }
}); });
} }

View File

@@ -45,7 +45,7 @@
</v-btn> </v-btn>
<v-btn <v-btn
color="accent" color="accent"
to="/register" :to="{ name: 'register', query: { redirect: this.$route.query.redirect} }"
> >
Register Register
</v-btn> </v-btn>

View File

@@ -180,6 +180,7 @@ RouterFactory.configure(factory => {
title: 'Sign In', title: 'Sign In',
}, },
},{ },{
name: 'register',
path: '/register', path: '/register',
components: { components: {
default: Register, default: Register,