Date: Fri, 3 Jan 2020 13:57:59 +0000
Subject: [PATCH 13/17] Tweak as per git review
---
.../settings/tabs/room/BridgeSettingsTab.js | 69 +++++++++----------
src/i18n/strings/en_EN.json | 8 +--
2 files changed, 35 insertions(+), 42 deletions(-)
diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.js b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
index 82382e78286..9e6bdf89585 100644
--- a/src/components/views/settings/tabs/room/BridgeSettingsTab.js
+++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
@@ -1,5 +1,5 @@
/*
-Copyright 2019 New Vector Ltd
+Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -33,17 +33,6 @@ export default class BridgeSettingsTab extends React.Component {
roomId: PropTypes.string.isRequired,
};
- constructor() {
- super();
-
- this.state = {
- };
- }
-
- componentWillMount() {
-
- }
-
_renderBridgeCard(event, room) {
const content = event.getContent();
if (!content || !content.channel || !content.protocol) {
@@ -56,21 +45,18 @@ export default class BridgeSettingsTab extends React.Component {
let creator = null;
if (content.creator) {
- const pill = ;
- creator = ({
- _t("This bridge was provisioned by %(pill)s", {
- pill,
- })
- }
);
+ creator = { _t("This bridge was provisioned by ", {}, {
+ user: ,
+ })}
;
}
- const bot = ( {_t("This bridge is managed by the %(pill)s bot user.", {
- pill: {_t("This bridge is managed by the bot user.", {}, {
+ user: );
let channelLink = channelName;
if (channel.external_url) {
- channelLink = {channelName};
+ channelLink = {channelName};
}
let networkLink = networkName;
if (network && network.external_url) {
- networkLink = {networkName};
+ networkLink = {networkName};
}
const chanAndNetworkInfo = (
- (_t("Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s", {
+ _t("Bridged into , on ", {}, {
channelLink,
networkLink,
protocolName,
- }))
+ })
);
let networkIcon = null;
@@ -101,9 +87,13 @@ export default class BridgeSettingsTab extends React.Component {
MatrixClientPeg.get().getHomeserverUrl(),
network.avatar, 32, 32, "crop",
);
- networkIcon = ;
+ networkIcon = ;
}
let channelIcon = null;
@@ -112,13 +102,16 @@ export default class BridgeSettingsTab extends React.Component {
MatrixClientPeg.get().getHomeserverUrl(),
channel.avatar, 32, 32, "crop",
);
- console.log(channel.avatar);
- channelIcon = ;
+ channelIcon = ;
}
- const heading = _t("Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s", {
+ const heading = _t("Connected to on ", { }, {
channelIcon,
channelName,
networkName,
@@ -127,7 +120,7 @@ export default class BridgeSettingsTab extends React.Component {
return (
-
{heading}
+
{heading}
{_t("Connected via %(protocolName)s", { protocolName })}
{creator}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 6fcfd2eb952..1f66891857a 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -763,10 +763,10 @@
"Room version:": "Room version:",
"Developer options": "Developer options",
"Open Devtools": "Open Devtools",
- "This bridge was provisioned by %(pill)s": "This bridge was provisioned by %(pill)s",
- "This bridge is managed by the %(pill)s bot user.": "This bridge is managed by the %(pill)s bot user.",
- "Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s": "Bridged into %(channelLink)s %(networkLink)s, on %(protocolName)s",
- "Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s": "Connected to %(channelIcon)s %(channelName)s on %(networkIcon)s %(networkName)s",
+ "This bridge was provisioned by ": "This bridge was provisioned by ",
+ "This bridge is managed by the bot user.": "This bridge is managed by the bot user.",
+ "Bridged into , on ": "Bridged into , on ",
+ "Connected to on ": "Connected to on ",
"Connected via %(protocolName)s": "Connected via %(protocolName)s",
"Bridge Info": "Bridge Info",
"Below is a list of bridges connected to this room.": "Below is a list of bridges connected to this room.",
From 831053de112921eaffafac5d94933e0e6dcc6a88 Mon Sep 17 00:00:00 2001
From: Half-Shot
Date: Fri, 3 Jan 2020 13:58:07 +0000
Subject: [PATCH 14/17] Make bridge info cards more obvious
---
res/css/views/dialogs/_RoomSettingsDialog.scss | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/res/css/views/dialogs/_RoomSettingsDialog.scss b/res/css/views/dialogs/_RoomSettingsDialog.scss
index 4b13684d9f8..aa66e97f9e4 100644
--- a/res/css/views/dialogs/_RoomSettingsDialog.scss
+++ b/res/css/views/dialogs/_RoomSettingsDialog.scss
@@ -62,8 +62,10 @@ limitations under the License.
.mx_RoomSettingsDialog_BridgeList li {
list-style-type: none;
- padding: 0;
- margin: 0;
- border-bottom: 1px solid $panel-divider-color;
+ padding: 5px;
+ margin-bottom: 5px;
+ border-width: 1px 0px;
+ border-color: #dee1f3;
+ border-style: solid;
}
From 50e19ba43d64e168e670e4657153f9359477bcb6 Mon Sep 17 00:00:00 2001
From: Half-Shot
Date: Fri, 3 Jan 2020 14:04:59 +0000
Subject: [PATCH 15/17] User may not be a bot, therefore do not imply it.
---
src/components/views/settings/tabs/room/BridgeSettingsTab.js | 2 +-
src/i18n/strings/en_EN.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.js b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
index 9e6bdf89585..c3c85ec31ce 100644
--- a/src/components/views/settings/tabs/room/BridgeSettingsTab.js
+++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
@@ -55,7 +55,7 @@ export default class BridgeSettingsTab extends React.Component {
})};
}
- const bot = ( {_t("This bridge is managed by the bot user.", {}, {
+ const bot = (
{_t("This bridge is managed by .", {}, {
user: ": "This bridge was provisioned by ",
- "This bridge is managed by the bot user.": "This bridge is managed by the bot user.",
+ "This bridge is managed by .": "This bridge is managed by .",
"Bridged into , on ": "Bridged into , on ",
"Connected to on ": "Connected to on ",
"Connected via %(protocolName)s": "Connected via %(protocolName)s",
From 2ccc8caa6974ed3787436815aea95e5fc38a5205 Mon Sep 17 00:00:00 2001
From: Will Hunt
Date: Sun, 5 Jan 2020 15:50:06 +0000
Subject: [PATCH 16/17] Fix indent
---
.../settings/tabs/room/BridgeSettingsTab.js | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.js b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
index c3c85ec31ce..5536a2eb069 100644
--- a/src/components/views/settings/tabs/room/BridgeSettingsTab.js
+++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
@@ -88,12 +88,12 @@ export default class BridgeSettingsTab extends React.Component {
network.avatar, 32, 32, "crop",
);
networkIcon = ;
+ width={32}
+ height={32}
+ resizeMethod='crop'
+ name={ networkName }
+ idName={ networkName }
+ url={ avatarUrl } />;
}
let channelIcon = null;
@@ -103,12 +103,12 @@ export default class BridgeSettingsTab extends React.Component {
channel.avatar, 32, 32, "crop",
);
channelIcon = ;
+ width={32}
+ height={32}
+ resizeMethod='crop'
+ name={ networkName }
+ idName={ networkName }
+ url={ avatarUrl } />;
}
const heading = _t("Connected to on ", { }, {
From 7f0ed05ee1dc5e03ff718986ba2040621bc41b71 Mon Sep 17 00:00:00 2001
From: Will Hunt
Date: Sun, 5 Jan 2020 23:32:49 +0000
Subject: [PATCH 17/17] Update BridgeSettingsTab.js
---
.../settings/tabs/room/BridgeSettingsTab.js | 26 ++++++++++---------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/components/views/settings/tabs/room/BridgeSettingsTab.js b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
index 5536a2eb069..3022885701b 100644
--- a/src/components/views/settings/tabs/room/BridgeSettingsTab.js
+++ b/src/components/views/settings/tabs/room/BridgeSettingsTab.js
@@ -88,12 +88,13 @@ export default class BridgeSettingsTab extends React.Component {
network.avatar, 32, 32, "crop",
);
networkIcon = ;
+ width={32}
+ height={32}
+ resizeMethod='crop'
+ name={ networkName }
+ idName={ networkName }
+ url={ avatarUrl }
+ />;
}
let channelIcon = null;
@@ -103,12 +104,13 @@ export default class BridgeSettingsTab extends React.Component {
channel.avatar, 32, 32, "crop",
);
channelIcon = ;
+ width={32}
+ height={32}
+ resizeMethod='crop'
+ name={ networkName }
+ idName={ networkName }
+ url={ avatarUrl }
+ />;
}
const heading = _t("Connected to on ", { }, {