Skip to content

Commit 538536e

Browse files
committed
vaguely make room editing prettier
1 parent 904754b commit 538536e

8 files changed

Lines changed: 76 additions & 26 deletions

File tree

‎skins/base/css/molecules/RoomHeader.css‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ limitations under the License.
4040
-webkit-order: 1;
4141
order: 1;
4242

43-
width: 100%;
43+
flex: 1;
4444
}
4545

46-
.mx_RoomHeader_hangupButton {
46+
.mx_RoomHeader_textButton {
4747
height: 48px;
4848
margin-top: 18px;
4949
background-color: #80cef4;
@@ -75,9 +75,6 @@ limitations under the License.
7575
-ms-flex-order: 3;
7676
-webkit-order: 3;
7777
order: 3;
78-
79-
-webkit-flex: 0 0 200px;
80-
flex: 0 0 200px;
8178
}
8279

8380
.mx_RoomHeader_info {
@@ -107,6 +104,22 @@ limitations under the License.
107104
text-overflow: ellipsis;
108105
}
109106

107+
.mx_RoomHeader_nameEditing {
108+
padding-left: 16px;
109+
padding-right: 16px;
110+
margin-top: -5px;
111+
}
112+
113+
.mx_RoomHeader_nameInput {
114+
border-radius: 3px;
115+
width: 260px;
116+
border: 1px solid #c7c7c7;
117+
font-weight: 300;
118+
font-size: 14px;
119+
padding: 9px;
120+
margin-top: 6px;
121+
}
122+
110123
.mx_RoomHeader_topic {
111124
vertical-align: bottom;
112125
float: left;

‎skins/base/css/molecules/RoomSettings.css‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
.mx_RoomSettings {
1818
max-height: 250px;
19+
padding-top: 12px;
1920
}
2021

2122
.mx_RoomSettings_settings {
@@ -32,3 +33,33 @@ limitations under the License.
3233

3334
margin: 0 10px;
3435
}
36+
37+
.mx_RoomSettings input,
38+
.mx_RoomSettings textarea {
39+
border-radius: 3px;
40+
border: 1px solid #c7c7c7;
41+
font-weight: 300;
42+
font-size: 14px;
43+
padding: 9px;
44+
margin-top: 6px;
45+
}
46+
47+
.mx_RoomSettings_buttons {
48+
text-align: right;
49+
}
50+
51+
.mx_RoomSettings_button {
52+
display: inline;
53+
border: 0px;
54+
height: 36px;
55+
border-radius: 36px;
56+
font-weight: 400;
57+
font-size: 16px;
58+
color: #fff;
59+
background-color: #80cef4;
60+
width: auto;
61+
margin: auto;
62+
padding: 6px;
63+
padding-left: 1em;
64+
padding-right: 1em;
65+
}

‎skins/base/css/molecules/voip/VideoView.css‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ limitations under the License.
1818
width: 100%;
1919
position: relative;
2020
z-index: 30;
21-
margin-top: 12px;
2221
}
2322

2423
.mx_VideoView video {

‎skins/base/css/organisms/LeftPanel.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ limitations under the License.
3939
-webkit-order: 1;
4040
order: 1;
4141

42-
height: 100%;
4342
overflow-y: scroll;
43+
flex: 1;
4444
}
4545

4646
.mx_LeftPanel .mx_BottomLeftMenu {

‎skins/base/css/organisms/RoomView.css‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ limitations under the License.
4747
-webkit-order: 2;
4848
order: 2;
4949

50+
min-width: 0px;
5051
max-width: 720px;
5152
width: 100%;
5253
margin: auto;
5354

55+
border-bottom: 1px solid #a8dbf3;
56+
5457
overflow: scroll;
5558
-webkit-flex: 0 0 auto;
5659
flex: 0 0 auto;

‎skins/base/views/molecules/RoomHeader.js‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = React.createClass({
5757
case "ringback":
5858
case "connected":
5959
callButtons = (
60-
<div className="mx_RoomHeader_hangupButton" onClick={this.onHangupClick}>
60+
<div className="mx_RoomHeader_textButton" onClick={this.onHangupClick}>
6161
End call
6262
</div>
6363
);
@@ -72,15 +72,16 @@ module.exports = React.createClass({
7272
var actual_name = this.props.room.currentState.getStateEvents('m.room.name', '');
7373
if (actual_name) actual_name = actual_name.getContent().name;
7474
if (this.props.editing) {
75-
name = <input type="text" defaultValue={actual_name} placeholder="Name" ref="name_edit"/>;
76-
// if (topic) topic_el = <div className="mx_RoomHeader_topic"><textarea>{ topic.getContent().topic }</textarea></div>
77-
save_button = (
78-
<div className="mx_RoomHeader_button"onClick={this.props.onSaveClick}>
79-
Save
75+
name =
76+
<div className="mx_RoomHeader_nameEditing">
77+
<input className="mx_RoomHeader_nameInput" type="text" defaultValue={actual_name} placeholder="Name" ref="name_edit"/>
8078
</div>
81-
);
79+
// if (topic) topic_el = <div className="mx_RoomHeader_topic"><textarea>{ topic.getContent().topic }</textarea></div>
8280
} else {
83-
name = <EditableText label={this.props.room.name} initialValue={actual_name} placeHolder="Name" onValueChanged={this.onNameChange} />;
81+
name =
82+
<div className="mx_RoomHeader_name">
83+
<EditableText label={this.props.room.name} initialValue={actual_name} placeHolder="Name" onValueChanged={this.onNameChange} />
84+
</div>
8485
if (topic) topic_el = <div className="mx_RoomHeader_topic">{ topic.getContent().topic }</div>;
8586
settings_button = (
8687
<div className="mx_RoomHeader_button" onClick={this.props.onSettingsClick}>
@@ -96,15 +97,12 @@ module.exports = React.createClass({
9697
<img src={ MatrixClientPeg.get().getAvatarUrlForRoom(this.props.room, 48, 48, "crop") } width="48" height="48" alt=""/>
9798
</div>
9899
<div className="mx_RoomHeader_info">
99-
<div className="mx_RoomHeader_name">
100-
{ name }
101-
</div>
100+
{ name }
102101
{ topic_el }
103102
</div>
104103
</div>
105104
{callButtons}
106105
<div className="mx_RoomHeader_rightRow">
107-
{ save_button }
108106
{ settings_button }
109107
<div className="mx_RoomHeader_button">
110108
<img src="img/search.png" width="32" height="32"/>

‎skins/base/views/molecules/RoomSettings.js‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ module.exports = React.createClass({
128128

129129
return (
130130
<div className="mx_RoomSettings">
131-
<textarea placeholder="Description" defaultValue={topic} ref="topic"/> <br/>
131+
<textarea className="mx_RoomSettings_description" placeholder="Topic" defaultValue={topic} ref="topic"/> <br/>
132132
<label><input type="checkbox" ref="is_private" defaultChecked={join_rule != "public"}/> Make this room private</label> <br/>
133133
<label><input type="checkbox" ref="share_history" defaultChecked={history_visibility == "shared"}/> Share message history with new users</label> <br/>
134134
<label><input type="checkbox" /> Encrypt room</label> <br/>
135135

136-
Power levels:
136+
<h3>Power levels</h3>
137137
<div className="mx_RoomSettings_power_levels mx_RoomSettings_settings">
138138
<div>
139139
<label htmlFor="mx_RoomSettings_ban_level">Ban level</label>
@@ -173,7 +173,7 @@ module.exports = React.createClass({
173173
</div>
174174
</div>
175175

176-
User levels:
176+
<h3>User levels</h3>
177177
<div className="mx_RoomSettings_user_levels mx_RoomSettings_settings">
178178
{Object.keys(user_levels).map(function(user, i) {
179179
return (
@@ -185,7 +185,7 @@ module.exports = React.createClass({
185185
})}
186186
</div>
187187

188-
Event levels:
188+
<h3>Event levels</h3>
189189
<div className="mx_RoomSettings_event_lvels mx_RoomSettings_settings">
190190
{Object.keys(events_levels).map(function(event_type, i) {
191191
return (
@@ -197,7 +197,7 @@ module.exports = React.createClass({
197197
})}
198198
</div>
199199

200-
Banned users:
200+
<h3>Banned users</h3>
201201
<div className="mx_RoomSettings_banned">
202202
{banned.map(function(member, i) {
203203
return (
@@ -207,6 +207,12 @@ module.exports = React.createClass({
207207
);
208208
})}
209209
</div>
210+
211+
<div className="mx_RoomSettings_buttons">
212+
<div className="mx_RoomSettings_button" onClick={this.props.onSaveClick}>
213+
Save this room
214+
</div>
215+
</div>
210216
</div>
211217
);
212218
}

‎skins/base/views/organisms/RoomView.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ module.exports = React.createClass({
133133
var roomEdit = null;
134134

135135
if (this.state.editingRoomSettings) {
136-
roomEdit = <RoomSettings ref="room_settings" room={this.state.room} />;
136+
roomEdit = <RoomSettings ref="room_settings" onSaveClick={this.onSaveClick} room={this.state.room} />;
137137
}
138138

139139
if (this.state.uploadingRoomSettings) {
@@ -143,7 +143,7 @@ module.exports = React.createClass({
143143
return (
144144
<div className="mx_RoomView">
145145
<RoomHeader ref="header" room={this.state.room} editing={this.state.editingRoomSettings}
146-
onSettingsClick={this.onSettingsClick} onSaveClick={this.onSaveClick}/>
146+
onSettingsClick={this.onSettingsClick}/>
147147
<div className="mx_RoomView_auxPanel">
148148
<CallView room={this.state.room}/>
149149
{ roomEdit }

0 commit comments

Comments
 (0)