diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 88c73b75a8..3f321d453d 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -79,7 +79,7 @@ export default React.createClass({ } let nameNode; - if (summary.profile.name) { + if (summary.profile && summary.profile.name) { nameNode =
{summary.profile.name} @@ -92,6 +92,8 @@ export default React.createClass({
; } + const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; + return (
@@ -99,7 +101,7 @@ export default React.createClass({
diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 49a2367db8..3eb694acce 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -61,9 +61,6 @@ export default withMatrixClient(React.createClass({ this._fetch(); }, - componentWillUnmount: function() { - }, - _onCreateGroupClick: function() { const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog"); Modal.createDialog(CreateGroupDialog); @@ -73,7 +70,7 @@ export default withMatrixClient(React.createClass({ this.props.matrixClient.getJoinedGroups().done((result) => { this.setState({groups: result.groups, error: null}); }, (err) => { - this.setState({result: null, error: err}); + this.setState({groups: null, error: err}); }); }, @@ -93,12 +90,12 @@ export default withMatrixClient(React.createClass({ ); }); content =
-
{_t('You are a member of these groups')}:
+
{_t('You are a member of these groups:')}
{groupNodes}
; } else if (this.state.error) { content =
- Error whilst fetching joined groups + {_t('Error whilst fetching joined groups')}
; } else { content = ; diff --git a/src/components/views/dialogs/CreateGroupDialog.js b/src/components/views/dialogs/CreateGroupDialog.js index c436d938df..23194f20a5 100644 --- a/src/components/views/dialogs/CreateGroupDialog.js +++ b/src/components/views/dialogs/CreateGroupDialog.js @@ -130,10 +130,10 @@ export default React.createClass({ render: function() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const Loader = sdk.getComponent("elements.Spinner"); + const Spinner = sdk.getComponent('elements.Spinner'); if (this.state.creating) { - return ; + return ; } let createErrorNode; @@ -154,29 +154,32 @@ export default React.createClass({ >
-
- +
+
+ +
+
+ +
-
- -
-
-
- -
-
- +
+
+ +
+
+ +
{this.state.groupIdError} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 6647126c28..dbef0fc7fe 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -948,9 +948,10 @@ "Group IDs must be of the form +localpart:%(domain)s": "Group IDs must be of the form +localpart:%(domain)s", "It is currently only possible to create groups on your own home server: use a group ID ending with %(domain)s": "It is currently only possible to create groups on your own home server: use a group ID ending with %(domain)s", "Room creation failed": "Room creation failed", - "You are a member of these groups": "You are a member of these groups", + "You are a member of these groups:": "You are a member of these groups:", "Create a group to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.": "Create a group to represent your community! Define a set of rooms and your own custom homepage to mark out your space in the Matrix universe.", "Join an existing group": "Join an existing group", "To join an exisitng group you'll have to know its group identifier; this will look something like +example:matrix.org.": "To join an exisitng group you'll have to know its group identifier; this will look something like +example:matrix.org.", - "Autocomplete Delay (ms):": "Autocomplete Delay (ms):" + "Autocomplete Delay (ms):": "Autocomplete Delay (ms):", + "Error whilst fetching joined groups": "Error whilst fetching joined groups" }