From f6e3437944d781e4cb9bd0d3934568c5c026c281 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 15 Mar 2019 16:00:34 -0600 Subject: [PATCH] Update text in RoomUpgradeWarningBar to match suggestions --- .../views/rooms/_RoomUpgradeWarningBar.scss | 2 +- .../views/rooms/RoomUpgradeWarningBar.js | 66 +++++++++---------- src/i18n/strings/en_EN.json | 3 +- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/res/css/views/rooms/_RoomUpgradeWarningBar.scss b/res/css/views/rooms/_RoomUpgradeWarningBar.scss index 82785b82d2..fe81d3801a 100644 --- a/res/css/views/rooms/_RoomUpgradeWarningBar.scss +++ b/res/css/views/rooms/_RoomUpgradeWarningBar.scss @@ -16,7 +16,7 @@ limitations under the License. .mx_RoomUpgradeWarningBar { text-align: center; - height: 176px; + height: 235px; background-color: $event-selected-color; align-items: center; flex-direction: column; diff --git a/src/components/views/rooms/RoomUpgradeWarningBar.js b/src/components/views/rooms/RoomUpgradeWarningBar.js index 32969cdd3d..589608dcfa 100644 --- a/src/components/views/rooms/RoomUpgradeWarningBar.js +++ b/src/components/views/rooms/RoomUpgradeWarningBar.js @@ -37,47 +37,43 @@ module.exports = React.createClass({ render: function() { const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); - let upgradeText = ( -
+ return ( +
+
+ {_t( + "This room is running room version , which this homeserver has " + + "marked as unstable.", + {}, + { + "roomVersion": () => {this.props.room.getVersion()}, + "i": (sub) => {sub}, + }, + )} +
- {_t("This room is using an unstable room version. If you aren't expecting " + - "this, please upgrade the room.")} +

+ {_t( + "Upgrading this room will shut down the current instance of the room and create " + + "an upgraded room with the same name.", + )} +

+

+ {_t( + "Warning: Upgrading a room will not automatically migrate room members " + + "to the new version of the room. We'll post a link to the new room in the old " + + "version of the room - room members will have to click this link to join the new room.", + {}, { + "b": (sub) => {sub}, + "i": (sub) => {sub}, + }, + )} +

- {_t("Click here to upgrade to the latest room version.")} + {_t("Upgrade this room to the recommended room version")}

-
- ); - if (this.props.recommendation.urgent) { - upgradeText = ( -
-
- {_t("There is a known vulnerability affecting this room.")} -
-
- {_t("This room version is vulnerable to malicious modification of room state.")} -
-

- - {_t("Click here to upgrade to the latest room version and ensure room integrity " + - "is protected.")} - -

-
- ); - } - - return ( -
- {upgradeText} -
- {_t( - "Members of the room will be required to click a link to join the " + - "new room. No one will be automatically joined or invited to the new room.", - )} -
{_t("Only room administrators will see this warning")}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a49fc485fe..976f902f27 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -812,7 +812,8 @@ "Click here to upgrade to the latest room version.": "Click here to upgrade to the latest room version.", "There is a known vulnerability affecting this room.": "There is a known vulnerability affecting this room.", "This room version is vulnerable to malicious modification of room state.": "This room version is vulnerable to malicious modification of room state.", - "Click here to upgrade to the latest room version and ensure room integrity is protected.": "Click here to upgrade to the latest room version and ensure room integrity is protected.", + "This room is running room version , which this homeserver has marked as unstable.": "This room is running room version , which this homeserver has marked as unstable.", + "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.": "Upgrading this room will shut down the current instance of the room and create an upgraded room with the same name.", "Only room administrators will see this warning": "Only room administrators will see this warning", "This Room": "This Room", "All Rooms": "All Rooms",