diff --git a/skins/base/css/common.css b/skins/base/css/common.css index 32f915e9..d90ce11a 100644 --- a/skins/base/css/common.css +++ b/skins/base/css/common.css @@ -83,6 +83,7 @@ html { font-size: 16px; position: relative; border-radius: 8px; + max-width: 75%; } .mx_ImageView { diff --git a/skins/base/css/templates/Login.css b/skins/base/css/templates/Login.css index fe5646f9..7362ac50 100644 --- a/skins/base/css/templates/Login.css +++ b/skins/base/css/templates/Login.css @@ -17,15 +17,6 @@ limitations under the License. .mx_Login { width: 100%; height: 100%; - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - -webkit-align-items: center; - align-items: center; - -webkit-justify-content: center; - justify-content: center; } .mx_Login h2 { @@ -37,6 +28,8 @@ limitations under the License. .mx_Login_box { width: 300px; + margin: auto; + padding-top: 100px; } .mx_Login_logo { @@ -82,11 +75,19 @@ limitations under the License. opacity: 0.8; } +.mx_Login_loader { + position: absolute; + left: 50%; + margin-top: 12px; +} + .mx_Login_error { color: #ff2020; font-weight: bold; text-align: center; - margin-bottom: 24px; + height: 24px; + margin-top: 12px; + margin-bottom: 12px; } .mx_Login_create:link { diff --git a/skins/base/views/templates/Login.js b/skins/base/views/templates/Login.js index a783296d..57b5fbcd 100644 --- a/skins/base/views/templates/Login.js +++ b/skins/base/views/templates/Login.js @@ -74,14 +74,25 @@ module.exports = React.createClass({ */ getFormVals: function() { return { - 'username': this.refs.user.getDOMNode().value, - 'password': this.refs.pass.getDOMNode().value + 'username': this.refs.user.getDOMNode().value.trim(), + 'password': this.refs.pass.getDOMNode().value.trim() }; }, onHsUrlChanged: function() { - this.customHsUrl = this.refs.serverConfig.getHsUrl(); - this.customIsUrl = this.refs.serverConfig.getIsUrl(); + var newHsUrl = this.refs.serverConfig.getHsUrl().trim(); + var newIsUrl = this.refs.serverConfig.getIsUrl().trim(); + + if (newHsUrl == this.customHsUrl && + newIsUrl == this.customIsUrl) + { + return; + } + else { + this.customHsUrl = newHsUrl; + this.customIsUrl = newIsUrl; + } + MatrixClientPeg.replaceUsingUrls( this.getHsUrl(), this.getIsUrl() @@ -93,23 +104,24 @@ module.exports = React.createClass({ // XXX: HSes do not have to offer password auth, so we // need to update and maybe show a different component // when a new HS is entered. - /*if (this.updateHsTimeout) { + if (this.updateHsTimeout) { clearTimeout(this.updateHsTimeout); } var self = this; this.updateHsTimeout = setTimeout(function() { self.onHSChosen(); - }, 500);*/ + }, 1000); }, componentForStep: function(step) { switch (step) { case 'choose_hs': + case 'fetch_stages': var serverConfigStyle = {}; serverConfigStyle.display = this.state.serverConfigVisible ? 'block' : 'none'; return (