mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-21 09:12:14 +00:00
team folder browsing with static team folder details
This commit is contained in:
29
resources/js/store/modules/fileBrowser.js
vendored
29
resources/js/store/modules/fileBrowser.js
vendored
@@ -46,35 +46,6 @@ const actions = {
|
||||
}
|
||||
})
|
||||
},
|
||||
getTeamFolder: ({commit, getters}, id) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
|
||||
axios
|
||||
.get(`${getters.api}/teams/folders/${id}/${getters.sorting.URI}`)
|
||||
.then(response => {
|
||||
commit('LOADING_STATE', {loading: false, data: response.data.folders.data})
|
||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
||||
|
||||
events.$emit('scrollTop')
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
// Redirect if unauthenticated
|
||||
if ([401, 403].includes(error.response.status)) {
|
||||
|
||||
commit('SET_AUTHORIZED', false)
|
||||
router.push({name: 'SignIn'})
|
||||
|
||||
} else {
|
||||
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: i18n.t('popup_error.title'),
|
||||
message: i18n.t('popup_error.message'),
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getRecentUploads: ({commit, getters}) => {
|
||||
commit('LOADING_STATE', {loading: true, data: []})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user