only allow public/unlisted statuses to be pinned (#290)

fixes #264
This commit is contained in:
Nolan Lawson 2018-05-12 15:45:50 -07:00 committed by GitHub
parent c0d0b4dd36
commit 3d8cdcd649
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,16 +62,17 @@ export default {
// end copypasta (StatusOptionsDialog.html / AccountProfileOptionsDialog.html)
//
pinLabel: ({pinned, isUser}) => isUser ? (pinned ? 'Unpin from profile' : 'Pin to profile') : '',
visibility: ({status}) => status.visibility,
items: ({
blockLabel, blocking, blockIcon, muteLabel, muteIcon, followLabel, followIcon,
following, followRequested, pinLabel, isUser
following, followRequested, pinLabel, isUser, visibility
}) => ([
isUser && {
key: 'delete',
label: 'Delete',
icon: '#fa-trash'
},
isUser && {
visibility !== 'private' && visibility !== 'direct' && isUser && {
key: 'pin',
label: pinLabel,
icon: '#fa-thumb-tack'