@ -12,6 +12,7 @@ const messages = defineMessages({
reply : { id : 'status.reply' , defaultMessage : 'Reply' } ,
reply : { id : 'status.reply' , defaultMessage : 'Reply' } ,
replyAll : { id : 'status.replyAll' , defaultMessage : 'Reply to thread' } ,
replyAll : { id : 'status.replyAll' , defaultMessage : 'Reply to thread' } ,
reblog : { id : 'status.reblog' , defaultMessage : 'Reblog' } ,
reblog : { id : 'status.reblog' , defaultMessage : 'Reblog' } ,
cannot _reblog : { id : 'status.cannot_reblog' , defaultMessage : 'This post cannot be reblogged' } ,
favourite : { id : 'status.favourite' , defaultMessage : 'Favourite' } ,
favourite : { id : 'status.favourite' , defaultMessage : 'Favourite' } ,
open : { id : 'status.open' , defaultMessage : 'Expand this status' } ,
open : { id : 'status.open' , defaultMessage : 'Expand this status' } ,
report : { id : 'status.report' , defaultMessage : 'Report @{name}' }
report : { id : 'status.report' , defaultMessage : 'Report @{name}' }
@ -71,6 +72,7 @@ class StatusActionBar extends React.PureComponent {
render ( ) {
render ( ) {
const { status , me , intl } = this . props ;
const { status , me , intl } = this . props ;
const reblog _disabled = status . get ( 'visibility' ) === 'private' || status . get ( 'visibility' ) === 'direct' ;
let menu = [ ] ;
let menu = [ ] ;
menu . push ( { text : intl . formatMessage ( messages . open ) , action : this . handleOpen } ) ;
menu . push ( { text : intl . formatMessage ( messages . open ) , action : this . handleOpen } ) ;
@ -102,7 +104,7 @@ class StatusActionBar extends React.PureComponent {
return (
return (
< div className = 'status__action-bar' >
< div className = 'status__action-bar' >
< div className = 'status__action-bar-button-wrapper' > < IconButton title = { reply _title } icon = { reply _icon } onClick = { this . handleReplyClick } / > < / div >
< div className = 'status__action-bar-button-wrapper' > < IconButton title = { reply _title } icon = { reply _icon } onClick = { this . handleReplyClick } / > < / div >
< div className = 'status__action-bar-button-wrapper' > < IconButton disabled = { status. get ( 'visibility' ) === 'private' || status . get ( 'visibility' ) === 'direct' } active = { status . get ( 'reblogged' ) } title = { intl . formatMessage ( messages . reblog ) } icon = { reblogIcon } onClick = { this . handleReblogClick } / > < / div >
< div className = 'status__action-bar-button-wrapper' > < 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 = 'status__action-bar-button-wrapper' > < IconButton animate = { true } active = { status . get ( 'favourited' ) } title = { intl . formatMessage ( messages . favourite ) } icon = 'star' onClick = { this . handleFavouriteClick } className = 'star-icon' / > < / div >
< div className = 'status__action-bar-button-wrapper' > < IconButton animate = { true } active = { status . get ( 'favourited' ) } title = { intl . formatMessage ( messages . favourite ) } icon = 'star' onClick = { this . handleFavouriteClick } className = 'star-icon' / > < / div >
< div className = 'status__action-bar-dropdown' >
< div className = 'status__action-bar-dropdown' >