@@ -24,6 +24,7 @@ const messages = defineMessages({
24
24
reblog_private : { id : 'status.reblog_private' , defaultMessage : 'Boost with original visibility' } ,
25
25
cancel_reblog_private : { id : 'status.cancel_reblog_private' , defaultMessage : 'Unboost' } ,
26
26
cannot_reblog : { id : 'status.cannot_reblog' , defaultMessage : 'This post cannot be boosted' } ,
27
+ local_only : { id : 'status.local_only' , defaultMessage : 'This post is only visible by other users of your instance' } ,
27
28
favourite : { id : 'status.favourite' , defaultMessage : 'Favourite' } ,
28
29
bookmark : { id : 'status.bookmark' , defaultMessage : 'Bookmark' } ,
29
30
removeBookmark : { id : 'status.remove_bookmark' , defaultMessage : 'Remove bookmark' } ,
@@ -227,6 +228,7 @@ class StatusActionBar extends ImmutablePureComponent {
227
228
const publicStatus = [ 'public' , 'unlisted' ] . includes ( status . get ( 'visibility' ) ) ;
228
229
const mutingConversation = status . get ( 'muted' ) ;
229
230
const account = status . get ( 'account' ) ;
231
+ const federated = ! status . get ( 'local_only' ) ;
230
232
const writtenByMe = status . getIn ( [ 'account' , 'id' ] ) === me ;
231
233
232
234
let menu = [ ] ;
@@ -317,7 +319,7 @@ class StatusActionBar extends ImmutablePureComponent {
317
319
reblogTitle = intl . formatMessage ( messages . cannot_reblog ) ;
318
320
}
319
321
320
- const shareButton = ( 'share' in navigator ) && publicStatus && (
322
+ const shareButton = ( 'share' in navigator ) && publicStatus && federated && (
321
323
< IconButton className = 'status__action-bar-button' title = { intl . formatMessage ( messages . share ) } icon = 'share-alt' onClick = { this . handleShareClick } />
322
324
) ;
323
325
@@ -341,6 +343,9 @@ class StatusActionBar extends ImmutablePureComponent {
341
343
title = { intl . formatMessage ( messages . more ) }
342
344
/>
343
345
</ div >
346
+ { ! federated &&
347
+ < IconButton className = 'status__action-bar-button' disabled title = { intl . formatMessage ( messages . local_only ) } icon = 'chain-broken' />
348
+ }
344
349
</ div >
345
350
) ;
346
351
}
0 commit comments