2016-04-23 14:20:54 +02:00
|
|
|
var ReportPage = React.createClass({
|
|
|
|
submitMessage: function() {
|
|
|
|
if (this._messageArea.value) {
|
|
|
|
this.setState({
|
|
|
|
submitting: true
|
|
|
|
});
|
|
|
|
lbry.reportBug(this._messageArea.value, () => {
|
|
|
|
this.setState({
|
|
|
|
submitting: false
|
|
|
|
});
|
|
|
|
alert("Your bug report has been submitted! Thank you for your feedback.");
|
|
|
|
});
|
|
|
|
this._messageArea.value = '';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getInitialState: function() {
|
|
|
|
return {
|
|
|
|
submitting: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
render: function() {
|
|
|
|
return (
|
2016-05-23 14:16:14 +02:00
|
|
|
<main className="page">
|
2016-08-07 20:00:56 +02:00
|
|
|
<h1>Report an Issue</h1>
|
2016-04-23 14:20:54 +02:00
|
|
|
<section>
|
|
|
|
<p>Please describe the problem you experienced and any information you think might be useful to us. Links to screenshots are great!</p>
|
|
|
|
<textarea ref={(t) => this._messageArea = t} cols="50" rows="10" name="message" type="text"/>
|
2016-08-07 20:00:56 +02:00
|
|
|
<div><button onClick={this.submitMessage} className={'button-block button-primary ' + (this.state.submitting ? 'disabled' : '')}>{this.state.submitting ? 'Submitting...' : 'Submit Report'}</button></div>
|
2016-04-23 14:20:54 +02:00
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
Developers, feel free to instead <Link href="https://github.com/lbryio/lbry/issues" label="submit an issue on GitHub"/>.
|
|
|
|
</section>
|
|
|
|
<section>
|
2016-08-07 20:00:56 +02:00
|
|
|
<ReturnLink href="/?help" label="Return to Help"/>
|
2016-04-23 14:20:54 +02:00
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|