Skip to content

Commit 2d153a7

Browse files
committed
Split up CSS; use .catch instead of .then
Signed-off-by: Travis Ralston <travpc@gmail.com>
1 parent 078ee54 commit 2d153a7

4 files changed

Lines changed: 69 additions & 52 deletions

File tree

‎src/components/views/context_menus/MessageContextMenu.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ module.exports = React.createClass({
135135

136136
onPinClick: function() {
137137
MatrixClientPeg.get().getStateEvent(this.props.mxEvent.getRoomId(), 'm.room.pinned_events', '')
138-
.then(null, e => {
138+
.catch(e => {
139139
// Intercept the Event Not Found error and fall through the promise chain with no event.
140140
if (e.errcode === "M_NOT_FOUND") return null;
141141
throw e;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
@import "./matrix-react-sdk/views/voip/_IncomingCallbox.scss";
6666
@import "./matrix-react-sdk/views/voip/_VideoView.scss";
6767
@import "./matrix-react-sdk/views/rooms/_PinnedEventsPanel.scss";
68+
@import "./matrix-react-sdk/views/rooms/_PinnedEventTile.scss";
6869
@import "./vector-web/_fonts.scss";
6970
@import "./vector-web/structures/_CompatibilityPage.scss";
7071
@import "./vector-web/structures/_HomePage.scss";
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
Copyright 2017 Travis Ralston
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_PinnedEventTile {
18+
min-height: 40px;
19+
margin-bottom: 5px;
20+
width: 100%;
21+
border-radius: 5px; // for the hover
22+
}
23+
24+
.mx_PinnedEventTile:hover {
25+
background-color: $event-selected-color;
26+
}
27+
28+
.mx_PinnedEventTile .mx_PinnedEventTile_sender {
29+
color: #868686;
30+
font-size: 0.8em;
31+
vertical-align: top;
32+
display: block;
33+
padding-bottom: 3px;
34+
}
35+
36+
.mx_PinnedEventTile .mx_EventTile_content {
37+
margin-left: 50px;
38+
position: relative;
39+
top: 0;
40+
left: 0;
41+
}
42+
43+
.mx_PinnedEventTile .mx_BaseAvatar {
44+
float: left;
45+
margin-right: 10px;
46+
}
47+
48+
.mx_PinnedEventTile:hover .mx_PinnedEventTile_actions {
49+
display: block;
50+
}
51+
52+
.mx_PinnedEventTile_actions {
53+
float: right;
54+
margin-right: 10px;
55+
display: none;
56+
}
57+
58+
.mx_PinnedEventTile_unpinButton {
59+
display: inline-block;
60+
cursor: pointer;
61+
margin-left: 10px;
62+
}
63+
64+
.mx_PinnedEventTile_gotoButton {
65+
display: inline-block;
66+
font-size: 0.8em;
67+
}

‎src/skins/vector/css/matrix-react-sdk/views/rooms/_PinnedEventsPanel.scss‎

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -30,59 +30,8 @@ limitations under the License.
3030
padding-bottom: 15px;
3131
}
3232

33-
.mx_PinnedEventTile {
34-
min-height: 40px;
35-
margin-bottom: 5px;
36-
width: 100%;
37-
border-radius: 5px; // for the hover
38-
}
39-
40-
.mx_PinnedEventTile:hover {
41-
background-color: $event-selected-color;
42-
}
43-
44-
.mx_PinnedEventTile .mx_PinnedEventTile_sender {
45-
color: #868686;
46-
font-size: 0.8em;
47-
vertical-align: top;
48-
display: block;
49-
padding-bottom: 3px;
50-
}
51-
52-
.mx_PinnedEventTile .mx_EventTile_content {
53-
margin-left: 50px;
54-
position: relative;
55-
top: 0;
56-
left: 0;
57-
}
58-
59-
.mx_PinnedEventTile .mx_BaseAvatar {
60-
float: left;
61-
margin-right: 10px;
62-
}
63-
6433
.mx_PinnedEventsPanel_cancel {
6534
margin: 12px;
6635
float: right;
6736
display: inline-block;
6837
}
69-
70-
.mx_PinnedEventTile:hover .mx_PinnedEventTile_actions {
71-
display: block;
72-
}
73-
74-
.mx_PinnedEventTile_actions {
75-
float: right;
76-
margin-right: 10px;
77-
display: none;
78-
}
79-
80-
.mx_PinnedEventTile_unpinButton {
81-
cursor: pointer;
82-
margin-left: 10px;
83-
}
84-
85-
.mx_PinnedEventTile_gotoButton {
86-
display: inline-block;
87-
font-size: 0.8em;
88-
}

0 commit comments

Comments
 (0)