1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00

fix wording for file drag and drop dialog

This commit is contained in:
Tim Daubenschütz 2015-07-27 09:23:01 +02:00
parent d6968b40b5
commit d71111b6f1
3 changed files with 11 additions and 4 deletions

View File

@ -30,6 +30,8 @@ let FileDragAndDrop = React.createClass({
areAssetsDownloadable: React.PropTypes.bool,
areAssetsEditable: React.PropTypes.bool,
localHashing: React.PropTypes.bool,
// triggers a FileDragAndDrop-global spinner
hashingProgress: React.PropTypes.number,
// sets the value of this.state.hashingProgress in reactfineuploader
@ -174,7 +176,8 @@ let FileDragAndDrop = React.createClass({
<FileDragAndDropDialog
multipleFiles={this.props.multiple}
hasFiles={hasFiles}
onClick={this.handleOnClick}/>
onClick={this.handleOnClick}
localHashing={this.props.localHashing}/>
<FileDragAndDropPreviewIterator
files={this.props.filesToUpload}
handleDeleteFile={this.handleDeleteFile}

View File

@ -8,7 +8,8 @@ let FileDragAndDropDialog = React.createClass({
propTypes: {
hasFiles: React.PropTypes.bool,
multipleFiles: React.PropTypes.bool,
onClick: React.PropTypes.func
onClick: React.PropTypes.func,
localHashing: React.PropTypes.bool
},
render() {
@ -22,6 +23,8 @@ let FileDragAndDropDialog = React.createClass({
</span>
);
} else {
let dialog = this.props.localHashing ? getLangText('choose a file to hash') : getLangText('choose a file to upload');
return (
<span className="file-drag-and-drop-dialog">
<p>{getLangText('Drag a file here')}</p>
@ -29,7 +32,7 @@ let FileDragAndDropDialog = React.createClass({
<span
className="btn btn-default"
onClick={this.props.onClick}>
{getLangText('choose a file to upload')}
{dialog}
</span>
</span>
);

View File

@ -691,7 +691,8 @@ var ReactS3FineUploader = React.createClass({
areAssetsDownloadable={this.props.areAssetsDownloadable}
areAssetsEditable={this.props.areAssetsEditable}
dropzoneInactive={!this.props.areAssetsEditable || !this.props.multiple && this.state.filesToUpload.filter((file) => file.status !== 'deleted' && file.status !== 'canceled' && file.size !== -1).length > 0}
hashingProgress={this.state.hashingProgress} />
hashingProgress={this.state.hashingProgress}
localHashing={this.props.localHashing} />
</div>
);
}