about summary refs log tree commit diff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorKaylee <kaylee@codethat.sucks>2017-04-27 00:53:55 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-04-27 01:53:55 +0200
commit0dd71af5fab7d2bef59a6e9d467b2742476aee00 (patch)
tree783ad2b60a1869b88aaa33ccfe80ff095ad239d0 /app/assets/javascripts
parent0618f09939b7afc607bcd983139b91e056debe4d (diff)
Copy over "Boost" hover text fix to detailed view. (#2508)
from #1754, should close out #1394
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/components/features/status/components/action_bar.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/status/components/action_bar.jsx b/app/assets/javascripts/components/features/status/components/action_bar.jsx
index 130c3b92d..bbdbf56e3 100644
--- a/app/assets/javascripts/components/features/status/components/action_bar.jsx
+++ b/app/assets/javascripts/components/features/status/components/action_bar.jsx
@@ -9,6 +9,7 @@ const messages = defineMessages({
   mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },
   reply: { id: 'status.reply', defaultMessage: 'Reply' },
   reblog: { id: 'status.reblog', defaultMessage: 'Reblog' },
+  cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be reblogged' },
   favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
   report: { id: 'status.report', defaultMessage: 'Report @{name}' }
 });
@@ -67,10 +68,12 @@ class ActionBar extends React.PureComponent {
     if (status.get('visibility') === 'direct') reblogIcon = 'envelope';
     else if (status.get('visibility') === 'private') reblogIcon = 'lock';
 
+    let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');
+
     return (
       <div className='detailed-status__action-bar'>
         <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_id', null) === null ? 'reply' : 'reply-all'} onClick={this.handleReplyClick} /></div>
-        <div className='detailed-status__button'><IconButton disabled={status.get('visibility') === 'direct' || status.get('visibility') === 'private'} active={status.get('reblogged')} title={intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>
+        <div className='detailed-status__button'><IconButton disabled={reblog_disabled} active={status.get('reblogged')} title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>
         <div className='detailed-status__button'><IconButton animate={true} active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} activeStyle={{ color: '#ca8f04' }} /></div>
         <div className='detailed-status__button'><DropdownMenu size={18} icon='ellipsis-h' items={menu} direction="left" /></div>
       </div>