From e5f4fa8c467830745a77d281ab90347230a3b6c3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 27 Jan 2016 17:58:47 +0000 Subject: [PATCH] Add warning bar for guest users. Fixes https://github.com/vector-im/vector-web/issues/770 --- src/components/structures/RoomView.js | 40 +++++++++++++++++++++------ 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index a2a308ed5c..12acdc21fd 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1474,6 +1474,16 @@ module.exports = React.createClass({ } }, + onRegisterClicked: function() { + dis.dispatch({'action': 'logout'}); + dis.dispatch({'action': 'start_registration'}); + }, + + onLoginClicked: function() { + dis.dispatch({'action': 'logout'}); + dis.dispatch({'action': 'start_login'}); + }, + render: function() { var RoomHeader = sdk.getComponent('rooms.RoomHeader'); var MessageComposer = sdk.getComponent('rooms.MessageComposer'); @@ -1581,13 +1591,13 @@ module.exports = React.createClass({ // a connection! if (this.state.syncState === "ERROR") { statusBar = ( -
+
/!\ -
-
+
+
Connectivity to the server has been lost.
-
+
Sent messages will be stored until your connection has returned.
@@ -1611,13 +1621,13 @@ module.exports = React.createClass({ } else if (this.state.hasUnsentMessages) { statusBar = ( -