From 83119d21d604319130ebdba7801bd7459bb08b52 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 28 Jan 2016 12:59:51 +0000 Subject: [PATCH] New style guest warning bar --- src/components/structures/MatrixChat.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 3184380005..0ac6e7f490 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -808,6 +808,7 @@ module.exports = React.createClass({ var CreateRoom = sdk.getComponent('structures.CreateRoom'); var RoomDirectory = sdk.getComponent('structures.RoomDirectory'); var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar'); + var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar'); var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword'); // needs to be before normal PageTypes as you are logged in technically @@ -848,7 +849,20 @@ module.exports = React.createClass({ } // TODO: Fix duplication here and do conditionals like we do above - if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) { + if (MatrixClientPeg.get().isGuest()) { + return ( +
+ +
+ +
+ {page_element} +
+ {right_panel} +
+
+ ); + } else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) { return (