vuex refactoring

This commit is contained in:
carodej
2020-04-23 17:57:55 +02:00
parent 8cbc58f775
commit c4b26d70b5
18 changed files with 286 additions and 283 deletions

View File

@@ -80,7 +80,7 @@
name: 'FileItem',
props: ['data'],
computed: {
...mapGetters(['preview_type']),
...mapGetters(['FilePreviewType']),
isFolder() {
return this.data.type === 'folder'
},
@@ -113,7 +113,7 @@
methods: {
showItemActions() {
// Load file info detail
this.$store.dispatch('loadFileInfoDetail', this.data)
this.$store.commit('GET_FILEINFO_DETAIL', this.data)
events.$emit('mobileMenu:show')
},
@@ -139,12 +139,12 @@
if ( this.$isThisLocation('public') ) {
this.$store.dispatch('browseShared', [this.data, false])
} else {
this.$store.dispatch('goToFolder', [this.data, false])
this.$store.dispatch('getFolder', [this.data, false])
}
}
// Load file info detail
this.$store.dispatch('loadFileInfoDetail', this.data)
this.$store.commit('GET_FILEINFO_DETAIL', this.data)
// Get target classname
let itemClass = e.target.className
@@ -173,7 +173,7 @@
if ( this.$isThisLocation('public') ) {
this.$store.dispatch('browseShared', [this.data, false])
} else {
this.$store.dispatch('goToFolder', [this.data, false])
this.$store.dispatch('getFolder', [this.data, false])
}
}
},