Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
srfrnk committed Feb 18, 2018
2 parents 07a494c + c8667e1 commit 79a58b2
Showing 1 changed file with 38 additions and 32 deletions.
70 changes: 38 additions & 32 deletions src/components/ConfirmTakeoff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,39 +32,45 @@ class ConfirmTakeoff extends Component {
}

render() {
return (this.state.alertHidden && (<div id="confirm-takeoff-screen" className="screen">
<div className="screen-background--dark"/>
<div className="modal-container">
<div className="modal-box confirm-takeoff">
<h1>Ready for Pickup</h1>
<p>Drone has arrived at <br/><b>{this.props.coords.lat}, {this.props.coords.long}</b></p>
<p>
<i>Please slide the package into the compartment at the bottom of the drone. Package should click into place when secured.</i>
</p>
<button onClick={this.toggleAlert.bind(this)} className="big-button with-subtext">
TAKE OFF<br/>
<span className="button-subtext">PACKAGE LOADED AND SECURE</span>
</button>
</div>
</div>
</div>))
|| !this.state.alertHidden && (<div id="confirm-takeoff-screen" className="screen">
<div className="screen-background--dark"/>
<div className="modal-container">
<div className="modal-box alert-box confirm-takeoff">
<h1>Drone will take off immediately</h1>
<p>Are you sure the package is secure and the area around the drone is clear?</p>
<div className="alert-button-container">
<button onClick={this.toggleAlert.bind(this)} className="alert-button-cancel" disabled={this.state.buttonsDisabled}>
CANCEL
</button>
<button onClick={this.props.confirmTakeoff} className="alert-button-confirm" disabled={this.state.buttonsDisabled}>
CONFIRM
</button>
if(this.state.alertHidden) {
return (
<div id="confirm-takeoff-screen" className="screen">
<div className="screen-background--dark"/>
<div className="modal-container">
<div className="modal-box confirm-takeoff">
<h1>Ready for Pickup</h1>
<p>Drone has arrived at <br/><b>{this.props.coords.lat}, {this.props.coords.long}</b></p>
<p>
<i>Please slide the package into the compartment at the bottom of the drone. Package should click into place when secured.</i>
</p>
<button onClick={this.toggleAlert.bind(this)} className="big-button with-subtext">
TAKE OFF<br/>
<span className="button-subtext">PACKAGE LOADED AND SECURE</span>
</button>
</div>
</div>
</div>
</div>
</div>);
</div>);
}
else {
return (
<div id="confirm-takeoff-screen" className="screen">
<div className="screen-background--dark"/>
<div className="modal-container">
<div className="modal-box alert-box confirm-takeoff">
<h1>Drone will take off immediately</h1>
<p>Are you sure the package is secure and the area around the drone is clear?</p>
<div className="alert-button-container">
<button onClick={this.toggleAlert.bind(this)} className="alert-button-cancel" disabled={this.state.buttonsDisabled}>
CANCEL
</button>
<button onClick={this.props.confirmTakeoff} className="alert-button-confirm" disabled={this.state.buttonsDisabled}>
CONFIRM
</button>
</div>
</div>
</div>
</div>);
}
}
}

Expand Down

0 comments on commit 79a58b2

Please sign in to comment.