diff --git a/app/soapbox/components/status_action_bar.js b/app/soapbox/components/status_action_bar.js index 579617145..1ee84ca00 100644 --- a/app/soapbox/components/status_action_bar.js +++ b/app/soapbox/components/status_action_bar.js @@ -367,9 +367,7 @@ class StatusActionBar extends ImmutablePureComponent { onMouseLeave={this.handleLikeButtonLeave} ref={this.setRef} > - { emojiSelectorVisible && - - } + { }; }; -const mapDispatchToProps = (dispatch) => ({ - -}); - -export default @connect(mapStateToProps, mapDispatchToProps) +export default @connect(mapStateToProps) @injectIntl class ProfileHoverCardContainer extends ImmutablePureComponent { @@ -32,6 +29,7 @@ class ProfileHoverCardContainer extends ImmutablePureComponent { accountId: PropTypes.string, account: ImmutablePropTypes.map, intl: PropTypes.object.isRequired, + dispatch: PropTypes.func.isRequired, } static defaultProps = { @@ -47,6 +45,10 @@ class ProfileHoverCardContainer extends ImmutablePureComponent { return badges; } + componentDidMount() { + this.props.dispatch(fetchRelationships([this.props.accountId])); + } + render() { const { visible, accountId, account } = this.props; if (!accountId) return null; @@ -61,7 +63,7 @@ class ProfileHoverCardContainer extends ImmutablePureComponent { } -
+
{badges.length > 0 &&
diff --git a/app/soapbox/features/status/components/action_bar.js b/app/soapbox/features/status/components/action_bar.js index de3969f27..c5db0cab5 100644 --- a/app/soapbox/features/status/components/action_bar.js +++ b/app/soapbox/features/status/components/action_bar.js @@ -311,9 +311,7 @@ class ActionBar extends React.PureComponent { onMouseLeave={this.handleLikeButtonLeave} ref={this.setRef} > - { emojiSelectorVisible && - - } +
- + { profileCardVisible && + + } {status.get('group') && ( diff --git a/app/soapbox/features/ui/components/action_button.js b/app/soapbox/features/ui/components/action_button.js index e1c88d232..b0b114ee6 100644 --- a/app/soapbox/features/ui/components/action_button.js +++ b/app/soapbox/features/ui/components/action_button.js @@ -17,6 +17,7 @@ const messages = defineMessages({ unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' }, follow: { id: 'account.follow', defaultMessage: 'Follow' }, requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' }, + requested_small: { id: 'account.requested_small', defaultMessage: 'Awaiting approval' }, unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' }, }); @@ -55,8 +56,13 @@ class ActionButton extends ImmutablePureComponent { onFollow: PropTypes.func.isRequired, onBlock: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, + small: PropTypes.bool, }; + static defaultProps = { + small: false, + } + componentDidMount() { window.addEventListener('resize', this.handleResize, { passive: true }); } @@ -74,7 +80,7 @@ class ActionButton extends ImmutablePureComponent { } render() { - const { account, intl, me } = this.props; + const { account, intl, me, small } = this.props; let actionBtn = null; if (!account || !me) return actionBtn; @@ -83,7 +89,7 @@ class ActionButton extends ImmutablePureComponent { if (!account.get('relationship')) { // Wait until the relationship is loaded // } else if (account.getIn(['relationship', 'requested'])) { - actionBtn =