mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
chore: cleanup route check
This commit is contained in:
parent
f845c0a802
commit
a5e2b4a31f
1 changed files with 4 additions and 4 deletions
|
@ -29,6 +29,9 @@ export default {
|
|||
...mapGetters(['getAuthenticated']),
|
||||
isAuthenticated() {
|
||||
return this.getAuthenticated()
|
||||
},
|
||||
onLoginPage() {
|
||||
return this.$router.currentRoute.name.includes('login')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -42,10 +45,7 @@ export default {
|
|||
const authenticated = res === 'Ok.'
|
||||
this.$store.commit('LOGIN', authenticated)
|
||||
this.$store.commit('updateMainData')
|
||||
if (
|
||||
!authenticated &&
|
||||
!this.$router.currentRoute.name.includes('login')
|
||||
) this.$router.push('login')
|
||||
if (!authenticated && !this.onLoginPage) return this.$router.push('login')
|
||||
},
|
||||
checkDeviceDarkTheme() {
|
||||
if (this.webuiSettings.useDeviceDarkMode) {
|
||||
|
|
Loading…
Reference in a new issue