kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added loading icon to NewTaskPanel
rodzic
8b4c81a3b8
commit
cdf77d3089
|
@ -31,7 +31,8 @@ class NewTaskPanel extends React.Component {
|
||||||
resizeSize: parseInt(Storage.getItem('resize_size')) || 2048,
|
resizeSize: parseInt(Storage.getItem('resize_size')) || 2048,
|
||||||
items: [], // Coming from plugins,
|
items: [], // Coming from plugins,
|
||||||
taskInfo: {},
|
taskInfo: {},
|
||||||
inReview: false
|
inReview: false,
|
||||||
|
loading: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.save = this.save.bind(this);
|
this.save = this.save.bind(this);
|
||||||
|
@ -56,7 +57,7 @@ class NewTaskPanel extends React.Component {
|
||||||
if (!this.state.inReview){
|
if (!this.state.inReview){
|
||||||
this.setState({inReview: true});
|
this.setState({inReview: true});
|
||||||
}else{
|
}else{
|
||||||
this.setState({inReview: false});
|
this.setState({inReview: false, loading: true});
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.taskForm.saveLastPresetToStorage();
|
this.taskForm.saveLastPresetToStorage();
|
||||||
Storage.setItem('resize_size', this.state.resizeSize);
|
Storage.setItem('resize_size', this.state.resizeSize);
|
||||||
|
@ -181,7 +182,11 @@ class NewTaskPanel extends React.Component {
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<div className="col-sm-offset-2 col-sm-10 text-right">
|
<div className="col-sm-offset-2 col-sm-10 text-right">
|
||||||
{this.props.onCancel !== undefined && <button type="submit" className="btn btn-danger" onClick={this.cancel} style={{marginRight: 4}}><i className="glyphicon glyphicon-remove-circle"></i> Cancel</button>}
|
{this.props.onCancel !== undefined && <button type="submit" className="btn btn-danger" onClick={this.cancel} style={{marginRight: 4}}><i className="glyphicon glyphicon-remove-circle"></i> Cancel</button>}
|
||||||
|
{this.state.loading ?
|
||||||
|
<button type="submit" className="btn btn-primary" disabled={true}><i className="fa fa-circle-o-notch fa-spin fa-fw"></i>Loading...</button>
|
||||||
|
:
|
||||||
<button type="submit" className="btn btn-primary" onClick={this.save} disabled={this.props.filesCount <= 1}><i className="glyphicon glyphicon-saved"></i> {!this.state.inReview ? "Review" : "Start Processing"}</button>
|
<button type="submit" className="btn btn-primary" onClick={this.save} disabled={this.props.filesCount <= 1}><i className="glyphicon glyphicon-saved"></i> {!this.state.inReview ? "Review" : "Start Processing"}</button>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
: ""}
|
: ""}
|
||||||
|
|
Ładowanie…
Reference in New Issue