Commit 30a22bf0 authored by Janis Streib's avatar Janis Streib 🦉
Browse files

FIX: login behaviour (fixes #270)

parent bcc748e5
Pipeline #144473 passed with stages
in 5 minutes and 59 seconds
......@@ -111,9 +111,6 @@ export default {
self.global_error = JSON.stringify(self.global_error, null, 4)
this.$bvModal.show('net-suite-error')
})
if (!this.$store.state.user) {
this.$router.push('/login')
}
window.console.debug('Path' + window.location.pathname)
this.ready = window.location.pathname === '/' || window.location.pathname.trim() === '' || this.$route.path === '/'
}
......
......@@ -17,6 +17,9 @@ export default {
if (this.$store.state.token && this.$store.state.spec_ready) {
this.$router.push('/dnsvs/bcds')
}
if (!this.$store.state.user) {
this.$router.push('/login')
}
}
}
</script>
......@@ -67,7 +67,7 @@
</b-row>
<b-row class="continue-watching-title">
<b-col offset-md="1">
<h4>Mit dem Profil von {{ $store.state.user.login_name }} weiterschauen</h4>
<h4 v-if="$store.state.user">Mit dem Profil von {{ $store.state.user.login_name }} weiterschauen</h4>
<div class="container-fluid pl-0">
<b-row class="movie-suggestions flex-row flex-nowrap p-2">
<b-col v-for="thumbnail in thumbnails" :key="thumbnail" class="movie-suggestion">
......@@ -131,6 +131,11 @@ export default {
created() {
this.shuffle_list(this.thumbnails)
},
mounted() {
if (!this.$store.state.user) {
this.$router.push('/login')
}
},
data() {
return {
abstracts: [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment