diff --git a/assets/src/components/files/ListingItem.vue b/assets/src/components/files/ListingItem.vue index 4ec15c61..c92c91d1 100644 --- a/assets/src/components/files/ListingItem.vue +++ b/assets/src/components/files/ListingItem.vue @@ -115,15 +115,20 @@ export default { }, click: function (event) { if (this.selectedCount !== 0) event.preventDefault() - if (this.$store.state.selected.indexOf(this.index) === -1) { - if (!event.ctrlKey && !this.$store.state.multiple) this.resetSelected() - - this.addSelected(this.index) - } else { + if (this.$store.state.selected.indexOf(this.index) !== -1) { this.removeSelected(this.index) + return } - return false + if (event.shiftKey && this.selected.length === 1) { + let fi = (this.index > this.selected[0]) ? this.selected[0] : this.index + let la = (this.index > this.selected[0]) ? this.index : this.selected[0] + for (; fi <= la; fi++) this.addSelected(fi) + return + } + + if (!event.ctrlKey && !this.$store.state.multiple) this.resetSelected() + this.addSelected(this.index) }, touchstart (event) { setTimeout(() => { diff --git a/rice-box.go.REMOVED.git-id b/rice-box.go.REMOVED.git-id index 47752e45..cfc9b1c3 100644 --- a/rice-box.go.REMOVED.git-id +++ b/rice-box.go.REMOVED.git-id @@ -1 +1 @@ -01a4cd8827c117228f6518fd0080cd522cd6bea8 \ No newline at end of file +60f3c5fb4e901be9b2920d60643c26ad4d414706 \ No newline at end of file