- 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

@@ -89,14 +89,14 @@ const FunctionHelpers = {
Vue.prototype.$uploadFiles = async function (files) {
if (files.length == 0) return
if (files.length === 0) return
if (!this.$checkFileMimetype(files) || !this.$checkUploadLimit(files)) return
// Push items to file queue
[...files].map(item => {
this.$store.commit('ADD_FILES_TO_QUEUE', {
folder_id: store.getters.currentFolder.id ? store.getters.currentFolder.id : '',
folder_id: store.getters.currentFolder.data.id ? store.getters.currentFolder.data.id : '',
file: item,
})
});
@@ -275,7 +275,7 @@ const FunctionHelpers = {
}
// Detect windows
Vue.prototype.$isWIndows = function () {
Vue.prototype.$isWindows = function () {
return navigator.userAgent.indexOf('Windows') != -1
}
@@ -337,7 +337,7 @@ const FunctionHelpers = {
}
Vue.prototype.$enableMultiSelectMode = function () {
events.$emit('mobileSelecting:start')
events.$emit('mobile-select:start')
}
Vue.prototype.$showViewOptions = function () {