- added file resource

- frontend refactoring
This commit is contained in:
Peter Papp
2021-08-26 18:01:57 +02:00
parent f5f2179145
commit 5c6a873b02
37 changed files with 339 additions and 773 deletions

View File

@@ -27,10 +27,10 @@ const itemHelpers = {
Vue.prototype.$downloadSelection = function (item) {
let clipboard = this.$store.getters.clipboard
if (clipboard.length > 1 || (clipboard.length === 1 && clipboard[0].type === 'folder'))
if (clipboard.length > 1 || (clipboard.length === 1 && clipboard[0].data.type === 'folder'))
this.$store.dispatch('downloadZip')
else {
Vue.prototype.$downloadFile(item.file_url, item.name + '.' + item.mimetype)
Vue.prototype.$downloadFile(item.data.attributes.file_url, item.data.attributes.name + '.' + item.data.attributes.mimetype)
}
}
@@ -76,7 +76,7 @@ const itemHelpers = {
}
Vue.prototype.$shareFileOrFolder = function (entry) {
let event = entry.shared
let event = entry.data.relationships.shared
? 'share-edit'
: 'share-create'