);
@@ -768,9 +798,6 @@ module.exports = withMatrixClient(React.createClass({
;
}
- // TODO: we should have an invite button if this MemberInfo is showing a user who isn't actually in the current room yet
- // e.g. clicking on a linkified userid in a room
-
let adminTools;
if (kickButton || banButton || muteButton || giveModButton) {
adminTools =
@@ -795,9 +822,29 @@ module.exports = withMatrixClient(React.createClass({
var presenceCurrentlyActive = this.props.member.user.currentlyActive;
}
+ let roomMemberDetails = null;
+
+ if (this.props.member.roomId) { // is in room
+ const PowerSelector = sdk.getComponent('elements.PowerSelector');
+ const PresenceLabel = sdk.getComponent('rooms.PresenceLabel');
+ roomMemberDetails =
{ this._renderUserOptions() }
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 492113989b..9d91c3a110 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -249,6 +249,7 @@
"Level:": "Level:",
"and %(count)s others...|other": "and %(count)s others...",
"and %(count)s others...|one": "and one other...",
+ "Invite": "Invite",
"Invited": "Invited",
"Filter room members": "Filter room members",
"%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (power %(powerLevelNumber)s)",
From 5990e41bd74264c590ec8ccf2b0d4272134f8e24 Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Wed, 25 Oct 2017 17:24:45 +0100
Subject: [PATCH 03/16] Use the correct userId when displaying who redacted a
message
---
src/components/views/messages/UnknownBody.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/views/messages/UnknownBody.js b/src/components/views/messages/UnknownBody.js
index 083d7ac12e..5a2bf7c54c 100644
--- a/src/components/views/messages/UnknownBody.js
+++ b/src/components/views/messages/UnknownBody.js
@@ -25,7 +25,9 @@ module.exports = React.createClass({
render: function() {
let tooltip = _t("Removed or unknown message type");
if (this.props.mxEvent.isRedacted()) {
- tooltip = _t("Message removed by %(userId)s", {userId: this.props.mxEvent.getSender()});
+ tooltip = _t("Message removed by %(userId)s", {
+ userId: this.props.mxEvent.getUnsigned().redacted_because.sender,
+ });
}
const text = this.props.mxEvent.getContent().body;
From cedc0b27a939781bcfa65a2c52197cdb376c338c Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Wed, 25 Oct 2017 17:37:20 +0100
Subject: [PATCH 04/16] Handle redaction with no sender
---
src/components/views/messages/UnknownBody.js | 7 ++++---
src/i18n/strings/en_EN.json | 9 +++++----
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/components/views/messages/UnknownBody.js b/src/components/views/messages/UnknownBody.js
index 5a2bf7c54c..9a172baf7c 100644
--- a/src/components/views/messages/UnknownBody.js
+++ b/src/components/views/messages/UnknownBody.js
@@ -25,9 +25,10 @@ module.exports = React.createClass({
render: function() {
let tooltip = _t("Removed or unknown message type");
if (this.props.mxEvent.isRedacted()) {
- tooltip = _t("Message removed by %(userId)s", {
- userId: this.props.mxEvent.getUnsigned().redacted_because.sender,
- });
+ const redactedBecauseUserId = this.props.mxEvent.getUnsigned().redacted_because.sender;
+ tooltip = redactedBecauseUserId ?
+ _t("Message removed by %(userId)s", { userId: redactedBecauseUserId }) :
+ _t("Message removed");
}
const text = this.props.mxEvent.getContent().body;
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index ef915f23cd..fbff51299a 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -200,8 +200,6 @@
"Authentication": "Authentication",
"Failed to delete device": "Failed to delete device",
"Delete": "Delete",
- "Delete Widget": "Delete Widget",
- "Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?": "Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?",
"Disable Notifications": "Disable Notifications",
"Enable Notifications": "Enable Notifications",
"Cannot add any more widgets": "Cannot add any more widgets",
@@ -452,6 +450,7 @@
"You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?": "You are about to be taken to a third-party site so you can authenticate your account for use with %(integrationsUrl)s. Do you wish to continue?",
"Removed or unknown message type": "Removed or unknown message type",
"Message removed by %(userId)s": "Message removed by %(userId)s",
+ "Message removed": "Message removed",
"Robot check is currently unavailable on desktop - please use a web browser": "Robot check is currently unavailable on desktop - please use a web browser",
"This Home Server would like to make sure you are not a robot": "This Home Server would like to make sure you are not a robot",
"Sign in with CAS": "Sign in with CAS",
@@ -499,6 +498,8 @@
"NOTE: Apps are not end-to-end encrypted": "NOTE: Apps are not end-to-end encrypted",
"Do you want to load widget from URL:": "Do you want to load widget from URL:",
"Allow": "Allow",
+ "Delete Widget": "Delete Widget",
+ "Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?": "Deleting a widget removes it for all users in this room. Are you sure you want to delete this widget?",
"Delete widget": "Delete widget",
"Revoke widget access": "Revoke widget access",
"Edit": "Edit",
@@ -678,17 +679,17 @@
"Leave %(groupName)s?": "Leave %(groupName)s?",
"Leave": "Leave",
"Unable to leave room": "Unable to leave room",
+ "Community Settings": "Community Settings",
"Add rooms to this community": "Add rooms to this community",
"Featured Rooms:": "Featured Rooms:",
"Featured Users:": "Featured Users:",
"%(inviter)s has invited you to join this community": "%(inviter)s has invited you to join this community",
- "You are a member of this community": "You are a member of this community",
"You are an administrator of this community": "You are an administrator of this community",
+ "You are a member of this community": "You are a member of this community",
"Community Member Settings": "Community Member Settings",
"Publish this community on your profile": "Publish this community on your profile",
"Long Description (HTML)": "Long Description (HTML)",
"Description": "Description",
- "Community Settings": "Community Settings",
"Community %(groupId)s not found": "Community %(groupId)s not found",
"This Home server does not support communities": "This Home server does not support communities",
"Failed to load %(groupId)s": "Failed to load %(groupId)s",
From 3ae97348f81c54691061c0a8fcf843882c3500b8 Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Wed, 25 Oct 2017 18:17:33 +0100
Subject: [PATCH 05/16] Add option to mirror local video feed
---
src/components/structures/UserSettings.js | 4 ++++
src/components/views/voip/VideoView.js | 9 +++++++--
src/i18n/strings/en_EN.json | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js
index 7704cce0c7..ac1c6b662b 100644
--- a/src/components/structures/UserSettings.js
+++ b/src/components/structures/UserSettings.js
@@ -118,6 +118,10 @@ const SETTINGS_LABELS = [
id: 'TextualBody.disableBigEmoji',
label: _td('Disable big emoji in chat'),
},
+ {
+ id: 'VideoView.flipVideoHorizontally',
+ label: _td('Mirror local video feed'),
+ },
/*
{
id: 'useFixedWidthFont',
diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js
index 8f062d27ae..94cc74960f 100644
--- a/src/components/views/voip/VideoView.js
+++ b/src/components/views/voip/VideoView.js
@@ -18,10 +18,13 @@ limitations under the License.
import React from 'react';
import ReactDOM from 'react-dom';
+import classNames from 'classnames';
import sdk from '../../../index';
import dis from '../../../dispatcher';
+import UserSettingsStore from '../../../UserSettingsStore';
+
module.exports = React.createClass({
displayName: 'VideoView',
@@ -108,14 +111,16 @@ module.exports = React.createClass({
document.mozFullScreenElement ||
document.webkitFullscreenElement);
const maxVideoHeight = fullscreenElement ? null : this.props.maxHeight;
-
+ const localVideoFeedClasses = classNames("mx_VideoView_localVideoFeed",
+ {"mx_VideoView_localVideoFeed_flipped": UserSettingsStore.getSyncedSetting}
+ );
return (
-
+
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index fbff51299a..b9bca1ca6c 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -755,6 +755,7 @@
"Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing",
"Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
"Disable big emoji in chat": "Disable big emoji in chat",
+ "Mirror local video feed": "Mirror local video feed",
"Opt out of analytics": "Opt out of analytics",
"Disable Peer-to-Peer for 1:1 calls": "Disable Peer-to-Peer for 1:1 calls",
"Never send encrypted messages to unverified devices from this device": "Never send encrypted messages to unverified devices from this device",
From 97b9cf64023967e177724373204ad15f5b618b2a Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Thu, 26 Oct 2017 09:58:46 +0100
Subject: [PATCH 06/16] Actually use the synced setting
---
src/components/views/voip/VideoView.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js
index 94cc74960f..8fbc95697d 100644
--- a/src/components/views/voip/VideoView.js
+++ b/src/components/views/voip/VideoView.js
@@ -112,7 +112,9 @@ module.exports = React.createClass({
document.webkitFullscreenElement);
const maxVideoHeight = fullscreenElement ? null : this.props.maxHeight;
const localVideoFeedClasses = classNames("mx_VideoView_localVideoFeed",
- {"mx_VideoView_localVideoFeed_flipped": UserSettingsStore.getSyncedSetting}
+ { "mx_VideoView_localVideoFeed_flipped":
+ UserSettingsStore.getSyncedSetting('VideoView.flipVideoHorizontally'),
+ },
);
return (
From 591a7f4b8616ee5d457642d3d2de34f47b9745c7 Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Thu, 26 Oct 2017 10:06:04 +0100
Subject: [PATCH 07/16] Default to false
---
src/components/views/voip/VideoView.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/views/voip/VideoView.js b/src/components/views/voip/VideoView.js
index 8fbc95697d..748673f1a5 100644
--- a/src/components/views/voip/VideoView.js
+++ b/src/components/views/voip/VideoView.js
@@ -113,7 +113,7 @@ module.exports = React.createClass({
const maxVideoHeight = fullscreenElement ? null : this.props.maxHeight;
const localVideoFeedClasses = classNames("mx_VideoView_localVideoFeed",
{ "mx_VideoView_localVideoFeed_flipped":
- UserSettingsStore.getSyncedSetting('VideoView.flipVideoHorizontally'),
+ UserSettingsStore.getSyncedSetting('VideoView.flipVideoHorizontally', false),
},
);
return (
From eec6ed36cdf03ccaeaa712e33439ab668c3a63e3 Mon Sep 17 00:00:00 2001
From: Luke Barnard
Date: Thu, 26 Oct 2017 14:05:58 +0100
Subject: [PATCH 08/16] Use correct icon for group room deletion and make
themeable
Also fix cancel icons to have class mx_filterFlipColor
---
src/components/structures/UserSettings.js | 7 +++++--
src/components/views/groups/GroupMemberInfo.js | 2 +-
src/components/views/groups/GroupRoomTile.js | 7 +++++--
src/components/views/rooms/LinkPreviewWidget.js | 5 +++--
src/components/views/rooms/PinnedEventsPanel.js | 4 +++-
src/components/views/rooms/RoomHeader.js | 7 +++++--
src/i18n/strings/en_EN.json | 3 ++-
7 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js
index ac1c6b662b..68ea932f93 100644
--- a/src/components/structures/UserSettings.js
+++ b/src/components/structures/UserSettings.js
@@ -1332,8 +1332,11 @@ module.exports = React.createClass({