diff --git a/res/css/views/dialogs/_DevtoolsDialog.scss b/res/css/views/dialogs/_DevtoolsDialog.scss index 815e8408b51..2f01f3ecc63 100644 --- a/res/css/views/dialogs/_DevtoolsDialog.scss +++ b/res/css/views/dialogs/_DevtoolsDialog.scss @@ -18,7 +18,12 @@ limitations under the License. margin: 10px 0; } -.mx_DevTools_RoomStateExplorer_button, .mx_DevTools_RoomStateExplorer_query { +.mx_DevTools_ServersInRoomList_button { + /* Set the cursor back to default as `.mx_Dialog button` sets it to pointer */ + cursor: default !important; +} + +.mx_DevTools_RoomStateExplorer_button, .mx_DevTools_ServersInRoomList_button, .mx_DevTools_RoomStateExplorer_query { margin-bottom: 10px; width: 100%; } diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 3db516a74d0..0835c41bb9b 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -551,11 +551,53 @@ class AccountDataExplorer extends DevtoolsComponent { } } +class ServersInRoomList extends DevtoolsComponent { + static getLabel() { return _t('View Servers in Room'); } + + static propTypes = { + onBack: PropTypes.func.isRequired, + }; + + constructor(props, context) { + super(props, context); + + const room = MatrixClientPeg.get().getRoom(this.context.roomId); + const servers = new Set(); + room.currentState.getStateEvents("m.room.member").forEach(ev => servers.add(ev.getSender().split(":")[1])); + this.servers = Array.from(servers).map(s => + ); + + this.state = { + query: '', + }; + } + + onQuery = (query) => { + this.setState({ query }); + } + + render() { + return