about summary refs log tree commit diff
path: root/src/state/models/ui/preferences.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-08-09 17:34:16 -0700
committerGitHub <noreply@github.com>2023-08-09 17:34:16 -0700
commit03d152675ee1ce208856498acf7285fbf07fd45b (patch)
tree70803ebe16276b3a6b7c350f78d069641a0a6118 /src/state/models/ui/preferences.ts
parent48813a96d686d97009e260d0a87f32d28a631052 (diff)
downloadvoidsky-03d152675ee1ce208856498acf7285fbf07fd45b.tar.zst
Add self-labeling controls (#1141)
* Add self-label modal

* Use the shield-exclamation icon consistently on post moderation

* Wire up self-labeling

* Bump @atproto/api@0.6.0

* Bump @atproto/dev-env@^0.2.3

* Add e2e test for self-labeling

* Fix types
Diffstat (limited to 'src/state/models/ui/preferences.ts')
-rw-r--r--src/state/models/ui/preferences.ts47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/state/models/ui/preferences.ts b/src/state/models/ui/preferences.ts
index a892d8d34..23668a3dc 100644
--- a/src/state/models/ui/preferences.ts
+++ b/src/state/models/ui/preferences.ts
@@ -418,34 +418,35 @@ export class PreferencesModel {
     return {
       userDid: this.rootStore.session.currentSession?.did || '',
       adultContentEnabled: this.adultContentEnabled,
-      labelerSettings: [
+      labels: {
+        // TEMP translate old settings until this UI can be migrated -prf
+        porn: tempfixLabelPref(this.contentLabels.nsfw),
+        sexual: tempfixLabelPref(this.contentLabels.suggestive),
+        nudity: tempfixLabelPref(this.contentLabels.nudity),
+        nsfl: tempfixLabelPref(this.contentLabels.gore),
+        corpse: tempfixLabelPref(this.contentLabels.gore),
+        gore: tempfixLabelPref(this.contentLabels.gore),
+        torture: tempfixLabelPref(this.contentLabels.gore),
+        'self-harm': tempfixLabelPref(this.contentLabels.gore),
+        'intolerant-race': tempfixLabelPref(this.contentLabels.hate),
+        'intolerant-gender': tempfixLabelPref(this.contentLabels.hate),
+        'intolerant-sexual-orientation': tempfixLabelPref(
+          this.contentLabels.hate,
+        ),
+        'intolerant-religion': tempfixLabelPref(this.contentLabels.hate),
+        intolerant: tempfixLabelPref(this.contentLabels.hate),
+        'icon-intolerant': tempfixLabelPref(this.contentLabels.hate),
+        spam: tempfixLabelPref(this.contentLabels.spam),
+        impersonation: tempfixLabelPref(this.contentLabels.impersonation),
+        scam: 'warn',
+      },
+      labelers: [
         {
           labeler: {
             did: '',
             displayName: 'Bluesky Social',
           },
-          settings: {
-            // TEMP translate old settings until this UI can be migrated -prf
-            porn: tempfixLabelPref(this.contentLabels.nsfw),
-            sexual: tempfixLabelPref(this.contentLabels.suggestive),
-            nudity: tempfixLabelPref(this.contentLabels.nudity),
-            nsfl: tempfixLabelPref(this.contentLabels.gore),
-            corpse: tempfixLabelPref(this.contentLabels.gore),
-            gore: tempfixLabelPref(this.contentLabels.gore),
-            torture: tempfixLabelPref(this.contentLabels.gore),
-            'self-harm': tempfixLabelPref(this.contentLabels.gore),
-            'intolerant-race': tempfixLabelPref(this.contentLabels.hate),
-            'intolerant-gender': tempfixLabelPref(this.contentLabels.hate),
-            'intolerant-sexual-orientation': tempfixLabelPref(
-              this.contentLabels.hate,
-            ),
-            'intolerant-religion': tempfixLabelPref(this.contentLabels.hate),
-            intolerant: tempfixLabelPref(this.contentLabels.hate),
-            'icon-intolerant': tempfixLabelPref(this.contentLabels.hate),
-            spam: tempfixLabelPref(this.contentLabels.spam),
-            impersonation: tempfixLabelPref(this.contentLabels.impersonation),
-            scam: 'warn',
-          },
+          labels: {},
         },
       ],
     }