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>
(cherry picked from commit 28e132ae03)
This commit is contained in:
@@ -85,7 +85,11 @@ function ContentHiderActive({
|
|||||||
blur.type !== 'label' ||
|
blur.type !== 'label' ||
|
||||||
(blur.type === 'label' && blur.source.type !== 'user')
|
(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
|
let hasAdultContentLabel = false
|
||||||
@@ -127,6 +131,7 @@ function ContentHiderActive({
|
|||||||
modui?.blurs,
|
modui?.blurs,
|
||||||
blur,
|
blur,
|
||||||
desc.name,
|
desc.name,
|
||||||
|
desc.isSubjectAccount,
|
||||||
labelDefs,
|
labelDefs,
|
||||||
i18n.locale,
|
i18n.locale,
|
||||||
globalLabelStrings,
|
globalLabelStrings,
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export interface ModerationCauseDescription {
|
|||||||
sourceType?: ModerationCauseSource['type']
|
sourceType?: ModerationCauseSource['type']
|
||||||
sourceAvi?: string
|
sourceAvi?: string
|
||||||
sourceDid?: string
|
sourceDid?: string
|
||||||
|
isSubjectAccount?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function useModerationCauseDescription(
|
export function useModerationCauseDescription(
|
||||||
@@ -162,6 +163,7 @@ export function useModerationCauseDescription(
|
|||||||
sourceType: cause.source.type,
|
sourceType: cause.source.type,
|
||||||
sourceAvi: labeler?.creator.avatar,
|
sourceAvi: labeler?.creator.avatar,
|
||||||
sourceDid: cause.label.src,
|
sourceDid: cause.label.src,
|
||||||
|
isSubjectAccount: cause.label.uri.startsWith('did:'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// should never happen
|
// should never happen
|
||||||
|
|||||||
Reference in New Issue
Block a user