Add button to open devtools in roomsettings

pull/21833/head
Will Hunt 2018-10-24 17:36:58 +01:00
parent 6b13a071f3
commit 79d467c551
1 changed files with 10 additions and 0 deletions

View File

@ -590,6 +590,11 @@ module.exports = React.createClass({
} }
}, },
_openDevtools: function() {
const DevtoolsDialog = sdk.getComponent('dialogs.DevtoolsDialog');
Modal.createDialog(DevtoolsDialog, {roomId: this.props.room.roomId});
},
_renderEncryptionSection: function() { _renderEncryptionSection: function() {
const SettingsFlag = sdk.getComponent("elements.SettingsFlag"); const SettingsFlag = sdk.getComponent("elements.SettingsFlag");
@ -942,6 +947,10 @@ module.exports = React.createClass({
</AccessibleButton>; </AccessibleButton>;
} }
devtoolsButton = <AccessibleButton onClick={this._openDevtools}>
{ _t("Open Devtools") }
</AccessibleButton>;
return ( return (
<div className="mx_RoomSettings"> <div className="mx_RoomSettings">
@ -1055,6 +1064,7 @@ module.exports = React.createClass({
{ _t('Internal room ID: ') } <code>{ this.props.room.roomId }</code><br /> { _t('Internal room ID: ') } <code>{ this.props.room.roomId }</code><br />
{ _t('Room version number: ') } <code>{ this.props.room.getVersion() }</code><br /> { _t('Room version number: ') } <code>{ this.props.room.getVersion() }</code><br />
{ roomUpgradeButton } { roomUpgradeButton }
{ devtoolsButton }
</div> </div>
</div> </div>
); );