Fix dialog spacing, update copy
This commit is contained in:
@@ -8,6 +8,7 @@ import {useModerationCauseDescription} from '#/lib/moderation/useModerationCause
|
|||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {listUriToHref} from '#/lib/strings/url-helpers'
|
import {listUriToHref} from '#/lib/strings/url-helpers'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
|
import {useSession} from '#/state/session'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import * as Dialog from '#/components/Dialog'
|
import * as Dialog from '#/components/Dialog'
|
||||||
import {Divider} from '#/components/Divider'
|
import {Divider} from '#/components/Divider'
|
||||||
@@ -40,6 +41,7 @@ function ModerationDetailsDialogInner({
|
|||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const desc = useModerationCauseDescription(modcause)
|
const desc = useModerationCauseDescription(modcause)
|
||||||
|
const {currentAccount} = useSession()
|
||||||
|
|
||||||
let name
|
let name
|
||||||
let description
|
let description
|
||||||
@@ -107,8 +109,13 @@ function ModerationDetailsDialogInner({
|
|||||||
name = _(msg`Post Hidden by You`)
|
name = _(msg`Post Hidden by You`)
|
||||||
description = _(msg`You have hidden this post.`)
|
description = _(msg`You have hidden this post.`)
|
||||||
} else if (modcause.type === 'reply-hidden') {
|
} else if (modcause.type === 'reply-hidden') {
|
||||||
name = _(msg`Post Hidden by Thread Author`)
|
const isYou = currentAccount?.did === modcause.source.did
|
||||||
description = _(msg`The author of this thread has hidden this post.`)
|
name = isYou
|
||||||
|
? _(msg`Post Hidden by You`)
|
||||||
|
: _(msg`Post Hidden by Thread Author`)
|
||||||
|
description = isYou
|
||||||
|
? _(msg`You hid this post.`)
|
||||||
|
: _(msg`The author of this thread has hidden this post.`)
|
||||||
} else if (modcause.type === 'label') {
|
} else if (modcause.type === 'label') {
|
||||||
name = desc.name
|
name = desc.name
|
||||||
description = desc.description
|
description = desc.description
|
||||||
@@ -123,12 +130,12 @@ function ModerationDetailsDialogInner({
|
|||||||
<Text style={[t.atoms.text, a.text_2xl, a.font_bold, a.mb_sm]}>
|
<Text style={[t.atoms.text, a.text_2xl, a.font_bold, a.mb_sm]}>
|
||||||
{name}
|
{name}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[t.atoms.text, a.text_md, a.mb_lg, a.leading_snug]}>
|
<Text style={[t.atoms.text, a.text_md, a.leading_snug]}>
|
||||||
{description}
|
{description}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{modcause.type === 'label' && (
|
{modcause.type === 'label' && (
|
||||||
<>
|
<View style={[a.pt_lg]}>
|
||||||
<Divider />
|
<Divider />
|
||||||
<Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
|
<Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
|
||||||
{modcause.source.type === 'user' ? (
|
{modcause.source.type === 'user' ? (
|
||||||
@@ -147,7 +154,7 @@ function ModerationDetailsDialogInner({
|
|||||||
</Trans>
|
</Trans>
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isNative && <View style={{height: 40}} />}
|
{isNative && <View style={{height: 40}} />}
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ export function useModerationCauseDescription(
|
|||||||
return {
|
return {
|
||||||
icon: EyeSlash,
|
icon: EyeSlash,
|
||||||
name: isYou
|
name: isYou
|
||||||
? _(msg`Post hidden by you`)
|
? _(msg`Post Hidden by You`)
|
||||||
: _(msg`Post hidden by thread author`),
|
: _(msg`Post Hidden by Thread Author`),
|
||||||
description: isYou
|
description: isYou
|
||||||
? _(msg`You hid this post.`)
|
? _(msg`You hid this post.`)
|
||||||
: _(msg`The author of this thread has hidden this post.`),
|
: _(msg`The author of this thread has hidden this post.`),
|
||||||
|
|||||||
Reference in New Issue
Block a user