Add label appeal tool to posts and accounts (#2124)
* Add label appeal tool to posts and accounts * Fix translations
This commit is contained in:
parent
794015aef8
commit
52a0cb8fac
12 changed files with 846 additions and 380 deletions
|
@ -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={[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue