diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-07 14:45:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 14:45:50 -0800 |
commit | 52a0cb8faccd0df8250b4b084005d2fd6d12a9ad (patch) | |
tree | 5e15893fc9296d8b3b9ba99ff689143a68f03e2c /src/view/com/post-thread/PostThreadItem.tsx | |
parent | 794015aef88b4488e9803e76908c00fdb53b0df2 (diff) | |
download | voidsky-52a0cb8faccd0df8250b4b084005d2fd6d12a9ad.tar.zst |
Add label appeal tool to posts and accounts (#2124)
* Add label appeal tool to posts and accounts * Fix translations
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 900839015..a2aa3716e 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -42,6 +42,8 @@ import {useComposerControls} from '#/state/shell/composer' import {useModerationOpts} from '#/state/queries/preferences' import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow' import {ThreadPost} from '#/state/queries/post-thread' +import {LabelInfo} from '../util/moderation/LabelInfo' +import {useSession} from '#/state/session' export function PostThreadItem({ post, @@ -158,6 +160,7 @@ let PostThreadItemLoaded = ({ const pal = usePalette('default') const langPrefs = useLanguagePrefs() const {openComposer} = useComposerControls() + const {currentAccount} = useSession() const [limitLines, setLimitLines] = React.useState( () => countLines(richText?.text) >= MAX_POST_LINES, ) @@ -345,6 +348,13 @@ let PostThreadItemLoaded = ({ includeMute style={styles.alert} /> + {post.author.did === currentAccount?.did ? ( + <LabelInfo + details={{uri: post.uri, cid: post.cid}} + labels={post.labels} + style={{marginBottom: 8}} + /> + ) : null} {richText?.text ? ( <View style={[ |