diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index c7610219f7..a343d1c971 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -562,6 +562,13 @@ export default React.createClass({ }); }, + _onShareClick: function() { + const ShareDialog = sdk.getComponent("dialogs.ShareDialog"); + Modal.createTrackedDialog('share community dialog', '', ShareDialog, { + target: this._matrixClient.getGroup(this.props.groupId), + }); + }, + _onCancelClick: function() { this._closeSettings(); }, @@ -1207,6 +1214,7 @@ export default React.createClass({ shortDescNode = { summary.profile.short_description }; } } + if (this.state.editing) { rightButtons.push( , ); } + rightButtons.push( + + + , + ); if (this.props.collapsedRhs) { rightButtons.push( ; }, + onSelfShareClick: function() { + const cli = MatrixClientPeg.get(); + const ShareDialog = sdk.getComponent("dialogs.ShareDialog"); + Modal.createTrackedDialog('share self dialog', '', ShareDialog, { + target: cli.getUser(this._me), + }); + }, + _showSpoiler: function(event) { const target = event.target; target.innerHTML = target.getAttribute('data-spoiler'); @@ -1295,10 +1303,13 @@ module.exports = React.createClass({
- { _t("Logged in as:") } { this._me } + { _t("Logged in as:") + ' ' } + + { this._me } +
- { _t('Access Token:') } + { _t('Access Token:') + ' ' } diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 2789c0e4cd..20c0fb8414 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -632,6 +632,13 @@ module.exports = withMatrixClient(React.createClass({ ); }, + onShareUserClick: function() { + const ShareDialog = sdk.getComponent("dialogs.ShareDialog"); + Modal.createTrackedDialog('share room member dialog', '', ShareDialog, { + target: this.props.member, + }); + }, + _renderUserOptions: function() { const cli = this.props.matrixClient; const member = this.props.member; @@ -705,13 +712,18 @@ module.exports = withMatrixClient(React.createClass({ } } - if (!ignoreButton && !readReceiptButton && !insertPillButton && !inviteUserButton) return null; + const shareUserButton = ( + + { _t('Share Link to User') } + + ); return (

{ _t("User Options") }

{ readReceiptButton } + { shareUserButton } { insertPillButton } { ignoreButton } { inviteUserButton } diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index 1851e03383..e40c715052 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -149,6 +149,13 @@ module.exports = React.createClass({ dis.dispatch({ action: 'show_right_panel' }); }, + onShareRoomClick: function(ev) { + const ShareDialog = sdk.getComponent("dialogs.ShareDialog"); + Modal.createTrackedDialog('share room dialog', '', ShareDialog, { + target: this.props.room, + }); + }, + _hasUnreadPins: function() { const currentPinEvent = this.props.room.currentState.getStateEvents("m.room.pinned_events", ''); if (!currentPinEvent) return false; @@ -379,6 +386,14 @@ module.exports = React.createClass({ ; } + let shareRoomButton; + if (this.props.inRoom) { + shareRoomButton = + + + ; + } + let rightPanelButtons; if (this.props.collapsedRhs) { rightPanelButtons = @@ -400,6 +415,7 @@ module.exports = React.createClass({
{ settingsButton } { pinnedEventsButton } + { shareRoomButton } { manageIntegsButton } { forgetButton } { searchButton }