diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-10 16:25:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 16:25:11 -0700 |
commit | e5b7a894a3c8f5219751dc613052aa64ddc0102e (patch) | |
tree | e1c3bcfc73394e49ae143e155c70314f301e1daf /src | |
parent | ac6f6eef667a5e2801e56423058b7053f1705ebe (diff) | |
download | voidsky-e5b7a894a3c8f5219751dc613052aa64ddc0102e.tar.zst |
More useful block-state information in embeds (#1150)
* More useful block-state information in embeds * Tune copy
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/moderation.ts | 11 | ||||
-rw-r--r-- | src/view/com/modals/ModerationDetails.tsx | 8 | ||||
-rw-r--r-- | src/view/com/util/moderation/ContentHider.tsx | 13 |
3 files changed, 27 insertions, 5 deletions
diff --git a/src/lib/moderation.ts b/src/lib/moderation.ts index 70c4444fe..a90c4dc9c 100644 --- a/src/lib/moderation.ts +++ b/src/lib/moderation.ts @@ -18,16 +18,23 @@ export function describeModerationCause( } if (cause.type === 'blocking') { return { - name: 'Blocked User', + name: 'User Blocked', description: 'You have blocked this user. You cannot view their content.', } } if (cause.type === 'blocked-by') { return { - name: 'Blocking You', + name: 'User Blocking You', description: 'This user has blocked you. You cannot view their content.', } } + if (cause.type === 'block-other') { + return { + name: 'Content Not Available', + description: + 'This content is not available because one of the users involved has blocked the other.', + } + } if (cause.type === 'muted') { if (cause.source.type === 'list') { return { diff --git a/src/view/com/modals/ModerationDetails.tsx b/src/view/com/modals/ModerationDetails.tsx index 598d26924..b0e68e61b 100644 --- a/src/view/com/modals/ModerationDetails.tsx +++ b/src/view/com/modals/ModerationDetails.tsx @@ -29,11 +29,15 @@ export function Component({ description = 'Moderator has chosen to set a general warning on the content.' } else if (moderation.cause.type === 'blocking') { - name = 'Account Blocked' + name = 'User Blocked' description = 'You have blocked this user. You cannot view their content.' } else if (moderation.cause.type === 'blocked-by') { - name = 'Account Blocks You' + name = 'User Blocks You' description = 'This user has blocked you. You cannot view their content.' + } else if (moderation.cause.type === 'block-other') { + name = 'Content Not Available' + description = + 'This content is not available because one of the users involved has blocked the other.' } else if (moderation.cause.type === 'muted') { if (moderation.cause.source.type === 'list') { const list = moderation.cause.source.list diff --git a/src/view/com/util/moderation/ContentHider.tsx b/src/view/com/util/moderation/ContentHider.tsx index 9286d1c8b..853f7840c 100644 --- a/src/view/com/util/moderation/ContentHider.tsx +++ b/src/view/com/util/moderation/ContentHider.tsx @@ -41,12 +41,23 @@ export function ContentHider({ onPress={() => { if (!moderation.noOverride) { setOverride(v => !v) + } else { + store.shell.openModal({ + name: 'moderation-details', + context: 'content', + moderation, + }) } }} accessibilityRole="button" accessibilityHint={override ? 'Hide the content' : 'Show the content'} accessibilityLabel="" - style={[styles.cover, pal.viewLight]}> + style={[ + styles.cover, + moderation.noOverride + ? {borderWidth: 1, borderColor: pal.colors.borderDark} + : pal.viewLight, + ]}> <Pressable onPress={() => { store.shell.openModal({ |