clarify in content hider if label is on overall account (#9264)
* clarify in content hider if label is on overall account * fix bool typo * Update src/components/moderation/ContentHider.tsx Co-authored-by: Samuel Newman <mozzius@protonmail.com> * rename variable for clarity --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -85,7 +85,11 @@ function ContentHiderActive({
|
||||
blur.type !== 'label' ||
|
||||
(blur.type === 'label' && blur.source.type !== 'user')
|
||||
) {
|
||||
return desc.name
|
||||
if (desc.isSubjectAccount) {
|
||||
return _(msg`${desc.name} (Account)`)
|
||||
} else {
|
||||
return desc.name
|
||||
}
|
||||
}
|
||||
|
||||
let hasAdultContentLabel = false
|
||||
@@ -127,6 +131,7 @@ function ContentHiderActive({
|
||||
modui?.blurs,
|
||||
blur,
|
||||
desc.name,
|
||||
desc.isSubjectAccount,
|
||||
labelDefs,
|
||||
i18n.locale,
|
||||
globalLabelStrings,
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface ModerationCauseDescription {
|
||||
sourceType?: ModerationCauseSource['type']
|
||||
sourceAvi?: string
|
||||
sourceDid?: string
|
||||
isSubjectAccount?: boolean
|
||||
}
|
||||
|
||||
export function useModerationCauseDescription(
|
||||
@@ -162,6 +163,7 @@ export function useModerationCauseDescription(
|
||||
sourceType: cause.source.type,
|
||||
sourceAvi: labeler?.creator.avatar,
|
||||
sourceDid: cause.label.src,
|
||||
isSubjectAccount: cause.label.uri.startsWith('did:'),
|
||||
}
|
||||
}
|
||||
// should never happen
|
||||
|
||||
Reference in New Issue
Block a user