Skip to content

Commit 7b3eea0

Browse files
committed
experiment with trying to turn UserSettings into a controller-less 'wiring component' which wires together a series of smaller components (in this case, so small they're mainly <input/s>
1 parent 88c5a5e commit 7b3eea0

5 files changed

Lines changed: 334 additions & 51 deletions

File tree

‎src/skins/vector/css/molecules/RoomHeader.css‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,16 @@ limitations under the License.
9494
font-size: 24px;
9595
font-weight: bold;
9696
overflow: hidden;
97+
margin-left: 63px;
9798
text-overflow: ellipsis;
99+
width: 100%;
100+
}
101+
102+
.mx_RoomHeader_simpleHeaderCancel {
103+
float: right;
104+
margin-top: 8px;
105+
padding: 24px;
106+
cursor: pointer;
98107
}
99108

100109
.mx_RoomHeader_name {

‎src/skins/vector/css/organisms/UserSettings.css‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,101 @@ limitations under the License.
1919
margin-left: auto;
2020
margin-right: auto;
2121
}
22+
23+
.mx_UserSettings_spinner {
24+
display: inline-block;
25+
vertical-align: middle;
26+
margin-right: 12px;
27+
width: 32px;
28+
height: 32px;
29+
}
30+
31+
.mx_UserSettings_button {
32+
display: inline;
33+
vertical-align: middle;
34+
border: 0px;
35+
height: 36px;
36+
border-radius: 36px;
37+
font-weight: 400;
38+
font-size: 16px;
39+
color: #fff;
40+
background-color: #76cfa6;
41+
width: auto;
42+
margin: auto;
43+
padding: 7px;
44+
padding-left: 1.5em;
45+
padding-right: 1.5em;
46+
cursor: pointer;
47+
}
48+
49+
.mx_UserSettings h2 {
50+
clear: both;
51+
margin-top: 32px;
52+
margin-bottom: 8px;
53+
margin-left: 63px;
54+
padding-bottom: 6px;
55+
border-bottom: 1px solid #eee;
56+
}
57+
58+
.mx_UserSettings_section {
59+
margin-left: 63px;
60+
margin-top: 28px;
61+
margin-bottom: 28px;
62+
}
63+
64+
.mx_UserSettings_profileTable,
65+
.mx_UserSettings_notifTable
66+
{
67+
display: table;
68+
}
69+
70+
.mx_UserSettings_profileTableRow,
71+
.mx_UserSettings_notifTableRow
72+
{
73+
display: table-row;
74+
}
75+
76+
.mx_UserSettings_profileLabelCell
77+
{
78+
padding-bottom: 21px;
79+
display: table-cell;
80+
font-weight: bold;
81+
padding-right: 24px;
82+
}
83+
84+
.mx_UserSettings_profileInputCell {
85+
display: table-cell;
86+
padding-bottom: 21px;
87+
width: 240px;
88+
}
89+
90+
.mx_UserSettings_profileInputCell input {
91+
border: 0px;
92+
border-bottom: 1px solid rgba(151, 151, 151, 0.5);
93+
padding: 0px;
94+
width: 240px;
95+
color: rgba(74, 74, 74, 0.9);
96+
font-family: 'Myriad Pro', Helvetica, Arial, Sans-Serif;
97+
font-size: 16px;
98+
}
99+
100+
.mx_UserSettings_notifInputCell {
101+
display: table-cell;
102+
padding-bottom: 21px;
103+
padding-right: 8px;
104+
width: 16px;
105+
}
106+
107+
.mx_UserSettings_notifLabelCell
108+
{
109+
padding-bottom: 21px;
110+
width: 270px;
111+
display: table-cell;
112+
}
113+
114+
.mx_UserSettings_logout,
115+
.mx_UserSettings_save {
116+
float: right;
117+
margin-right: 24px;
118+
margin-bottom: 24px;
119+
}

‎src/skins/vector/views/molecules/RoomHeader.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ module.exports = React.createClass({
4848

4949
var header;
5050
if (this.props.simpleHeader) {
51+
var cancel;
52+
if (this.props.onCancelClick) {
53+
cancel = <img className="mx_RoomHeader_simpleHeaderCancel" src="img/cancel-black.png" onClick={ this.props.onCancelClick } alt="Close" width="18" height="18"/>
54+
}
5155
header =
5256
<div className="mx_RoomHeader_wrapper">
5357
<div className="mx_RoomHeader_simpleHeader">
5458
{ this.props.simpleHeader }
59+
{ cancel }
5560
</div>
5661
</div>
5762
}

0 commit comments

Comments
 (0)