+ ;
+ },
+});
+
+export default GroupTile;
diff --git a/src/components/views/groups/GroupUserSettings.js b/src/components/views/groups/GroupUserSettings.js
new file mode 100644
index 0000000000..755d6aae8f
--- /dev/null
+++ b/src/components/views/groups/GroupUserSettings.js
@@ -0,0 +1,89 @@
+/*
+Copyright 2017 New Vector Ltd
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import GeminiScrollbar from 'react-gemini-scrollbar';
+import sdk from '../../../index';
+import { MatrixClient } from 'matrix-js-sdk';
+import { _t } from '../../../languageHandler';
+
+export default React.createClass({
+ displayName: 'GroupUserSettings',
+
+ contextTypes: {
+ matrixClient: PropTypes.instanceOf(MatrixClient),
+ },
+
+ getInitialState() {
+ return {
+ error: null,
+ groups: null,
+ };
+ },
+
+ componentWillMount: function() {
+ this.context.matrixClient.getJoinedGroups().done((result) => {
+ this.setState({groups: result.groups || [], error: null});
+ }, (err) => {
+ console.error(err);
+ this.setState({groups: null, error: err});
+ });
+ },
+
+ _renderGroupPublicity() {
+ let text = "";
+ let scrollbox = ;
+ const groups = this.state.groups;
+
+ if (this.state.error) {
+ text = _t('Something went wrong when trying to get your communities.');
+ } else if (groups === null) {
+ text = _t('Loading...');
+ } else if (groups.length > 0) {
+ const GroupPublicityToggle = sdk.getComponent('groups.GroupPublicityToggle');
+ const groupPublicityToggles = groups.map((groupId, index) => {
+ return ;
+ });
+ text = _t('Display your community flair in rooms configured to show it.');
+ scrollbox =
+
+ { groupPublicityToggles }
+
+
;
+ } else {
+ text = _t("You're not currently a member of any communities.");
+ }
+
+ return
;
+ },
+});
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 06ad6ea15d..8f672fb653 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -521,6 +521,8 @@
"Failed to withdraw invitation": "Failed to withdraw invitation",
"Failed to remove user from community": "Failed to remove user from community",
"Filter community members": "Filter community members",
+ "Flair will appear if enabled in room settings": "Flair will appear if enabled in room settings",
+ "Flair will not appear": "Flair will not appear",
"Are you sure you want to remove '%(roomName)s' from %(groupId)s?": "Are you sure you want to remove '%(roomName)s' from %(groupId)s?",
"Removing a room from the community will also remove it from the community page.": "Removing a room from the community will also remove it from the community page.",
"Remove": "Remove",
@@ -532,6 +534,10 @@
"Visible to everyone": "Visible to everyone",
"Only visible to community members": "Only visible to community members",
"Filter community rooms": "Filter community rooms",
+ "Something went wrong when trying to get your communities.": "Something went wrong when trying to get your communities.",
+ "Display your community flair in rooms configured to show it.": "Display your community flair in rooms configured to show it.",
+ "You're not currently a member of any communities.": "You're not currently a member of any communities.",
+ "Flair": "Flair",
"Unknown Address": "Unknown Address",
"NOTE: Apps are not end-to-end encrypted": "NOTE: Apps are not end-to-end encrypted",
"Do you want to load widget from URL:": "Do you want to load widget from URL:",
@@ -727,8 +733,6 @@
"%(inviter)s has invited you to join this community": "%(inviter)s has invited you to join this community",
"You are an administrator of this community": "You are an administrator of this community",
"You are a member of this community": "You are a member of this community",
- "Community Member Settings": "Community Member Settings",
- "Publish this community on your profile": "Publish this community on your profile",
"Your community hasn't got a Long Description, a HTML page to show to community members. Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members. Click here to open settings and give it one!",
"Long Description (HTML)": "Long Description (HTML)",
"Description": "Description",
@@ -744,7 +748,6 @@
"For security, this session has been signed out. Please sign in again.": "For security, this session has been signed out. Please sign in again.",
"Logout": "Logout",
"Your Communities": "Your Communities",
- "You're not currently a member of any communities.": "You're not currently a member of any communities.",
"Error whilst fetching joined communities": "Error whilst fetching joined communities",
"Create a new community": "Create a new community",
"Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.": "Create a community to group together users and rooms! Build a custom homepage to mark out your space in the Matrix universe.",