add sorting for every getData and navigator, Favourites need to be fixed

This commit is contained in:
Milos Holba
2020-12-08 19:14:53 +01:00
parent 2ba92ed3b6
commit 7e325c5101
8 changed files with 93 additions and 36 deletions
+21 -3
View File
@@ -308,11 +308,29 @@ const Helpers = {
return validated
}
Vue.prototype.$getDataByLocation = function() {
let previousFolder = store.getters.currentFolder
let folder = store.getters.currentFolder
if(this.$isThisLocation('base')){
this.$store.dispatch('getFolder', [{folder: previousFolder, back: false, init: false}])
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')
}
this.$store.dispatch('getAppData')
}
}
}