Merge pull request #2517 from jryans/auth-server-type-selector

Add server type selector and style login flow
This commit is contained in:
J. Ryan Stinnett 2019-01-28 22:11:14 -06:00 committed by GitHub
commit 20bf683df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 725 additions and 267 deletions

View file

@ -33,6 +33,7 @@
@import "./views/auth/_InteractiveAuthEntryComponents.scss";
@import "./views/auth/_LanguageSelector.scss";
@import "./views/auth/_ServerConfig.scss";
@import "./views/auth/_ServerTypeSelector.scss";
@import "./views/avatars/_BaseAvatar.scss";
@import "./views/avatars/_MemberStatusMessageAvatar.scss";
@import "./views/context_menus/_MessageContextMenu.scss";

View file

@ -23,7 +23,8 @@ limitations under the License.
}
.mx_Login_field {
width: 280px;
width: 100%;
box-sizing: border-box;
border-radius: 3px;
border: 1px solid $strong-input-border-color;
font-weight: 300;
@ -32,10 +33,6 @@ limitations under the License.
margin-bottom: 14px;
}
.mx_Login_field_disabled {
opacity: 0.3;
}
.mx_Login_fieldLabel {
margin-top: -10px;
margin-left: 8px;
@ -49,6 +46,8 @@ limitations under the License.
width: 100%;
margin-top: 35px;
margin-bottom: 24px;
box-sizing: border-box;
text-align: center;
}
.mx_Login_submit:hover {
@ -69,10 +68,10 @@ limitations under the License.
margin-right: 10px;
}
.mx_Login_sso_link {
display: block;
text-align: center;
margin-bottom: 20px;
.mx_AuthBody a.mx_Login_sso_link:link,
.mx_AuthBody a.mx_Login_sso_link:hover,
.mx_AuthBody a.mx_Login_sso_link:visited {
color: $button-primary-fg-color;
}
.mx_Login_loader {
@ -105,6 +104,7 @@ limitations under the License.
.mx_Login_type_container {
display: flex;
margin-bottom: 14px;
color: $primary-fg-color;
}
.mx_Login_type_label {
@ -124,9 +124,9 @@ limitations under the License.
}
.mx_Login_field_prefix {
height: 34px;
height: 38px;
padding: 0px 5px;
line-height: 33px;
line-height: 38px;
background-color: #eee;
border: 1px solid #c7c7c7;
@ -136,40 +136,11 @@ limitations under the License.
text-align: center;
}
.mx_Login_field_suffix {
height: 34px;
padding: 0px 5px;
line-height: 33px;
background-color: #eee;
border: 1px solid #c7c7c7;
border-left: 0px;
border-radius: 0px 3px 3px 0px;
text-align: center;
flex-grow: 1;
}
.mx_Login_username {
height: 16px;
flex-shrink: 1;
min-width: 0px;
}
.mx_Login_phoneNumberField {
height: 16px;
}
.mx_Login_field_has_prefix {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
.mx_Login_field_has_suffix {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.mx_Login_phoneSection {
display:flex;
}
@ -190,12 +161,9 @@ limitations under the License.
}
.mx_Login_phoneCountry .mx_Dropdown_option {
/*
To match height of mx_Login_field
33px + 2px border from mx_Dropdown_option = 35px
*/
height: 33px;
line-height: 33px;
/* To match height of mx_Login_field */
height: 38px;
line-height: 38px;
}
.mx_Login_phoneCountry .mx_Dropdown_option img {

View file

@ -24,6 +24,29 @@ limitations under the License.
color: $authpage-body-color;
}
.mx_AuthBody h2 {
font-size: 24px;
font-weight: 600;
margin-top: 8px;
}
.mx_AuthBody h3 {
font-size: 14px;
font-weight: 600;
color: $primary-fg-color;
}
.mx_Auth_editServerDetails {
padding-left: 1em;
font-size: 12px;
font-weight: normal;
}
.mx_AuthBody .mx_Field input {
width: 100%;
box-sizing: border-box;
}
.mx_AuthBody a:link,
.mx_AuthBody a:hover,
.mx_AuthBody a:visited {

View file

@ -23,12 +23,6 @@ limitations under the License.
background-color: $authpage-bg-color;
}
.mx_AuthPage h2 {
font-size: 24px;
font-weight: 600;
margin-top: 8px;
}
.mx_AuthPage_modal {
display: flex;
margin: 100px auto auto;

View file

@ -14,23 +14,24 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_ServerConfig {
margin-top: 7px;
.mx_ServerConfig_fields {
display: flex;
margin: 1em 0;
}
.mx_ServerConfig .mx_Login_field {
margin-top: 4px;
margin-bottom: 5px;
.mx_ServerConfig_fields .mx_Field {
flex: 1;
margin: 0 5px;
}
.mx_ServerConfig_fields .mx_Field:first-child {
margin-left: 0;
}
.mx_ServerConfig_fields .mx_Field:last-child {
margin-right: 0;
}
.mx_ServerConfig_help:link {
opacity: 0.8;
font-size: 13px;
font-weight: 300;
color: $primary-fg-color;
}
.mx_ServerConfig_selector {
text-align: center;
width: 302px; // for fr i18n
}

View file

@ -0,0 +1,69 @@
/*
Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_ServerTypeSelector {
display: flex;
margin-bottom: 28px;
}
.mx_ServerTypeSelector_type {
margin: 0 5px;
}
.mx_ServerTypeSelector_type:first-child {
margin-left: 0;
}
.mx_ServerTypeSelector_type:last-child {
margin-right: 0;
}
.mx_ServerTypeSelector_label {
text-align: center;
font-weight: 600;
color: $primary-fg-color;
margin: 8px 0;
}
.mx_ServerTypeSelector_type .mx_AccessibleButton {
padding: 10px;
border: 1px solid $input-border-color;
border-radius: 4px;
}
.mx_ServerTypeSelector_type.mx_ServerTypeSelector_type_selected .mx_AccessibleButton {
border-color: $input-valid-border-color;
}
.mx_ServerTypeSelector_logo {
display: flex;
justify-content: center;
height: 18px;
margin-bottom: 12px;
font-weight: 600;
color: $primary-fg-color;
}
.mx_ServerTypeSelector_logo > div {
display: flex;
width: 70%;
align-items: center;
justify-content: space-evenly;
}
.mx_ServerTypeSelector_description {
font-size: 10px;
}