vuefilemanager v1.5-alpha.1

This commit is contained in:
carodej
2020-04-29 11:32:08 +02:00
parent 2614efe601
commit 0f3cbaec3d
50 changed files with 426 additions and 355 deletions
+8 -4
View File
@@ -55,6 +55,7 @@ const Helpers = {
// Prevent submit empty files
if (files && files.length == 0) return
// Check storage size
if (! this.$isThisLocation(['public']) && this.$store.getters.app.storage.percentage >= 100) {
events.$emit('alert:open', {
emoji: '😬😬😬',
@@ -88,7 +89,8 @@ const Helpers = {
formData.append('parent_id', rootFolder)
// Upload data
await store.dispatch('uploadFiles', formData).then(() => {
await store.dispatch('uploadFiles', formData)
.then(() => {
// Progress file log
store.commit('UPDATE_FILE_COUNT_PROGRESS', {
current: fileCountSucceed,
@@ -104,7 +106,7 @@ const Helpers = {
}
}).catch(error => {
/*if (error.response.status === 423) {
if (error.response.status === 423) {
events.$emit('alert:open', {
emoji: '😬😬😬',
@@ -119,7 +121,7 @@ const Helpers = {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
}*/
}
})
}
}
@@ -132,7 +134,8 @@ const Helpers = {
// Get files
const files = [...event.dataTransfer.items].map(item => item.getAsFile());
if (this.$store.getters.app.storage.percentage >= 100) {
// Check storage size
if (! this.$isThisLocation(['public']) && this.$store.getters.app.storage.percentage >= 100) {
events.$emit('alert:open', {
emoji: '😬😬😬',
title: this.$t('popup_exceed_limit.title'),
@@ -141,6 +144,7 @@ const Helpers = {
return
}
let fileCountSucceed = 1
store.commit('UPDATE_FILE_COUNT_PROGRESS', {