Add bug report UI

This commit is contained in:
Kegan Dougal 2017-01-24 14:47:11 +00:00
parent e18a6151e4
commit 3b9a112136
3 changed files with 145 additions and 0 deletions

View file

@ -369,6 +369,11 @@ module.exports = React.createClass({
Modal.createDialog(DeactivateAccountDialog, {});
},
_onBugReportClicked: function() {
const BugReportDialog = sdk.getComponent("dialogs.BugReportDialog");
Modal.createDialog(BugReportDialog, {});
},
_onInviteStateChange: function(event, member, oldMembership) {
if (member.userId === this._me && oldMembership === "invite") {
this.forceUpdate();
@ -485,6 +490,21 @@ module.exports = React.createClass({
);
},
_renderBugReport: function() {
// TODO: If there is no bug report endpoint, hide this.
return (
<div>
<h3>Bug Report</h3>
<div className="mx_UserSettings_section">
<p>Found a bug?</p>
<button className="mx_UserSettings_button danger"
onClick={this._onBugReportClicked}>Report it
</button>
</div>
</div>
);
},
_renderLabs: function() {
// default to enabled if undefined
if (this.props.enableLabs === false) return null;
@ -738,6 +758,7 @@ module.exports = React.createClass({
{this._renderDevicesPanel()}
{this._renderCryptoInfo()}
{this._renderBulkOptions()}
{this._renderBugReport()}
<h3>Advanced</h3>