From 16357a9bc7ed4a635911811642fe04b368194108 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Sat, 27 May 2017 17:31:28 +0100 Subject: [PATCH 1/7] Sorting of networks within a protocol based on name Signed-off-by: Oliver Hunt --- .../views/directory/NetworkDropdown.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/views/directory/NetworkDropdown.js b/src/components/views/directory/NetworkDropdown.js index c891ee5b2..9c19cdbce 100644 --- a/src/components/views/directory/NetworkDropdown.js +++ b/src/components/views/directory/NetworkDropdown.js @@ -150,7 +150,21 @@ export default class NetworkDropdown extends React.Component { if (this.props.protocols) { for (const proto of Object.keys(this.props.protocols)) { if (!this.props.protocols[proto].instances) continue; - for (const instance of this.props.protocols[proto].instances) { + + const sortedInstances = this.props.protocols[proto].instances; + sortedInstances.sort(function(x, y) { + const a = x.desc + const b = y.desc + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }); + + for (const instance of sortedInstances) { if (!instance.instance_id) continue; options.push(this._makeMenuOption(server, instance, false)); } From fca86be077a15bdb70da6a400fc03803698aa546 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 6 Sep 2017 10:56:32 +0100 Subject: [PATCH 2/7] allow hiding of notification body for privacy reasons Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/settings/Notifications.js | 20 +++++++++++++++++++ src/i18n/strings/en_EN.json | 1 + 2 files changed, 21 insertions(+) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index a58b5d580..6e497d622 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -116,6 +116,11 @@ module.exports = React.createClass({ UserSettingsStore.setEnableNotifications(event.target.checked); }, + onEnableDesktopNotificationBodyChange: function(event) { + UserSettingsStore.setEnableNotificationBody(event.target.checked); + this.forceUpdate(); + }, + onEnableEmailNotificationsChange: function(address, event) { var emailPusherPromise; if (event.target.checked) { @@ -831,6 +836,21 @@ module.exports = React.createClass({ +
+
+ +
+
+ +
+
+
Date: Thu, 14 Sep 2017 10:03:53 -0600 Subject: [PATCH 3/7] Bring back dark theme code block border This fixes https://github.com/vector-im/riot-web/issues/5013 and https://github.com/vector-im/riot-web/issues/4416 by only showing the border when the code block is hovered, and that the border is actually visible. The !important is needed to override the default border behaviour. Signed-off-by: Travis Ralston --- src/skins/vector/css/themes/_dark.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/skins/vector/css/themes/_dark.scss b/src/skins/vector/css/themes/_dark.scss index a8f162d9f..c22c5a444 100644 --- a/src/skins/vector/css/themes/_dark.scss +++ b/src/skins/vector/css/themes/_dark.scss @@ -131,6 +131,9 @@ $progressbar-color: #000; } // markdown overrides: +.mx_EventTile_content .markdown-body pre:hover { + border-color: #808080 !important; // inverted due to rules below +} .mx_EventTile_content .markdown-body { pre, code { filter: invert(1); From 783aebe5eb439396f92ddea3b1ee182c42184af0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 11 Oct 2017 21:13:55 -0600 Subject: [PATCH 4/7] CSS for lonely room message Signed-off-by: Travis Ralston --- .../matrix-react-sdk/structures/_RoomStatusBar.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_RoomStatusBar.scss b/src/skins/vector/css/matrix-react-sdk/structures/_RoomStatusBar.scss index d4b425ee4..ca7431eac 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_RoomStatusBar.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_RoomStatusBar.scss @@ -150,6 +150,16 @@ limitations under the License. display: block; } +.mx_RoomStatusBar_isAlone { + height: 50px; + line-height: 50px; + + color: $primary-fg-color; + opacity: 0.5; + overflow-y: hidden; + display: block; +} + .mx_MatrixChat_useCompactLayout { .mx_RoomStatusBar { min-height: 40px; From 1adb63ac74b75ad5ec7622aa90d232006e9c3d6e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 13 Oct 2017 20:18:55 -0600 Subject: [PATCH 5/7] Don't use MXIDs on the lightbox if possible Signed-off-by: Travis Ralston --- src/components/views/elements/ImageView.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index e70a5d3be..bdb9d17f2 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -150,8 +150,16 @@ module.exports = React.createClass({ var eventMeta; if(showEventMeta) { + // Figure out the sender, defaulting to mxid + let sender = this.props.mxEvent.getSender(); + const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId()); + if (room) { + const member = room.getMember(sender); + if (member) sender = member.name; + } + eventMeta = (
- { _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: this.props.mxEvent.getSender()}) } + { _t('Uploaded on %(date)s by %(user)s', {date: DateUtils.formatDate(new Date(this.props.mxEvent.getTs())), user: sender}) }
); } From c7723ba0b034530d74ac667f2be5ddcc0b801ab7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 13 Oct 2017 20:56:39 -0600 Subject: [PATCH 6/7] Remove room avatar button CSS Signed-off-by: Travis Ralston --- .../css/matrix-react-sdk/views/rooms/_RoomHeader.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_RoomHeader.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_RoomHeader.scss index bb80832de..05cdfba8f 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_RoomHeader.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_RoomHeader.scss @@ -138,10 +138,17 @@ limitations under the License. .mx_RoomHeader_name, .mx_RoomHeader_avatar, .mx_RoomHeader_avatarPicker, -.mx_RoomHeader_avatarPicker_edit { +.mx_RoomHeader_avatarPicker_edit, +.mx_RoomHeader_avatarPicker_remove { cursor: pointer; } +.mx_RoomHeader_avatarPicker_remove { + position: absolute; + top: 10px; + left: 45px; +} + .mx_RoomHeader_name:hover div:not(.mx_RoomHeader_editable) { color: $accent-color; } From 56e775c56a46c298181e43d4bf809f208c2297df Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 13 Oct 2017 21:14:08 -0600 Subject: [PATCH 7/7] Remove user avatar button CSS --- .../css/matrix-react-sdk/structures/_UserSettings.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss b/src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss index ec1cfd2e6..660725388 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_UserSettings.scss @@ -252,6 +252,16 @@ input.mx_UserSettings_phoneNumberField { display: none; } +.mx_UserSettings_avatarPicker_imgContainer { + display: inline-block; +} + +.mx_UserSettings_avatarPicker_remove { + display: inline-block; + float: right; + margin-right: -15px; +} + .mx_UserSettings_advanced_spoiler, .mx_UserSettings_link { cursor: pointer;