|
|
@ -18,6 +18,7 @@ const messages = defineMessages({
|
|
|
|
more: { id: 'status.more', defaultMessage: 'More' },
|
|
|
|
more: { id: 'status.more', defaultMessage: 'More' },
|
|
|
|
replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },
|
|
|
|
replyAll: { id: 'status.replyAll', defaultMessage: 'Reply to thread' },
|
|
|
|
reblog: { id: 'status.reblog', defaultMessage: 'Boost' },
|
|
|
|
reblog: { id: 'status.reblog', defaultMessage: 'Boost' },
|
|
|
|
|
|
|
|
reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' },
|
|
|
|
cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },
|
|
|
|
cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },
|
|
|
|
favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
|
|
|
favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
|
|
|
|
bookmark: { id: 'status.bookmark', defaultMessage: 'Bookmark' },
|
|
|
|
bookmark: { id: 'status.bookmark', defaultMessage: 'Bookmark' },
|
|
|
@ -127,6 +128,8 @@ export default class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
const mutingConversation = status.get('muted');
|
|
|
|
const mutingConversation = status.get('muted');
|
|
|
|
const anonymousAccess = !me;
|
|
|
|
const anonymousAccess = !me;
|
|
|
|
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
|
|
|
|
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
|
|
|
|
|
|
|
|
const reblogDisabled = anonymousAccess || (status.get('visibility') === 'direct' || (status.get('visibility') === 'private' && me !== status.getIn(['account', 'id'])));
|
|
|
|
|
|
|
|
const reblogMessage = status.get('visibility') === 'private' ? messages.reblog_private : messages.reblog;
|
|
|
|
|
|
|
|
|
|
|
|
let menu = [];
|
|
|
|
let menu = [];
|
|
|
|
let reblogIcon = 'retweet';
|
|
|
|
let reblogIcon = 'retweet';
|
|
|
@ -175,7 +178,7 @@ export default class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className='status__action-bar'>
|
|
|
|
<div className='status__action-bar'>
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess} title={replyTitle} icon={replyIcon} onClick={this.handleReplyClick} />
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess} title={replyTitle} icon={replyIcon} onClick={this.handleReplyClick} />
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess || !publicStatus} active={status.get('reblogged')} pressed={status.get('reblogged')} title={!publicStatus ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} />
|
|
|
|
<IconButton className='status__action-bar-button' disabled={reblogDisabled} active={status.get('reblogged')} pressed={status.get('reblogged')} title={reblogDisabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(reblogMessage)} icon={reblogIcon} onClick={this.handleReblogClick} />
|
|
|
|
<IconButton className='status__action-bar-button star-icon' disabled={anonymousAccess} animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} />
|
|
|
|
<IconButton className='status__action-bar-button star-icon' disabled={anonymousAccess} animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} />
|
|
|
|
{shareButton}
|
|
|
|
{shareButton}
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess} active={status.get('bookmarked')} pressed={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess} active={status.get('bookmarked')} pressed={status.get('bookmarked')} title={intl.formatMessage(messages.bookmark)} icon='bookmark' onClick={this.handleBookmarkClick} />
|
|
|
|