Skip to content

Commit 5544270

Browse files
authored
Merge pull request element-hq#5131 from vector-im/luke/groups-button
Add button to get to MyGroups
2 parents bb64e9a + 47919bc commit 5544270

3 files changed

Lines changed: 143 additions & 1 deletion

File tree

‎src/components/structures/BottomLeftMenu.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import React from 'react';
1919
import ReactDOM from 'react-dom';
2020
import sdk from 'matrix-react-sdk';
2121
import dis from 'matrix-react-sdk/lib/dispatcher';
22-
import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton';
2322
import Velocity from 'velocity-vector';
2423
import 'velocity-vector/velocity.ui';
24+
import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
2525

2626
const CALLOUT_ANIM_DURATION = 1000;
2727

@@ -167,8 +167,12 @@ module.exports = React.createClass({
167167
const StartChatButton = sdk.getComponent('elements.StartChatButton');
168168
const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
169169
const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
170+
const GroupsButton = sdk.getComponent('elements.GroupsButton');
170171
const SettingsButton = sdk.getComponent('elements.SettingsButton');
171172

173+
const groupsButton = UserSettingsStore.isFeatureEnabled('feature_groups') ?
174+
<GroupsButton tooltip={true} /> : null;
175+
172176
return (
173177
<div className="mx_BottomLeftMenu">
174178
<div className="mx_BottomLeftMenu_options">
@@ -182,6 +186,7 @@ module.exports = React.createClass({
182186
<div ref={this._collectCreateRoomButton}>
183187
<CreateRoomButton tooltip={true} />
184188
</div>
189+
{ groupsButton }
185190
<span className="mx_BottomLeftMenu_settings">
186191
<SettingsButton tooltip={true} />
187192
</span>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
.mx_MyGroups {
18+
max-width: 960px;
19+
margin-left: auto;
20+
margin-right: auto;
21+
}
22+
23+
.mx_MyGroups .mx_RoomHeader_simpleHeader {
24+
margin-left: 0px;
25+
}
26+
1727
.mx_MyGroups_joinCreateBox {
1828
display: table;
1929
margin-bottom: 30px;
Lines changed: 127 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)