Refactor moderation to apply to accounts, profiles, and posts correctly (#548)
* Add ScreenHider component * Add blur attribute to UserAvatar and UserBanner * Remove dead suggested posts component and model * Bump @atproto/api@0.2.10 * Rework moderation tooling to give a more precise DSL * Add label mocks * Apply finer grained moderation controls * Refactor ProfileCard to just take the profile object * Apply moderation to user listings and banner * Apply moderation to notifications * Fix lint * Tune avatar & banner blur settings per platform * 1.24
This commit is contained in:
parent
51be8474db
commit
1d50ddb378
40 changed files with 1195 additions and 763 deletions
|
@ -99,15 +99,7 @@ const Profiles = observer(({model}: {model: SearchUIModel}) => {
|
|||
return (
|
||||
<ScrollView style={pal.view}>
|
||||
{model.profiles.map(item => (
|
||||
<ProfileCardWithFollowBtn
|
||||
key={item.did}
|
||||
did={item.did}
|
||||
handle={item.handle}
|
||||
displayName={item.displayName}
|
||||
avatar={item.avatar}
|
||||
description={item.description}
|
||||
labels={item.labels}
|
||||
/>
|
||||
<ProfileCardWithFollowBtn key={item.did} profile={item} />
|
||||
))}
|
||||
<View style={s.footerSpacer} />
|
||||
<View style={s.footerSpacer} />
|
||||
|
|
|
@ -144,18 +144,9 @@ export const Suggestions = observer(
|
|||
<View style={[styles.card, pal.view, pal.border]}>
|
||||
<ProfileCardWithFollowBtn
|
||||
key={item.ref.did}
|
||||
did={item.ref.did}
|
||||
handle={item.ref.handle}
|
||||
displayName={item.ref.displayName}
|
||||
avatar={item.ref.avatar}
|
||||
labels={item.ref.labels}
|
||||
profile={item.ref}
|
||||
noBg
|
||||
noBorder
|
||||
description={
|
||||
item.ref.description
|
||||
? (item.ref as AppBskyActorDefs.ProfileView).description
|
||||
: ''
|
||||
}
|
||||
followers={
|
||||
item.ref.followers
|
||||
? (item.ref.followers as AppBskyActorDefs.ProfileView[])
|
||||
|
@ -170,18 +161,9 @@ export const Suggestions = observer(
|
|||
<View style={[styles.card, pal.view, pal.border]}>
|
||||
<ProfileCardWithFollowBtn
|
||||
key={item.view.did}
|
||||
did={item.view.did}
|
||||
handle={item.view.handle}
|
||||
displayName={item.view.displayName}
|
||||
avatar={item.view.avatar}
|
||||
labels={item.view.labels}
|
||||
profile={item.view}
|
||||
noBg
|
||||
noBorder
|
||||
description={
|
||||
item.view.description
|
||||
? (item.view as AppBskyActorDefs.ProfileView).description
|
||||
: ''
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
|
@ -191,19 +173,9 @@ export const Suggestions = observer(
|
|||
<View style={[styles.card, pal.view, pal.border]}>
|
||||
<ProfileCardWithFollowBtn
|
||||
key={item.suggested.did}
|
||||
did={item.suggested.did}
|
||||
handle={item.suggested.handle}
|
||||
displayName={item.suggested.displayName}
|
||||
avatar={item.suggested.avatar}
|
||||
labels={item.suggested.labels}
|
||||
profile={item.suggested}
|
||||
noBg
|
||||
noBorder
|
||||
description={
|
||||
item.suggested.description
|
||||
? (item.suggested as AppBskyActorDefs.ProfileView)
|
||||
.description
|
||||
: ''
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue