From 9c86a655ca9c9a76b73f6eddb15e619b51400ea0 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Sep 2017 17:46:53 +0100 Subject: [PATCH 1/2] Add button to get to MyGroups --- src/components/structures/BottomLeftMenu.js | 2 + .../structures/_MyGroups.scss | 10 ++ src/skins/vector/img/icons-groups.svg | 127 ++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 src/skins/vector/img/icons-groups.svg diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index eacc500a..89a5f454 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -167,6 +167,7 @@ module.exports = React.createClass({ const StartChatButton = sdk.getComponent('elements.StartChatButton'); const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton'); const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton'); + const GroupsButton = sdk.getComponent('elements.GroupsButton'); const SettingsButton = sdk.getComponent('elements.SettingsButton'); return ( @@ -182,6 +183,7 @@ module.exports = React.createClass({
+ diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss index 8de7b20f..25ab3ddc 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss +++ b/src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss @@ -14,6 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ +.mx_MyGroups { + max-width: 960px; + margin-left: auto; + margin-right: auto; +} + +.mx_MyGroups .mx_RoomHeader_simpleHeader { + margin-left: 0px; +} + .mx_MyGroups_joinCreateBox { display: table; margin-bottom: 30px; diff --git a/src/skins/vector/img/icons-groups.svg b/src/skins/vector/img/icons-groups.svg new file mode 100644 index 00000000..35ced645 --- /dev/null +++ b/src/skins/vector/img/icons-groups.svg @@ -0,0 +1,127 @@ + + + + + + image/svg+xml + + 81230A28-D944-4572-B5DB-C03CAA2B1FCA + + + + + + 81230A28-D944-4572-B5DB-C03CAA2B1FCA + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + + + + + + From 47919bc291a9ec46b1b1314758a1c86dead02966 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 29 Sep 2017 10:39:49 +0100 Subject: [PATCH 2/2] Honour the Groups feature flag --- src/components/structures/BottomLeftMenu.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index 89a5f454..4014261c 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -19,9 +19,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import sdk from 'matrix-react-sdk'; import dis from 'matrix-react-sdk/lib/dispatcher'; -import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton'; import Velocity from 'velocity-vector'; import 'velocity-vector/velocity.ui'; +import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; const CALLOUT_ANIM_DURATION = 1000; @@ -170,6 +170,9 @@ module.exports = React.createClass({ const GroupsButton = sdk.getComponent('elements.GroupsButton'); const SettingsButton = sdk.getComponent('elements.SettingsButton'); + const groupsButton = UserSettingsStore.isFeatureEnabled('feature_groups') ? + : null; + return (
@@ -183,7 +186,7 @@ module.exports = React.createClass({
- + { groupsButton }