Add bug report UI
This commit is contained in:
parent
e18a6151e4
commit
3b9a112136
3 changed files with 145 additions and 0 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue