Move label appeal to post dropdown (#2236)
* Move appeal from post to dropdown * Translate * Tweak copy on the appeal label modal --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
parent
726bbd2b6d
commit
8df4fd4d57
6 changed files with 135 additions and 70 deletions
|
@ -31,6 +31,7 @@ let PostDropdownBtn = ({
|
|||
postUri,
|
||||
record,
|
||||
style,
|
||||
showAppealLabelItem,
|
||||
}: {
|
||||
testID: string
|
||||
postAuthor: AppBskyActorDefs.ProfileViewBasic
|
||||
|
@ -38,6 +39,7 @@ let PostDropdownBtn = ({
|
|||
postUri: string
|
||||
record: AppBskyFeedPost.Record
|
||||
style?: StyleProp<ViewStyle>
|
||||
showAppealLabelItem?: boolean
|
||||
}): React.ReactNode => {
|
||||
const {hasSession, currentAccount} = useSession()
|
||||
const theme = useTheme()
|
||||
|
@ -198,6 +200,23 @@ let PostDropdownBtn = ({
|
|||
web: ['far', 'trash-can'],
|
||||
},
|
||||
},
|
||||
showAppealLabelItem && {
|
||||
label: 'separator',
|
||||
},
|
||||
showAppealLabelItem && {
|
||||
label: _(msg`Appeal content warning`),
|
||||
onPress() {
|
||||
openModal({name: 'appeal-label', uri: postUri, cid: postCid})
|
||||
},
|
||||
testID: 'postDropdownAppealBtn',
|
||||
icon: {
|
||||
ios: {
|
||||
name: 'exclamationmark.triangle',
|
||||
},
|
||||
android: 'ic_menu_report_image',
|
||||
web: 'circle-exclamation',
|
||||
},
|
||||
},
|
||||
].filter(Boolean) as NativeDropdownItem[]
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue