diff --git a/res/css/views/rooms/_RoomSettings.scss b/res/css/views/rooms/_RoomSettings.scss
index f04042ea77..b3858f3ba7 100644
--- a/res/css/views/rooms/_RoomSettings.scss
+++ b/res/css/views/rooms/_RoomSettings.scss
@@ -28,6 +28,13 @@ limitations under the License.
margin-right: 8px;
}
+.mx_RoomSettings_devtoolsButton {
+ @mixin mx_DialogButton;
+ position: relative;
+ padding: 4px 1.5em;
+ margin-top: 8px;
+}
+
.mx_RoomSettings_upgradeButton,
.mx_RoomSettings_leaveButton:hover,
.mx_RoomSettings_unbanButton:hover {
diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js
index 129278907f..f32026511b 100644
--- a/src/components/structures/UserSettings.js
+++ b/src/components/structures/UserSettings.js
@@ -82,6 +82,7 @@ const SIMPLE_SETTINGS = [
{ id: "TagPanel.disableTagPanel" },
{ id: "enableWidgetScreenshots" },
{ id: "RoomSubList.showEmpty" },
+ { id: "showDeveloperTools" },
];
// These settings must be defined in SettingsStore
diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js
index 46869c1773..b69938a117 100644
--- a/src/components/views/rooms/RoomSettings.js
+++ b/src/components/views/rooms/RoomSettings.js
@@ -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() {
const SettingsFlag = sdk.getComponent("elements.SettingsFlag");
@@ -942,6 +947,11 @@ module.exports = React.createClass({
;
}
+ const devtoolsButton = SettingsStore.getValue("showDeveloperTools") ?
+ (
{ this.props.room.roomId }
{ this.props.room.getVersion() }