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
1 changed files with 3 additions and 2 deletions

View File

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