Add label appeal tool to posts and accounts (#2124)

* Add label appeal tool to posts and accounts

* Fix translations
This commit is contained in:
Paul Frazee 2023-12-07 14:45:50 -08:00 committed by GitHub
parent 794015aef8
commit 52a0cb8fac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 846 additions and 380 deletions

View file

@ -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={[