Add 'copy post text' tool
This commit is contained in:
@@ -79,6 +79,7 @@ export function PostDropdownBtn({
|
||||
itemHref,
|
||||
itemTitle,
|
||||
isAuthor,
|
||||
onCopyPostText,
|
||||
onDeletePost,
|
||||
}: {
|
||||
style?: StyleProp<ViewStyle>
|
||||
@@ -86,6 +87,7 @@ export function PostDropdownBtn({
|
||||
itemHref: string
|
||||
itemTitle: string
|
||||
isAuthor: boolean
|
||||
onCopyPostText: () => void
|
||||
onDeletePost: () => void
|
||||
}) {
|
||||
const store = useStores()
|
||||
@@ -100,6 +102,13 @@ export function PostDropdownBtn({
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
{
|
||||
icon: ['far', 'paste'],
|
||||
label: 'Copy post text',
|
||||
onPress() {
|
||||
onCopyPostText()
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'share',
|
||||
label: 'Share...',
|
||||
|
||||
@@ -14,6 +14,7 @@ interface PostMetaOpts {
|
||||
authorDisplayName: string | undefined
|
||||
timestamp: string
|
||||
isAuthor: boolean
|
||||
onCopyPostText: () => void
|
||||
onDeletePost: () => void
|
||||
}
|
||||
|
||||
@@ -40,6 +41,7 @@ export function PostMeta(opts: PostMetaOpts) {
|
||||
itemHref={opts.itemHref}
|
||||
itemTitle={opts.itemTitle}
|
||||
isAuthor={opts.isAuthor}
|
||||
onCopyPostText={opts.onCopyPostText}
|
||||
onDeletePost={opts.onDeletePost}>
|
||||
<FontAwesomeIcon icon="ellipsis-h" size={14} style={[s.mt2, s.mr5]} />
|
||||
</PostDropdownBtn>
|
||||
|
||||
Reference in New Issue
Block a user