From 9a1e7ad170e5dad8018b01d96d53622d279b9cbb Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 13 Jul 2017 00:27:03 +0100 Subject: [PATCH 01/34] Hide widget panel while it is being deleted. --- src/components/views/elements/AppTile.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js index 3c3f01c1cd..b875711df8 100644 --- a/src/components/views/elements/AppTile.js +++ b/src/components/views/elements/AppTile.js @@ -46,6 +46,7 @@ export default React.createClass({ loading: false, widgetUrl: this.props.url, error: null, + deleting: false, }; }, @@ -92,6 +93,7 @@ export default React.createClass({ _onDeleteClick: function() { console.log("Delete widget %s", this.props.id); + this.setState({deleting: true}); MatrixClientPeg.get().sendStateEvent( this.props.room.roomId, 'im.vector.modular.widgets', @@ -101,6 +103,7 @@ export default React.createClass({ console.log('Deleted widget'); }, (e) => { console.error('Failed to delete widget', e); + this.setState({deleting: false}); }); }, @@ -115,6 +118,12 @@ export default React.createClass({ render: function() { let appTileBody; + + // Don't render widget if it is in the process of being deleted + if (this.state.deleting) { + return
; + } + if (this.state.loading) { appTileBody = (
Loading...
From 381f685013c4298166a3fb1aa9506cc12406ec4c Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 13 Jul 2017 18:41:51 +0100 Subject: [PATCH 02/34] Start on editing groups --- src/components/structures/GroupView.js | 192 ++++++++++++++---- src/components/views/settings/ChangeAvatar.js | 51 +++-- 2 files changed, 189 insertions(+), 54 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 30d67202e7..5aa6b1d2a9 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -212,7 +212,20 @@ export default React.createClass({ }, _onSettingsClick: function() { - this.setState({editing: true}); + this.setState({ + editing: true, + profileForm: Object.assign({}, this.state.summary.profile), + }); + }, + + _onCancelClick: function() { + this.setState({ + editing: false, + profileForm: null, + }); + }, + + _onSaveClick: function() { }, _getFeaturedRoomsNode() { @@ -295,61 +308,162 @@ export default React.createClass({ const GroupAvatar = sdk.getComponent("avatars.GroupAvatar"); const Loader = sdk.getComponent("elements.Spinner"); const TintableSvg = sdk.getComponent("elements.TintableSvg"); + const ChangeAvatar = sdk.getComponent("settings.ChangeAvatar"); if (this.state.summary === null && this.state.error === null) { return ; - } else if (this.state.editing) { - return
; + } else if (false && this.state.editing) { + const summary = this.state.summary; + const avatarEdit = ( +
+
+ +
+
+ + +
+
+ ); + + return
+ {avatarEdit} + + + + {_t('Save')} + + + {_t("Cancel")}/ + +