Skip to content

Commit fcfec16

Browse files
author
Weblate
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents a3b82bc + 7c7ae3a commit fcfec16

5 files changed

Lines changed: 50 additions & 39 deletions

File tree

‎src/components/structures/LeftPanel.js‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
import React from 'react';
2020
import { DragDropContext } from 'react-dnd';
2121
import HTML5Backend from 'react-dnd-html5-backend';
22+
import classNames from 'classnames';
2223
import KeyCode from 'matrix-react-sdk/lib/KeyCode';
2324
import sdk from 'matrix-react-sdk';
2425
import dis from 'matrix-react-sdk/lib/dispatcher';
@@ -55,7 +56,7 @@ var LeftPanel = React.createClass({
5556
// We just need to update if any of these things change.
5657
if (
5758
this.props.collapsed !== nextProps.collapsed ||
58-
this.props.opacity !== nextProps.opacity
59+
this.props.disabled !== nextProps.disabled
5960
) {
6061
return true;
6162
}
@@ -176,14 +177,16 @@ var LeftPanel = React.createClass({
176177
topBox = <SearchBox collapsed={ this.props.collapsed } onSearch={ this.onSearch } />;
177178
}
178179

179-
let classes = "mx_LeftPanel mx_fadable";
180-
if (this.props.collapsed) {
181-
classes += " collapsed";
182-
}
180+
let classes = classNames(
181+
"mx_LeftPanel", "mx_fadable",
182+
{
183+
"collapsed": this.props.collapsed,
184+
"mx_fadable_faded": this.props.disabled,
185+
}
186+
);
183187

184188
return (
185-
<aside className={classes} style={{ opacity: this.props.opacity }}
186-
onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
189+
<aside className={classes} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
187190
{ topBox }
188191
<CallPreview ConferenceHandler={VectorConferenceHandler} />
189192
<RoomList

‎src/components/structures/RightPanel.js‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ limitations under the License.
1818

1919
import React from 'react';
2020
import PropTypes from 'prop-types';
21+
import classNames from 'classnames';
2122
import { _t } from 'matrix-react-sdk/lib/languageHandler';
2223
import sdk from 'matrix-react-sdk';
2324
import dis from 'matrix-react-sdk/lib/dispatcher';
@@ -345,13 +346,16 @@ module.exports = React.createClass({
345346
);
346347
}
347348

348-
let classes = "mx_RightPanel mx_fadable";
349-
if (this.props.collapsed) {
350-
classes += " collapsed";
351-
}
349+
let classes = classNames(
350+
"mx_RightPanel", "mx_fadable",
351+
{
352+
"collapsed": this.props.collapsed,
353+
"mx_fadable_faded": this.props.disabled,
354+
}
355+
);
352356

353357
return (
354-
<aside className={classes} style={{ opacity: this.props.opacity }}>
358+
<aside className={classes}>
355359
<div className="mx_RightPanel_header">
356360
<div className="mx_RightPanel_headerButtonGroup">
357361
{headerButtons}

‎src/components/structures/RoomDirectory.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ module.exports = React.createClass({
8989
});
9090

9191
// dis.dispatch({
92-
// action: 'ui_opacity',
93-
// sideOpacity: 0.3,
94-
// middleOpacity: 0.3,
92+
// action: 'panel_disable',
93+
// sideDisabled: true,
94+
// middleDisabled: true,
9595
// });
9696
},
9797

9898
componentWillUnmount: function() {
9999
// dis.dispatch({
100-
// action: 'ui_opacity',
101-
// sideOpacity: 1.0,
102-
// middleOpacity: 1.0,
100+
// action: 'panel_disable',
101+
// sideDisabled: false,
102+
// middleDisabled: false,
103103
// });
104104
if (this.filterTimeout) {
105105
clearTimeout(this.filterTimeout);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ textarea {
8787
transition: opacity 0.2s ease-in-out;
8888
}
8989

90+
.mx_fadable.mx_fadable_faded {
91+
opacity: 0.3;
92+
pointer-events: none;
93+
}
94+
9095
/* XXX: critical hack to GeminiScrollbar to allow them to work in FF 42 and Chrome 48.
9196
Stop the scrollbar view from pushing out the container's overall sizing, which causes
9297
flexbox to adapt to the new size and cause the view to keep growing.

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

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,32 @@ limitations under the License.
8080
max-width: 1920px ! important;
8181
}
8282

83-
.mx_RoomView_topUnreadMessagesBar {
83+
84+
.mx_RoomView_body {
8485
order: 3;
86+
flex: 1 1 0;
87+
flex-direction: column;
88+
display: flex;
8589
}
8690

87-
.mx_RoomView_messagePanel {
88-
order: 4;
91+
.mx_RoomView_body .mx_RoomView_topUnreadMessagesBar {
92+
order: 1;
93+
}
8994

90-
flex: 1 1 0;
95+
.mx_RoomView_body .mx_RoomView_messagePanel {
96+
order: 2;
97+
}
9198

92-
width: 100%;
99+
.mx_RoomView_body .mx_RoomView_statusArea {
100+
order: 3;
101+
}
102+
103+
.mx_RoomView_body .mx_MessageComposer {
104+
order: 4;
105+
}
93106

107+
.mx_RoomView_messagePanel {
108+
width: 100%;
94109
overflow-y: auto;
95110
}
96111

@@ -131,18 +146,6 @@ limitations under the License.
131146
clear: both;
132147
}
133148

134-
.mx_RoomView_invitePrompt {
135-
order: 2;
136-
137-
min-width: 0px;
138-
max-width: 960px;
139-
width: 100%;
140-
margin: auto;
141-
142-
margin-top: 12px;
143-
margin-bottom: 12px;
144-
}
145-
146149
li.mx_RoomView_myReadMarker_container {
147150
height: 0px;
148151
margin: 0px;
@@ -160,8 +163,6 @@ hr.mx_RoomView_myReadMarker {
160163
}
161164

162165
.mx_RoomView_statusArea {
163-
order: 5;
164-
165166
width: 100%;
166167
flex: 0 0 auto;
167168

@@ -236,8 +237,6 @@ hr.mx_RoomView_myReadMarker {
236237
}
237238

238239
.mx_RoomView .mx_MessageComposer {
239-
order: 6;
240-
241240
width: 100%;
242241
flex: 0 0 auto;
243242
margin-right: 2px;

0 commit comments

Comments
 (0)