mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
fixed homepage redirection when homepage is disabled
This commit is contained in:
@@ -48,13 +48,13 @@
|
||||
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=c7e7dc2975317062",
|
||||
"/chunks/app-server.js": "/chunks/app-server.js?id=ff66d34e90ff98a0",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=46d7fc713d36cea8",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=0dabc3156ab1336c",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=55c3e017e2a12876",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=9553d7a2912cb901",
|
||||
"/chunks/contact-us.js": "/chunks/contact-us.js?id=ea99d85aa3500595",
|
||||
"/chunks/demo.js": "/chunks/demo.js?id=355303e4230cb5ae",
|
||||
"/chunks/successfully-email-verified.js": "/chunks/successfully-email-verified.js?id=c26cb144101e7c79",
|
||||
"/chunks/successfully-email-send.js": "/chunks/successfully-email-send.js?id=170d814982e1c475",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=c648cb698176a993",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=7df09dc197730821",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=2af6073efe54c560",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=27cda9364b6593d8",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=2f0401ee2fc148c4",
|
||||
|
||||
@@ -131,6 +131,11 @@ export default {
|
||||
this.isLoaded = true
|
||||
})
|
||||
}
|
||||
|
||||
// Go to sign in page if homepage is disabled
|
||||
if (!this.$root.$data.config.allowHomepage && window.location.pathname === '/') {
|
||||
this.$router.push({ name: 'SignIn' })
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$isWindows()) {
|
||||
|
||||
2
resources/js/store/modules/fileFunctions.js
vendored
2
resources/js/store/modules/fileFunctions.js
vendored
@@ -114,7 +114,7 @@ const actions = {
|
||||
})
|
||||
.catch((error) => {
|
||||
events.$emit('alert:open', {
|
||||
title: error.response.data.message,
|
||||
title: error.response.data.message || i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
})
|
||||
|
||||
8
resources/js/store/modules/userAuth.js
vendored
8
resources/js/store/modules/userAuth.js
vendored
@@ -32,7 +32,7 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
logOut: ({ commit }) => {
|
||||
logOut: ({ commit, getters }) => {
|
||||
|
||||
let popup = setTimeout(() => {
|
||||
commit('PROCESSING_POPUP', {
|
||||
@@ -50,7 +50,11 @@ const actions = {
|
||||
commit('DESTROY_DATA')
|
||||
commit('SET_AUTHORIZED', false)
|
||||
|
||||
router.push({name: 'Homepage'})
|
||||
// Get redirect location
|
||||
let redirectLocation = getters.config.allowHomepage ? 'Homepage' : 'SignIn'
|
||||
|
||||
// Redirect user
|
||||
router.push({name: redirectLocation})
|
||||
})
|
||||
},
|
||||
socialiteRedirect: ({ commit }, provider) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<AuthContentWrapper ref="auth" class="h-screen">
|
||||
<AuthContentWrapper v-if="isVisible" ref="auth" class="h-screen">
|
||||
<!--Log In by Email-->
|
||||
<AuthContent name="log-in" :visible="true">
|
||||
<Headline :title="$t('welcome_back')" :description="$t('page_login.subtitle')" />
|
||||
@@ -256,6 +256,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
isLoading: false,
|
||||
validSignIn: false,
|
||||
checkedAccount: undefined,
|
||||
@@ -443,14 +444,20 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$scrollTop()
|
||||
this.$store.commit('PROCESSING_POPUP', undefined)
|
||||
|
||||
mounted() {
|
||||
// Redirect if user is authenticated
|
||||
if (this.$root.$data.config.isAuthenticated) {
|
||||
this.$router.push({name: 'Files'})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// Show the page when user is not authenticated
|
||||
if (! this.$root.$data.config.isAuthenticated) {
|
||||
this.isVisible = true
|
||||
}
|
||||
|
||||
this.$scrollTop()
|
||||
this.$store.commit('PROCESSING_POPUP', undefined)
|
||||
|
||||
if (this.config.isDemo || this.config.isDev) {
|
||||
this.loginEmail = 'howdy@hi5ve.digital'
|
||||
|
||||
@@ -64,8 +64,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (!this.config.allowHomepage) this.$router.push({ name: 'SignIn' })
|
||||
|
||||
// Get page content
|
||||
axios
|
||||
.get('/api/settings', {
|
||||
|
||||
Reference in New Issue
Block a user