logout button on splashscreen to avoid wedging users whose server has gone awol

pull/397/head
Matthew Hodgson 2015-11-18 20:47:14 +00:00
parent c9fe0b96b7
commit 46541a3f2e
2 changed files with 24 additions and 1 deletions

View File

@ -14,6 +14,18 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
.mx_MatrixChat_splash {
position: relative;
height: 100%;
}
.mx_MatrixChat_splashButtons {
text-align: center;
width: 100%;
position: absolute;
bottom: 30px;
}
.mx_MatrixChat_wrapper { .mx_MatrixChat_wrapper {
display: -webkit-box; display: -webkit-box;
display: -moz-box; display: -moz-box;

View File

@ -61,6 +61,14 @@ module.exports = React.createClass({
}); });
}, },
onLogoutClick: function(event) {
dis.dispatch({
action: 'logout'
});
event.stopPropagation();
event.preventDefault();
},
handleResize: function(e) { handleResize: function(e) {
var hideLhsThreshold = 1000; var hideLhsThreshold = 1000;
var showLhsThreshold = 1000; var showLhsThreshold = 1000;
@ -157,7 +165,10 @@ module.exports = React.createClass({
} else if (this.state.logged_in) { } else if (this.state.logged_in) {
var Spinner = sdk.getComponent('atoms.Spinner'); var Spinner = sdk.getComponent('atoms.Spinner');
return ( return (
<Spinner /> <div className="mx_MatrixChat_splash">
<Spinner />
<a href="#" className="mx_MatrixChat_splashButtons" onClick={ this.onLogoutClick }>Logout</a>
</div>
); );
} else if (this.state.screen == 'register') { } else if (this.state.screen == 'register') {
return ( return (