|
|
|
@ -32,6 +32,16 @@ const messages = defineMessages({
|
|
|
|
|
embed: { id: 'status.embed', defaultMessage: 'Embed' },
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const obfuscatedCount = count => {
|
|
|
|
|
if (count < 0) {
|
|
|
|
|
return 0;
|
|
|
|
|
} else if (count <= 1) {
|
|
|
|
|
return count;
|
|
|
|
|
} else {
|
|
|
|
|
return '1+';
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@injectIntl
|
|
|
|
|
export default class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
|
@ -194,7 +204,7 @@ export default class StatusActionBar extends ImmutablePureComponent {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className='status__action-bar'>
|
|
|
|
|
<IconButton className='status__action-bar-button' disabled={anonymousAccess} title={replyTitle} icon={replyIcon} onClick={this.handleReplyClick} />
|
|
|
|
|
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' disabled={anonymousAccess} title={replyTitle} icon={replyIcon} onClick={this.handleReplyClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('replies_count'))}</span></div>
|
|
|
|
|
<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 star-icon' disabled={anonymousAccess} animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} />
|
|
|
|
|
{shareButton}
|
|
|
|
|