mirror of
https://github.com/filegator/filegator.git
synced 2025-08-12 08:04:13 +02:00
catch NavigationDuplicated errors
This commit is contained in:
@@ -45,7 +45,7 @@ new Vue({
|
||||
.then((user) => {
|
||||
this.$store.commit('initialize')
|
||||
this.$store.commit('setUser', user)
|
||||
this.$router.push('/')
|
||||
this.$router.push('/').catch(() => {})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$notification.open({
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="!$store.state.config.guest_redirection">
|
||||
<a v-if="can('read')" id="back-arrow" @click="$router.push('/')">
|
||||
<a v-if="can('read')" id="back-arrow" @click="$router.push('/').catch(() => {})">
|
||||
<b-icon icon="times" />
|
||||
</a>
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
this.$store.commit('setUser', user)
|
||||
api.changeDir({
|
||||
to: '/'
|
||||
}).then(() => this.$router.push('/'))
|
||||
}).then(() => this.$router.push('/').catch(() => {}))
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.response && error.response.data) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<nav class="navbar" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item logo" @click="$router.push('/')">
|
||||
<a class="navbar-item logo" @click="$router.push('/').catch(() => {})">
|
||||
<img :src="this.$store.state.config.logo">
|
||||
</a>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
<div :class="[navbarActive ? 'is-active' : '', 'navbar-menu']">
|
||||
<div class="navbar-end">
|
||||
<a v-if="is('admin')" class="navbar-item files" @click="$router.push('/')">
|
||||
<a v-if="is('admin')" class="navbar-item files" @click="$router.push('/').catch(() => {})">
|
||||
{{ lang('Files') }}
|
||||
</a>
|
||||
<a v-if="is('admin')" class="navbar-item users" @click="$router.push('/users')">
|
||||
<a v-if="is('admin')" class="navbar-item users" @click="$router.push('/users').catch(() => {})">
|
||||
{{ lang('Users') }}
|
||||
</a>
|
||||
<a v-if="is('guest')" class="navbar-item login" @click="login">
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
api.getUser()
|
||||
.then(user => {
|
||||
this.$store.commit('setUser', user)
|
||||
this.$router.push('/')
|
||||
this.$router.push('/').catch(() => {})
|
||||
})
|
||||
.catch(() => {
|
||||
this.$store.commit('initialize')
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
})
|
||||
},
|
||||
login() {
|
||||
this.$router.push('/login')
|
||||
this.$router.push('/login').catch(() => {})
|
||||
},
|
||||
profile() {
|
||||
this.$modal.open({
|
||||
|
Reference in New Issue
Block a user