diff options
| author | kaniini <ariadne@dereferenced.org> | 2019-09-26 22:20:01 +0000 |
|---|---|---|
| committer | kaniini <ariadne@dereferenced.org> | 2019-09-26 22:20:01 +0000 |
| commit | 4369ce6f1bd7d6f44247a1b3f3d8d3892f71ff9b (patch) | |
| tree | 52e8326801d56af2558fb3c355efa33def742fd0 /src | |
| parent | 501208d350a9bd0fbcafb13d70a2fa6182fb8cf3 (diff) | |
| parent | aafb29c58978cbd8dbea2898b93bdab9979b5646 (diff) | |
Merge branch 'hide-followers-follows-count' into 'develop'
Added a setting to hide follow/follower count from the user profile
See merge request pleroma/pleroma-fe!951
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 4 | ||||
| -rw-r--r-- | src/components/user_settings/user_settings.vue | 22 | ||||
| -rw-r--r-- | src/i18n/en.json | 2 | ||||
| -rw-r--r-- | src/i18n/ru.json | 2 | ||||
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 4 |
5 files changed, 34 insertions, 0 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index ae04ce73..21b01476 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -41,6 +41,8 @@ const UserSettings = { newDefaultScope: this.$store.state.users.currentUser.default_scope, hideFollows: this.$store.state.users.currentUser.hide_follows, hideFollowers: this.$store.state.users.currentUser.hide_followers, + hideFollowsCount: this.$store.state.users.currentUser.hide_follows_count, + hideFollowersCount: this.$store.state.users.currentUser.hide_followers_count, showRole: this.$store.state.users.currentUser.show_role, role: this.$store.state.users.currentUser.role, pickAvatarBtnVisible: true, @@ -142,6 +144,8 @@ const UserSettings = { no_rich_text: this.newNoRichText, hide_follows: this.hideFollows, hide_followers: this.hideFollowers, + hide_follows_count: this.hideFollowsCount, + hide_followers_count: this.hideFollowersCount, show_role: this.showRole /* eslint-enable camelcase */ } }).then((user) => { diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 97833acb..a84e6f5c 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -90,6 +90,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" @@ -98,6 +107,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" @@ -619,5 +637,9 @@ width: 10em; } } + + .setting-subitem { + margin-left: 1.75em; + } } </style> diff --git a/src/i18n/en.json b/src/i18n/en.json index 3d81fdca..25579e76 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -284,6 +284,8 @@ "no_mutes": "No mutes", "hide_follows_description": "Don't show who I'm following", "hide_followers_description": "Don't show who's following me", + "hide_follows_count_description": "Don't show follow count", + "hide_followers_count_description": "Don't show follower count", "show_admin_badge": "Show Admin badge in my profile", "show_moderator_badge": "Show Moderator badge in my profile", "nsfw_clickthrough": "Enable clickthrough NSFW attachment hiding", diff --git a/src/i18n/ru.json b/src/i18n/ru.json index 3af65f40..16268425 100644 --- a/src/i18n/ru.json +++ b/src/i18n/ru.json @@ -178,6 +178,8 @@ "no_rich_text_description": "Убрать форматирование из всех постов", "hide_follows_description": "Не показывать кого я читаю", "hide_followers_description": "Не показывать кто читает меня", + "hide_follows_count_description": "Не показывать число читаемых пользователей", + "hide_followers_count_description": "Не показывать число моих подписчиков", "show_admin_badge": "Показывать значок администратора в моем профиле", "show_moderator_badge": "Показывать значок модератора в моем профиле", "nsfw_clickthrough": "Включить скрытие NSFW вложений", diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 7438cd90..b6309336 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -74,6 +74,8 @@ export const parseUser = (data) => { output.hide_follows = data.pleroma.hide_follows output.hide_followers = data.pleroma.hide_followers + output.hide_follows_count = data.pleroma.hide_follows_count + output.hide_followers_count = data.pleroma.hide_followers_count output.rights = { moderator: data.pleroma.is_moderator, @@ -140,6 +142,8 @@ export const parseUser = (data) => { output.default_scope = data.default_scope output.hide_follows = data.hide_follows output.hide_followers = data.hide_followers + output.hide_follows_count = data.hide_follows_count + output.hide_followers_count = data.hide_followers_count output.background_image = data.background_image // on mastoapi this info is contained in a "relationship" output.following = data.following |
