mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 08:52:15 +00:00
refactor getDataByLocation helper, fix moveItem popup from File info panel
This commit is contained in:
31
resources/js/helpers.js
vendored
31
resources/js/helpers.js
vendored
@@ -308,27 +308,20 @@ const Helpers = {
|
||||
return validated
|
||||
}
|
||||
Vue.prototype.$getDataByLocation = function() {
|
||||
|
||||
let folder = store.getters.currentFolder
|
||||
|
||||
let actions = {
|
||||
'base' : ['getFolder', [{ folder: folder, back: true, init: false, sorting:true}]],
|
||||
'public' : ['browseShared', [{ folder: folder, back: true, init: false, sorting:true}]],
|
||||
'latest' : ['getLatest'],
|
||||
'shared' : ['getShared'],
|
||||
'trash-root' : ['getTrash'],
|
||||
'participant_uploads' : ['getParticipantUploads'],
|
||||
}
|
||||
|
||||
this.$store.dispatch(...actions[folder.location])
|
||||
|
||||
if(this.$isThisLocation('base') || this.$isThisLocation('public')){
|
||||
this.$store.dispatch('getFolder', [{ folder: folder, back: true, init: false, sorting:true}])
|
||||
}
|
||||
|
||||
if(this.$isThisLocation('latest')) {
|
||||
this.$store.dispatch('getLatest')
|
||||
}
|
||||
|
||||
if(this.$isThisLocation('shared')) {
|
||||
this.$store.dispatch('getShared')
|
||||
}
|
||||
|
||||
if(this.$isThisLocation('participant_uploads')) {
|
||||
this.$store.dispatch('getParticipantUploads')
|
||||
}
|
||||
|
||||
if(this.$isThisLocation('trash-root')) {
|
||||
this.$store.dispatch('getTrash')
|
||||
}
|
||||
// Get dara of user with favourites tree
|
||||
this.$store.dispatch('getAppData')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user