mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-25 06:04:42 +00:00
merge fixes
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<ToolbarButton @click.stop.native="showCreateMenu" source="cloud-plus" :action="$t('actions.create')" />
|
||||
|
||||
<PopoverItem name="desktop-create" side="left">
|
||||
<OptionGroup :class="{'is-inactive': canUploadInView || !hasCapacity }">
|
||||
<OptionGroup :class="{'is-inactive': canUploadInView }">
|
||||
<OptionUpload :title="$t('actions.upload')" type="file" />
|
||||
<OptionUpload :title="$t('actions.upload_folder')" type="folder" />
|
||||
</OptionGroup>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
</div>
|
||||
<div class="text-label group-hover-text-theme">
|
||||
{{ title }}
|
||||
|
||||
<input
|
||||
v-if="type === 'file'"
|
||||
@change="emmitFiles"
|
||||
@@ -40,11 +41,12 @@ import {
|
||||
export default {
|
||||
name: 'Option',
|
||||
props:[
|
||||
'title', 'type'
|
||||
'title',
|
||||
'type',
|
||||
],
|
||||
components: {
|
||||
UploadCloudIcon,
|
||||
FolderUploadIcon,
|
||||
UploadCloudIcon,
|
||||
},
|
||||
methods: {
|
||||
emmitFiles(e) {
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '/resources/sass/vuefilemanager/_variables';
|
||||
|
||||
.color-label {
|
||||
|
||||
|
||||
+5
-3
@@ -165,6 +165,7 @@ const FunctionHelpers = {
|
||||
this.$store.commit('ADD_FILES_TO_QUEUE', {
|
||||
parent_id: store.getters.currentFolder ? store.getters.currentFolder.data.id : '',
|
||||
file: item,
|
||||
path: '/' + item.webkitRelativePath
|
||||
})
|
||||
});
|
||||
|
||||
@@ -237,10 +238,11 @@ const FunctionHelpers = {
|
||||
attempts = 0
|
||||
|
||||
// Set form data
|
||||
formData.set('filename', item.file.name);
|
||||
formData.set('file', chunk, source_name);
|
||||
formData.set('filename', item.file.name)
|
||||
formData.set('file', chunk, source_name)
|
||||
formData.set('path', item.path)
|
||||
formData.set('parent_id', item.parent_id)
|
||||
formData.set('is_last', isLast);
|
||||
formData.set('is_last', isLast)
|
||||
|
||||
// Upload chunks
|
||||
do {
|
||||
|
||||
+6
-4
@@ -192,7 +192,7 @@ const actions = {
|
||||
commit('SHIFT_FROM_FILE_QUEUE')
|
||||
|
||||
// Check if user is in uploading folder, if yes, than show new file
|
||||
if ((! getters.currentFolder && !response.data.data.attributes.parent_id) || response.data.data.attributes.parent_id === getters.currentFolder.data.id) {
|
||||
if ((! getters.currentFolder && !response.data.data.attributes.parent_id) || (getters.currentFolder && response.data.data.attributes.parent_id === getters.currentFolder.data.id)) {
|
||||
|
||||
// Add uploaded item into view
|
||||
commit('ADD_NEW_ITEMS', response.data)
|
||||
@@ -221,7 +221,9 @@ const actions = {
|
||||
.catch(error => {
|
||||
reject(error)
|
||||
|
||||
let messages = {
|
||||
console.log(error);
|
||||
|
||||
/* let messages = {
|
||||
'423': {
|
||||
title: i18n.t('popup_exceed_limit.title'),
|
||||
message: i18n.t('popup_exceed_limit.message')
|
||||
@@ -235,7 +237,7 @@ const actions = {
|
||||
message: i18n.t('popup_paylod_error.message')
|
||||
},
|
||||
'401': {
|
||||
title: error.response.data.message,
|
||||
//title: error.response.data.message,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -243,7 +245,7 @@ const actions = {
|
||||
emoji: '😬😬😬',
|
||||
title: messages[error.response.status]['title'],
|
||||
message: messages[error.response.status]['message'] || null
|
||||
})
|
||||
})*/
|
||||
|
||||
commit('PROCESSING_FILE', false)
|
||||
commit('CLEAR_UPLOAD_PROGRESS')
|
||||
|
||||
Reference in New Issue
Block a user