Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove no longer needed "modalDismissed"
As "showUploadEditor" is now properly updated in the store when an
upload starts or discarded the "modalDismissed" property of the
component is redundant and can be removed.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu authored and PVince81 committed Feb 9, 2021
commit af013c8a8b2b09ad81ecc558d7d5530d3d099d91
20 changes: 1 addition & 19 deletions src/components/UploadEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ export default {
Plus,
},

data() {
return {
modalDismissed: false,
}
},

computed: {
token() {
return this.$store.getters.getToken()
Expand All @@ -101,34 +95,22 @@ export default {
return []
},

showUploadEditor() {
return this.$store.getters.showUploadEditor
},

showModal() {
return this.showUploadEditor && !this.modalDismissed
return this.$store.getters.showUploadEditor
},

addMoreAriaLabel() {
return t('spreed', 'Add more files')
},
},

watch: {
currentUploadId() {
this.modalDismissed = false
},
},

methods: {
handleDismiss() {
this.$store.dispatch('discardUpload', this.currentUploadId)
this.modalDismissed = true
},

handleUpload() {
this.$store.dispatch('uploadFiles', this.currentUploadId)
this.modalDismissed = true
},
/**
* Clicks the hidden file input when clicking the correspondent ActionButton,
Expand Down