mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
Add "Report a Bug" page to replace Jack's temporary one
This commit is contained in:
parent
f91ba86295
commit
366a16b933
4 changed files with 44 additions and 3 deletions
1
dist/index.html
vendored
1
dist/index.html
vendored
|
@ -28,6 +28,7 @@
|
||||||
<script src="./js/page/settings.js"></script>
|
<script src="./js/page/settings.js"></script>
|
||||||
<script src="./js/page/help.js"></script>
|
<script src="./js/page/help.js"></script>
|
||||||
<script src="./js/page/watch.js"></script>
|
<script src="./js/page/watch.js"></script>
|
||||||
|
<script src="./js/page/report.js"></script>
|
||||||
<script src="./js/page/start.js"></script>
|
<script src="./js/page/start.js"></script>
|
||||||
<script src="./js/app.js"></script>
|
<script src="./js/app.js"></script>
|
||||||
<script src="./js/main.js"></script>
|
<script src="./js/main.js"></script>
|
||||||
|
|
|
@ -9,7 +9,7 @@ var App = React.createClass({
|
||||||
var match, param, val;
|
var match, param, val;
|
||||||
[match, param, val] = window.location.search.match(/\??([^=]*)(?:=(.*))?/);
|
[match, param, val] = window.location.search.match(/\??([^=]*)(?:=(.*))?/);
|
||||||
|
|
||||||
if (['settings', 'help', 'start', 'watch'].indexOf(param) != -1) {
|
if (['settings', 'help', 'start', 'watch', 'report'].indexOf(param) != -1) {
|
||||||
var viewingPage = param;
|
var viewingPage = param;
|
||||||
} else {
|
} else {
|
||||||
var viewingPage = 'home';
|
var viewingPage = 'home';
|
||||||
|
@ -60,6 +60,8 @@ var App = React.createClass({
|
||||||
var content = <HelpPage />;
|
var content = <HelpPage />;
|
||||||
} else if (this.state.viewingPage == 'watch') {
|
} else if (this.state.viewingPage == 'watch') {
|
||||||
var content = <WatchPage name={this.state.pageArgs}/>;
|
var content = <WatchPage name={this.state.pageArgs}/>;
|
||||||
|
} else if (this.state.viewingPage == 'report') {
|
||||||
|
var content = <ReportPage />;
|
||||||
} else if (this.state.viewingPage == 'start') {
|
} else if (this.state.viewingPage == 'start') {
|
||||||
var content = <StartPage />;
|
var content = <StartPage />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,8 @@ var HelpPage = React.createClass({
|
||||||
<br></br>
|
<br></br>
|
||||||
<h3>None of this applies to me, or it didn't work</h3>
|
<h3>None of this applies to me, or it didn't work</h3>
|
||||||
<p>
|
<p>
|
||||||
<Link href="/report" label="<< Click here to send us a bug report"/>
|
Please <Link href="/?report" label="send us a bug report"/>. Thanks!
|
||||||
<br></br>
|
<br></br>
|
||||||
<Link href="https://github.com/lbryio/lbry/issues" label="<< Report an issue on github"/>
|
|
||||||
</p>
|
</p>
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
|
|
39
js/page/report.js
Normal file
39
js/page/report.js
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
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 (
|
||||||
|
<main>
|
||||||
|
<h1>Report a bug</h1>
|
||||||
|
<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"/>
|
||||||
|
<div><button onClick={this.submitMessage} className={this.state.submitting ? 'disabled' : ''}>{this.state.submitting ? 'Submitting...' : 'Submit bug report'}</button></div>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
Developers, feel free to instead <Link href="https://github.com/lbryio/lbry/issues" label="submit an issue on GitHub"/>.
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<Link href="/?help" label="<< Return to Help"/>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
Loading…
Add table
Reference in a new issue