MT#60578 Navigates to /dashboard on refresh

Change-Id: I10ff7d9b7354cd7385e40a20337c9e21d1c6c769
mr13.0
Hugo Zigha 10 months ago
parent f5cf354cf0
commit faf449953b

@ -26,7 +26,6 @@ export default {
async mounted () { async mounted () {
this.$initWait() this.$initWait()
this.updateTitle(this.$route) this.updateTitle(this.$route)
await this.$router.push({ name: 'dashboard' })
}, },
methods: { methods: {
updateTitle: function (route) { updateTitle: function (route) {

@ -54,7 +54,5 @@ export default ({ app, router, store }) => {
subscriberId: getSubscriberId() subscriberId: getSubscriberId()
}) })
} }
store.$router = router
Dark.set(true) Dark.set(true)
} }

@ -536,9 +536,6 @@ export default {
}) })
} }
window.scrollTo(0, 0) window.scrollTo(0, 0)
if (route.path === '/user/dashboard') {
this.forwardHome()
}
} }
}, },
async mounted () { async mounted () {
@ -553,7 +550,6 @@ export default {
}, },
methods: { methods: {
...mapActions('user', [ ...mapActions('user', [
'forwardHome',
'fetchAuthToken' 'fetchAuthToken'
]), ]),
...mapActions('call', [ ...mapActions('call', [

@ -560,7 +560,7 @@ const routes = [
{ {
path: '/', path: '/',
redirect: { redirect: {
name: 'root' name: 'dashboard'
} }
}, },
{ {

@ -362,13 +362,10 @@ export default {
console.log(err) console.log(err)
} }
} }
await context.dispatch('forwardHome')
} catch (err) { } catch (err) {
console.debug(err) console.debug(err)
await context.dispatch('logout') await context.dispatch('logout')
} }
} else {
await context.dispatch('forwardHome')
} }
}, },
async changePassword (context, newPassword) { async changePassword (context, newPassword) {
@ -400,12 +397,6 @@ export default {
commit('userPasswordFailed', err.message) commit('userPasswordFailed', err.message)
} }
}, },
async forwardHome (context) {
const start = '/user/dashboard'
if (context.rootState.route?.path !== start) {
await this.$router.push({ name: 'root' })
}
},
async getCustomLogo (context) { async getCustomLogo (context) {
if (!context.state.logo) { if (!context.state.logo) {
context.commit('updateLogoRequestState', true) context.commit('updateLogoRequestState', true)

Loading…
Cancel
Save