File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import Offline from 'components/Offline';
27
27
process : stores . chat . process ,
28
28
reconnect : stores . session . checkTimeout ,
29
29
close : ( ) => stores . snackbar . toggle ( false ) ,
30
- canidrag : ( ) => ! ! stores . chat . user || ! stores . batchsend . show ,
30
+ canidrag : ( ) => ! ! stores . chat . user && ! stores . batchsend . show ,
31
31
} ) )
32
32
@observer
33
33
export default class Layout extends Component {
@@ -119,12 +119,12 @@ export default class Layout extends Component {
119
119
} ;
120
120
121
121
window . ondrop = e => {
122
- var file = e . dataTransfer . files [ 0 ] ;
122
+ var files = e . dataTransfer . files ;
123
123
e . preventDefault ( ) ;
124
124
e . stopPropagation ( ) ;
125
125
126
- if ( file && canidrag ( ) ) {
127
- this . props . process ( file ) ;
126
+ if ( files . length && canidrag ( ) ) {
127
+ Array . from ( files ) . map ( e => this . props . process ( e ) ) ;
128
128
}
129
129
130
130
this . refs . holder . classList . remove ( classes . show ) ;
You can’t perform that action at this time.
0 commit comments