From 0634e8dee5026b06c95b7efe161a0930c7431d9b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 9 Oct 2016 22:19:15 +0200 Subject: Improved how in-UI profiles look --- .../features/account/components/action_bar.jsx | 67 ++++++++++------------ .../features/account/components/header.jsx | 16 ++++-- .../components/features/account/index.jsx | 2 +- .../features/status/components/action_bar.jsx | 16 +++++- .../components/features/status/index.jsx | 9 ++- 5 files changed, 64 insertions(+), 46 deletions(-) (limited to 'app/assets/javascripts/components/features') diff --git a/app/assets/javascripts/components/features/account/components/action_bar.jsx b/app/assets/javascripts/components/features/account/components/action_bar.jsx index aadf168b2..61c89313a 100644 --- a/app/assets/javascripts/components/features/account/components/action_bar.jsx +++ b/app/assets/javascripts/components/features/account/components/action_bar.jsx @@ -1,6 +1,6 @@ import PureRenderMixin from 'react-addons-pure-render-mixin'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import Button from '../../../components/button'; +import DropdownMenu from '../../../components/dropdown_menu'; const ActionBar = React.createClass({ @@ -16,47 +16,42 @@ const ActionBar = React.createClass({ render () { const { account, me } = this.props; - let infoText = ''; - let follow = ''; - let buttonText = ''; - let block = ''; - let disabled = false; + let menu = []; if (account.get('id') === me) { - buttonText = 'This is you!'; - disabled = true; - } else { - let blockText = ''; - - if (account.getIn(['relationship', 'blocking'])) { - buttonText = 'Blocked'; - disabled = true; - blockText = 'Unblock'; - } else { - if (account.getIn(['relationship', 'following'])) { - buttonText = 'Unfollow'; - } else { - buttonText = 'Follow'; - } - - if (account.getIn(['relationship', 'followed_by'])) { - infoText = 'Follows you!'; - } - - blockText = 'Block'; - } - block =