Skip to content

Commit 1e139ef

Browse files
author
Luke Barnard
committed
Cosmetics to go with matrix-org/matrix-react-sdk#811
1 parent 15accf3 commit 1e139ef

4 files changed

Lines changed: 84 additions & 7 deletions

File tree

‎src/components/views/login/VectorLoginHeader.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ limitations under the License.
1818

1919
var React = require('react');
2020

21+
const i = [1, 2, 3, 4, 5][Math.floor(Math.random() * 5)];
22+
const DEFAULT_LOGO_URI = "img/logos/riot-logo-" + i + ".svg";
23+
2124
module.exports = React.createClass({
2225
displayName: 'VectorLoginHeader',
2326
statics: {
@@ -30,7 +33,7 @@ module.exports = React.createClass({
3033
render: function() {
3134
return (
3235
<div className="mx_Login_logo">
33-
<img src={this.props.icon || "img/logo.png"} alt="Riot"/>
36+
<img src={this.props.icon || DEFAULT_LOGO_URI} alt="Riot"/>
3437
</div>
3538
);
3639
}

‎src/skins/vector/css/_common.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ input[type=text].error, input[type=password].error {
6565
border: 1px solid $warning-color;
6666
}
6767

68-
input[type=text]:focus, textarea:focus {
68+
input[type=text]:focus, input[type=password]:focus, textarea:focus {
6969
border: 1px solid $accent-color;
7070
outline: none;
7171
box-shadow: none;

‎src/skins/vector/css/matrix-react-sdk/structures/login/_Login.scss‎

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ limitations under the License.
6666
margin-bottom: 14px;
6767
}
6868

69-
.mx_Login_username {
70-
margin-bottom: 0px;
71-
}
72-
7369
.mx_Login_fieldLabel {
7470
margin-top: -10px;
7571
margin-left: 8px;
@@ -167,6 +163,66 @@ limitations under the License.
167163
margin-bottom: 12px;
168164
}
169165

166+
.mx_Login_type_container {
167+
display: flex;
168+
margin-bottom: 14px;
169+
}
170+
171+
.mx_Login_type_label {
172+
flex-grow: 1;
173+
line-height: 35px;
174+
}
175+
176+
.mx_Login_type_dropdown {
177+
width: 125px;
178+
align-self: flex-end;
179+
}
180+
181+
.mx_Login_username_group {
182+
display: flex;
183+
}
184+
185+
.mx_Login_username_prefix {
186+
height: 33px;
187+
padding: 0px 5px;
188+
line-height: 33px;
189+
190+
background-color: #eee;
191+
border: 1px solid #c7c7c7;
192+
border-right: 0px;
193+
border-radius: 3px 0px 0px 3px;
194+
195+
text-align: center;
196+
}
197+
198+
.mx_Login_username_suffix {
199+
height: 33px;
200+
padding: 0px 5px;
201+
line-height: 33px;
202+
203+
background-color: #eee;
204+
border: 1px solid #c7c7c7;
205+
border-left: 0px;
206+
border-radius: 0px 3px 3px 0px;
207+
208+
text-align: center;
209+
flex-grow: 1;
210+
}
211+
212+
.mx_Login_username {
213+
flex-shrink: 1;
214+
min-width: 0px;
215+
border-radius: 3px;
216+
/* The "@" is always prefixed, so no rounded corners */
217+
border-top-left-radius: 0px;
218+
border-bottom-left-radius: 0px;
219+
}
220+
221+
.mx_Login_field_has_suffix {
222+
border-top-right-radius: 0px;
223+
border-bottom-right-radius: 0px;
224+
}
225+
170226
.mx_Login_phoneSection {
171227
display: table;
172228
}
@@ -176,6 +232,20 @@ limitations under the License.
176232
width: 70px;
177233
}
178234

235+
.mx_Login_phoneCountry .mx_Dropdown_option {
236+
/*
237+
To match height of mx_Login_field
238+
33px + 2px border from mx_Dropdown_option = 35px
239+
*/
240+
height: 33px;
241+
line-height: 33px;
242+
}
243+
244+
.mx_Login_phoneCountry .mx_Dropdown_option img {
245+
margin: 4px;
246+
vertical-align: top;
247+
}
248+
179249
.mx_Login_phoneNumberField {
180250
width: 210px;
181251
margin-left: 3px;

‎src/skins/vector/css/matrix-react-sdk/views/elements/_Dropdown.scss‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ limitations under the License.
2727
user-select: none;
2828
}
2929

30+
.mx_Dropdown_input:focus {
31+
border-color: $accent-color;
32+
}
33+
3034
.mx_Dropdown_arrow {
3135
border-color: $primary-fg-color transparent transparent;
3236
border-style: solid;
@@ -74,7 +78,7 @@ input.mx_Dropdown_option, input.mx_Dropdown_option:focus {
7478
border: 1px solid $accent-color;
7579
background-color: $primary-bg-color;
7680
max-height: 200px;
77-
overflow-y: scroll;
81+
overflow-y: auto;
7882
}
7983

8084
.mx_Dropdown_menu .mx_Dropdown_option_highlight {

0 commit comments

Comments
 (0)