|
|
@ -38,10 +38,10 @@ const messages = defineMessages({ |
|
|
|
const obfuscatedCount = count => { |
|
|
|
if (count < 0) { |
|
|
|
return 0; |
|
|
|
} else if (count <= 1) { |
|
|
|
} else if (count <= 10) { |
|
|
|
return count; |
|
|
|
} else { |
|
|
|
return '1+'; |
|
|
|
return '10+'; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -249,9 +249,9 @@ class StatusActionBar extends ImmutablePureComponent { |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className='status__action-bar'> |
|
|
|
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' title={replyTitle} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : 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={!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' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='thumbs-up' onClick={this.handleFavouriteClick} /> |
|
|
|
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' title={replyTitle} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'comments-o' : replyIcon} onClick={this.handleReplyClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('replies_count'))}</span></div> |
|
|
|
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button' disabled={!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} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('reblogs_count'))}</span></div> |
|
|
|
<div className='status__action-bar__counter'><IconButton className='status__action-bar-button star-icon' animate active={status.get('favourited')} pressed={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='thumbs-up' onClick={this.handleFavouriteClick} /><span className='status__action-bar__counter__label' >{obfuscatedCount(status.get('favourites_count'))}</span></div> |
|
|
|
{shareButton} |
|
|
|
|
|
|
|
<div className='status__action-bar-dropdown'> |
|
|
|