mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 20:36:57 +03:00
Merge pull request #6140 from vector-im/luke/fix-tag-panel-css
Fix LeftPanel size being incorrect when TagPanel disabled
This commit is contained in:
commit
8c1d2a4555
2 changed files with 19 additions and 2 deletions
|
@ -238,15 +238,21 @@ var LeftPanel = React.createClass({
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const tagPanelEnabled = SettingsStore.isFeatureEnabled("feature_tag_panel");
|
||||||
|
const tagPanel = tagPanelEnabled ? <TagPanel /> : <div />;
|
||||||
|
|
||||||
const containerClasses = classNames(
|
const containerClasses = classNames(
|
||||||
"mx_LeftPanel_container",
|
"mx_LeftPanel_container",
|
||||||
{ "mx_LeftPanel_container_collapsed": this.props.collapsed },
|
{
|
||||||
|
"mx_LeftPanel_container_collapsed": this.props.collapsed,
|
||||||
|
"mx_LeftPanel_container_hasTagPanel": tagPanelEnabled,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DragDropContext onDragEnd={this.onDragEnd}>
|
<DragDropContext onDragEnd={this.onDragEnd}>
|
||||||
<div className={containerClasses}>
|
<div className={containerClasses}>
|
||||||
{ SettingsStore.isFeatureEnabled("feature_tag_panel") ? <TagPanel /> : <div /> }
|
{ tagPanel }
|
||||||
<aside className={classes} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
|
<aside className={classes} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
|
||||||
{ topBox }
|
{ topBox }
|
||||||
<CallPreview ConferenceHandler={VectorConferenceHandler} />
|
<CallPreview ConferenceHandler={VectorConferenceHandler} />
|
||||||
|
|
|
@ -23,10 +23,21 @@ limitations under the License.
|
||||||
|
|
||||||
.mx_LeftPanel_container {
|
.mx_LeftPanel_container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
/* LeftPanel 235px */
|
||||||
|
flex: 0 0 235px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_LeftPanel_container.mx_LeftPanel_container_hasTagPanel {
|
||||||
|
/* TagPanel 60px + LeftPanel 235px */
|
||||||
flex: 0 0 295px;
|
flex: 0 0 295px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_LeftPanel_container_collapsed {
|
.mx_LeftPanel_container_collapsed {
|
||||||
|
/* Collapsed LeftPanel 60px */
|
||||||
|
flex: 0 0 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mx_LeftPanel_container_collapsed.mx_LeftPanel_container_hasTagPanel {
|
||||||
/* TagPanel 60px + Collapsed LeftPanel 60px */
|
/* TagPanel 60px + Collapsed LeftPanel 60px */
|
||||||
flex: 0 0 120px;
|
flex: 0 0 120px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue