From aafb29c58978cbd8dbea2898b93bdab9979b5646 Mon Sep 17 00:00:00 2001
From: eugenijm <eugenijm@protonmail.com>
Date: Fri, 13 Sep 2019 16:15:19 +0300
Subject: Added a setting to hide follow/follower count from the user profile

---
 src/components/user_settings/user_settings.vue | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'src/components/user_settings/user_settings.vue')

diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 34ea8569..e78f6e7c 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -88,6 +88,15 @@
               >
               <label for="account-hide-follows">{{ $t('settings.hide_follows_description') }}</label>
             </p>
+            <p class="setting-subitem">
+              <input
+                id="account-hide-follows-count"
+                v-model="hideFollowsCount"
+                type="checkbox"
+                :disabled="!hideFollows"
+              >
+              <label for="account-hide-follows-count">{{ $t('settings.hide_follows_count_description') }}</label>
+            </p>
             <p>
               <input
                 id="account-hide-followers"
@@ -96,6 +105,15 @@
               >
               <label for="account-hide-followers">{{ $t('settings.hide_followers_description') }}</label>
             </p>
+            <p class="setting-subitem">
+              <input
+                id="account-hide-followers-count"
+                v-model="hideFollowersCount"
+                type="checkbox"
+                :disabled="!hideFollowers"
+              >
+              <label for="account-hide-followers-count">{{ $t('settings.hide_followers_count_description') }}</label>
+            </p>
             <p>
               <input
                 id="account-show-role"
@@ -617,5 +635,9 @@
       width: 10em;
     }
   }
+
+  .setting-subitem {
+    margin-left: 1.75em;
+  }
 }
 </style>
-- 
cgit v1.2.3-70-g09d2


From 194dd881183a301538033da2d91b76dcf7358565 Mon Sep 17 00:00:00 2001
From: Hakaba Hitoyo <hakabahitoyo@yahoo.co.jp>
Date: Thu, 26 Sep 2019 22:31:28 +0000
Subject: Feature/Add _Allow user discovery services_ preference

---
 src/components/user_settings/user_settings.js               | 2 ++
 src/components/user_settings/user_settings.vue              | 8 ++++++++
 src/i18n/en.json                                            | 1 +
 src/i18n/ja.json                                            | 1 +
 src/i18n/ja_pedantic.json                                   | 1 +
 src/services/entity_normalizer/entity_normalizer.service.js | 1 +
 6 files changed, 14 insertions(+)

(limited to 'src/components/user_settings/user_settings.vue')

diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index 21b01476..f12cccae 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -45,6 +45,7 @@ const UserSettings = {
       hideFollowersCount: this.$store.state.users.currentUser.hide_followers_count,
       showRole: this.$store.state.users.currentUser.show_role,
       role: this.$store.state.users.currentUser.role,
+      discoverable: this.$store.state.users.currentUser.discoverable,
       pickAvatarBtnVisible: true,
       bannerUploading: false,
       backgroundUploading: false,
@@ -144,6 +145,7 @@ const UserSettings = {
             no_rich_text: this.newNoRichText,
             hide_follows: this.hideFollows,
             hide_followers: this.hideFollowers,
+            discoverable: this.discoverable,
             hide_follows_count: this.hideFollowsCount,
             hide_followers_count: this.hideFollowersCount,
             show_role: this.showRole
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index a84e6f5c..ef75ac52 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -131,6 +131,14 @@
                 for="account-show-role"
               >{{ $t('settings.show_moderator_badge') }}</label>
             </p>
+            <p>
+              <input
+                id="discoverable"
+                v-model="discoverable"
+                type="checkbox"
+              >
+              <label for="discoverable">{{ $t('settings.discoverable') }}</label>
+            </p>
             <button
               :disabled="newName && newName.length === 0"
               class="btn btn-default"
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 25579e76..52cf0f36 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -231,6 +231,7 @@
     "delete_account_description": "Permanently delete your account and all your messages.",
     "delete_account_error": "There was an issue deleting your account. If this persists please contact your instance administrator.",
     "delete_account_instructions": "Type your password in the input below to confirm account deletion.",
+    "discoverable": "Allow discovery of this account in search results and other services",
     "avatar_size_instruction": "The recommended minimum size for avatar images is 150x150 pixels.",
     "pad_emoji": "Pad emoji with spaces when adding from picker",
     "export_theme": "Save preset",
diff --git a/src/i18n/ja.json b/src/i18n/ja.json
index b4c6015d..f0ec88eb 100644
--- a/src/i18n/ja.json
+++ b/src/i18n/ja.json
@@ -226,6 +226,7 @@
     "delete_account_description": "あなたのアカウントとメッセージが、きえます。",
     "delete_account_error": "アカウントをけすことが、できなかったかもしれません。インスタンスのかんりしゃに、れんらくしてください。",
     "delete_account_instructions": "ほんとうにアカウントをけしてもいいなら、パスワードをかいてください。",
+    "discoverable": "けんさくなどのサービスで、このアカウントをみつけてもよい",
     "avatar_size_instruction": "アバターのおおきさは、150×150ピクセルか、それよりもおおきくするといいです。",
     "export_theme": "セーブ",
     "filtering": "フィルタリング",
diff --git a/src/i18n/ja_pedantic.json b/src/i18n/ja_pedantic.json
index 42bb53d4..c25f6f1d 100644
--- a/src/i18n/ja_pedantic.json
+++ b/src/i18n/ja_pedantic.json
@@ -226,6 +226,7 @@
     "delete_account_description": "あなたのアカウントとメッセージが、消えます。",
     "delete_account_error": "アカウントを消すことが、できなかったかもしれません。インスタンスの管理者に、連絡してください。",
     "delete_account_instructions": "本当にアカウントを消してもいいなら、パスワードを入力してください。",
+    "discoverable": "検索などのサービスでこのアカウントを見つけることを許可する",
     "avatar_size_instruction": "アバターの大きさは、150×150ピクセルか、それよりも大きくするといいです。",
     "export_theme": "保存",
     "filtering": "フィルタリング",
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index b6309336..fc326ad1 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -97,6 +97,7 @@ export const parseUser = (data) => {
       if (data.source.pleroma) {
         output.no_rich_text = data.source.pleroma.no_rich_text
         output.show_role = data.source.pleroma.show_role
+        output.discoverable = data.source.pleroma.discoverable
       }
     }
 
-- 
cgit v1.2.3-70-g09d2

