diff --git a/res/css/views/dialogs/_RoomSettingsDialog.scss b/res/css/views/dialogs/_RoomSettingsDialog.scss
index de675abe32..e2a0238756 100644
--- a/res/css/views/dialogs/_RoomSettingsDialog.scss
+++ b/res/css/views/dialogs/_RoomSettingsDialog.scss
@@ -32,3 +32,13 @@ limitations under the License.
.mx_RoomSettingsDialog_warningIcon:before {
mask-image: url('$(res)/img/feather-icons/warning-triangle.svg');
}
+
+.mx_RoomSettingsDialog .mx_Dialog_title {
+ -ms-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ margin: 0 auto;
+ padding-left: 40px;
+ padding-right: 80px;
+}
diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js
index 521282488e..f494fbd961 100644
--- a/src/components/views/context_menus/RoomTileContextMenu.js
+++ b/src/components/views/context_menus/RoomTileContextMenu.js
@@ -271,6 +271,27 @@ module.exports = React.createClass({
);
},
+ _onClickSettings: function() {
+ dis.dispatch({
+ action: 'open_room_settings',
+ room_id: this.props.room.roomId,
+ });
+ if (this.props.onFinished) {
+ this.props.onFinished();
+ }
+ },
+
+ _renderSettingsMenu: function() {
+ return (
+
+
+
+ { _t('Settings') }
+
+
+ );
+ },
+
_renderLeaveMenu: function(membership) {
if (!membership) {
return null;
@@ -350,7 +371,11 @@ module.exports = React.createClass({
// Can't set notif level or tags on non-join rooms
if (myMembership !== 'join') {
- return this._renderLeaveMenu(myMembership);
+ return
+ { this._renderLeaveMenu(myMembership) }
+
+ { this._renderSettingsMenu() }
+ ;
}
return (
@@ -360,6 +385,8 @@ module.exports = React.createClass({
{ this._renderLeaveMenu(myMembership) }
{ this._renderRoomTagMenu() }
+
+ { this._renderSettingsMenu() }
);
},
diff --git a/src/components/views/dialogs/RoomSettingsDialog.js b/src/components/views/dialogs/RoomSettingsDialog.js
index 1f319176c2..22b7857264 100644
--- a/src/components/views/dialogs/RoomSettingsDialog.js
+++ b/src/components/views/dialogs/RoomSettingsDialog.js
@@ -23,6 +23,7 @@ import RolesRoomSettingsTab from "../settings/tabs/room/RolesRoomSettingsTab";
import GeneralRoomSettingsTab from "../settings/tabs/room/GeneralRoomSettingsTab";
import SecurityRoomSettingsTab from "../settings/tabs/room/SecurityRoomSettingsTab";
import sdk from "../../../index";
+import MatrixClientPeg from "../../../MatrixClientPeg";
export default class RoomSettingsDialog extends React.Component {
static propTypes = {
@@ -60,9 +61,10 @@ export default class RoomSettingsDialog extends React.Component {
render() {
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
+ const roomName = MatrixClientPeg.get().getRoom(this.props.roomId).name;
return (
+ onFinished={this.props.onFinished} title={_t("Room Settings - %(roomName)s", {roomName})}>
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 3c54a845f7..f145fae557 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -1117,7 +1117,7 @@
"To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.": "To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.",
"Report bugs & give feedback": "Report bugs & give feedback",
"Go back": "Go back",
- "Room Settings": "Room Settings",
+ "Room Settings - %(roomName)s": "Room Settings - %(roomName)s",
"Failed to upgrade room": "Failed to upgrade room",
"The room upgrade could not be completed": "The room upgrade could not be completed",
"Upgrade this room to version %(version)s": "Upgrade this room to version %(version)s",
diff --git a/src/stores/RoomViewStore.js b/src/stores/RoomViewStore.js
index 7d425ec94c..73eff6f6d4 100644
--- a/src/stores/RoomViewStore.js
+++ b/src/stores/RoomViewStore.js
@@ -119,7 +119,7 @@ class RoomViewStore extends Store {
case 'open_room_settings': {
const RoomSettingsDialog = sdk.getComponent("dialogs.RoomSettingsDialog");
Modal.createTrackedDialog('Room settings', '', RoomSettingsDialog, {
- roomId: this._state.roomId,
+ roomId: payload.room_id || this._state.roomId,
}, 'mx_SettingsDialog');
break;
}