- uploading via files queue

This commit is contained in:
Peter Papp
2021-02-21 19:56:03 +01:00
parent d92bb50a03
commit b8790a964b
7 changed files with 244 additions and 371 deletions

View File

@@ -112,7 +112,7 @@ export default {
'shared',
'public'
]
return !this.$isThisLocation(locations) || this.fileInfoDetail.length === 0
return !this.$isThisLocation(locations) || this.fileInfoDetail.length === 0
},
canUploadInView() {
return !this.$isThisLocation(['base', 'public'])
@@ -125,7 +125,7 @@ export default {
'shared',
'public'
]
return !this.$isThisLocation(locations) || this.fileInfoDetail.length === 0
return !this.$isThisLocation(locations) || this.fileInfoDetail.length === 0
},
canShareInView() {
@@ -137,7 +137,7 @@ export default {
'public'
]
return !this.$isThisLocation(locations) || this.fileInfoDetail.length > 1 || this.fileInfoDetail.length === 0
return !this.$isThisLocation(locations) || this.fileInfoDetail.length > 1 || this.fileInfoDetail.length === 0
}
},
data() {
@@ -183,14 +183,14 @@ export default {
events.$emit('folder:actions', this.currentFolder)
},
deleteItem() {
if(this.fileInfoDetail.length > 0)
if (this.fileInfoDetail.length > 0)
this.$store.dispatch('deleteItem')
},
createFolder() {
this.$store.dispatch('createFolder', this.$t('popup_create_folder.folder_default_name'))
},
moveItem() {
if(this.fileInfoDetail.length > 0)
if (this.fileInfoDetail.length > 0)
events.$emit('popup:open', { name: 'move', item: this.fileInfoDetail })
},
shareItem() {
@@ -215,9 +215,9 @@ export default {
// this.sortingAndPreview = state
// })
events.$on('unClick', () => {
this.sortingAndPreview = false
})
events.$on('unClick', () => {
this.sortingAndPreview = false
})
}
}
</script>
@@ -225,15 +225,18 @@ export default {
<style scoped lang="scss">
@import "@assets/vue-file-manager/_variables";
@import "@assets/vue-file-manager/_mixins";
.preview-sorting {
.preview-sorting {
/deep/ .label {
color: $text !important;
}
/deep/ .preview-sorting {
path, line, polyline, rect, circle {
stroke: $text !important;
}
path, line, polyline, rect, circle {
stroke: $text !important;
}
}
&:hover {
/deep/ .preview-sorting {
path, line, polyline, rect, circle {
@@ -358,6 +361,7 @@ export default {
&.preview-sorting {
background: $light_background;
/deep/ .preview-sorting {
path, line, polyline, rect, circle {
stroke: $theme !important;
@@ -423,14 +427,15 @@ export default {
background: $dark_mode_foreground !important;
}
}
.preview-sorting {
.preview-sorting {
/deep/ .label {
color: $text !important;
}
/deep/ .preview-sorting {
path, line, polyline, rect, circle {
stroke: $dark_mode_text_primary !important;
}
path, line, polyline, rect, circle {
stroke: $dark_mode_text_primary !important;
}
}
}
}

View File

@@ -1,5 +1,5 @@
<template>
<div class="file-content" id="file-content-id" :class="{ 'is-offset': uploadingFilesCount, 'is-dragging': isDragging }"
<div class="file-content" id="file-content-id" :class="{ 'is-offset': filesQueue > 0, 'is-dragging': isDragging }"
@dragover.prevent
@drop.stop.prevent="dropUpload($event)"
@dragover="dragEnter"
@@ -119,7 +119,7 @@
},
computed: {
...mapGetters([
'uploadingFilesCount',
'filesQueue',
'fileInfoVisible',
'fileInfoDetail',
'currentFolder',

View File

@@ -1,6 +1,7 @@
<template>
<transition name="info-panel">
<div v-if="filesQueue.length > 0" class="upload-progress">
<!--<div v-if="filesQueue.length > 0" class="upload-progress">-->
<div class="upload-progress">
<div class="progress-title">
<!--Is processing-->
@@ -11,16 +12,16 @@
<!--Single file upload-->
<span v-if="!isProcessingFile && filesQueue.length === 1">
{{ $t('uploading.progress_single_upload', {progress: 80}) }}
{{ $t('uploading.progress_single_upload', {progress: uploadingProgress}) }}
</span>
<!--Multi file upload-->
<span v-if="!isProcessingFile && filesQueue.length > 1">
{{ $t('uploading.progress', {current:'x', total: filesQueue.length, progress: 80}) }}
{{ $t('uploading.progress', {current:'x', total: filesQueue.length, progress: uploadingProgress}) }}
</span>
</div>
<div class="progress-wrapper">
<ProgressBar :progress="80" />
<ProgressBar :progress="uploadingProgress" />
<span @click="cancelUpload" :title="$t('uploading.cancel')" class="cancel-icon">
<x-icon size="16" @click="cancelUpload"></x-icon>
</span>
@@ -44,6 +45,7 @@
},
computed: {
...mapGetters([
'uploadingProgress',
'isProcessingFile',
'filesQueue',
])