about summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-02-11 16:07:10 -0600
committerGitHub <noreply@github.com>2025-02-11 14:07:10 -0800
commit459611ca7a0d1559e3c9373ef9a61ea8e4c1e2f7 (patch)
tree12808a7ee8f9abce9bf06c50b047a9c426fc04f1 /src/components
parent03f75e8ff49d8fa0f7b96321ba8d3a5dd8841703 (diff)
downloadvoidsky-459611ca7a0d1559e3c9373ef9a61ea8e4c1e2f7.tar.zst
[APP-1031] Add new followerRule to threadgate settings (#7681)
* Add new followerRule to threadgate settings

* Handle WhoCanReply copy

* Handle follow case

* fix ci

* Revert "Handle follow case"

This reverts commit bc454dad896fe577bec91f3d65d971ad9e0fec8d.

* Hide Follow button if followedBy rule enabled

* Revert "Revert "Handle follow case""

This reverts commit cadc46d2dc50120424ed460943775c58efc59c4d.

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/WhoCanReply.tsx13
-rw-r--r--src/components/dialogs/PostInteractionSettingsDialog.tsx12
2 files changed, 24 insertions, 1 deletions
diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx
index 34ac3fe5b..7d74a50c6 100644
--- a/src/components/WhoCanReply.tsx
+++ b/src/components/WhoCanReply.tsx
@@ -258,6 +258,19 @@ function Rule({
   if (rule.type === 'mention') {
     return <Trans>mentioned users</Trans>
   }
+  if (rule.type === 'followers') {
+    return (
+      <Trans>
+        users following{' '}
+        <InlineLinkText
+          label={`@${post.author.handle}`}
+          to={makeProfileLink(post.author)}
+          style={[a.text_sm, a.leading_snug]}>
+          @{post.author.handle}
+        </InlineLinkText>
+      </Trans>
+    )
+  }
   if (rule.type === 'following') {
     return (
       <Trans>
diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx
index b443d59f2..e4bc77702 100644
--- a/src/components/dialogs/PostInteractionSettingsDialog.tsx
+++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx
@@ -429,7 +429,7 @@ export function PostInteractionSettingsForm({
                     disabled={replySettingsDisabled}
                   />
                   <Selectable
-                    label={_(msg`Followed users`)}
+                    label={_(msg`Users you follow`)}
                     isSelected={
                       !!threadgateAllowUISettings.find(
                         v => v.type === 'following',
@@ -438,6 +438,16 @@ export function PostInteractionSettingsForm({
                     onPress={() => onPressAudience({type: 'following'})}
                     disabled={replySettingsDisabled}
                   />
+                  <Selectable
+                    label={_(msg`Your followers`)}
+                    isSelected={
+                      !!threadgateAllowUISettings.find(
+                        v => v.type === 'followers',
+                      )
+                    }
+                    onPress={() => onPressAudience({type: 'followers'})}
+                    disabled={replySettingsDisabled}
+                  />
                   {lists && lists.length > 0
                     ? lists.map(list => (
                         <Selectable