Merge remote-tracking branch 'upstream/develop' into develop

develop
Your New SJW Waifu 5 years ago
commit b9814a2afd

@ -41,8 +41,11 @@ 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,
discoverable: this.$store.state.users.currentUser.discoverable,
pickAvatarBtnVisible: true,
bannerUploading: false,
backgroundUploading: false,
@ -142,6 +145,9 @@ 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
/* eslint-enable camelcase */
} }).then((user) => {

@ -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"
@ -113,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"
@ -619,5 +645,9 @@
width: 10em;
}
}
.setting-subitem {
margin-left: 1.75em;
}
}
</style>

@ -16,21 +16,11 @@ const WhoToFollow = {
methods: {
showWhoToFollow (reply) {
reply.forEach((i, index) => {
const user = {
id: 0,
name: i.display_name,
screen_name: i.acct,
profile_image_url: i.avatar || '/images/avi.png',
profile_image_url_original: i.avatar || '/images/avi.png',
statusnet_profile_url: i.url
}
this.users.push(user)
this.$store.state.api.backendInteractor.fetchUser({ id: user.screen_name })
this.$store.state.api.backendInteractor.fetchUser({ id: i.acct })
.then((externalUser) => {
if (!externalUser.error) {
this.$store.commit('addNewUsers', [externalUser])
user.id = externalUser.id
this.users.push(externalUser)
}
})
})

@ -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",
@ -284,6 +285,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",

@ -226,6 +226,7 @@
"delete_account_description": "あなたのアカウントとメッセージが、きえます。",
"delete_account_error": "アカウントをけすことが、できなかったかもしれません。インスタンスのかんりしゃに、れんらくしてください。",
"delete_account_instructions": "ほんとうにアカウントをけしてもいいなら、パスワードをかいてください。",
"discoverable": "けんさくなどのサービスで、このアカウントをみつけてもよい",
"avatar_size_instruction": "アバターのおおきさは、150×150ピクセルか、それよりもおおきくするといいです。",
"export_theme": "セーブ",
"filtering": "フィルタリング",

@ -226,6 +226,7 @@
"delete_account_description": "あなたのアカウントとメッセージが、消えます。",
"delete_account_error": "アカウントを消すことが、できなかったかもしれません。インスタンスの管理者に、連絡してください。",
"delete_account_instructions": "本当にアカウントを消してもいいなら、パスワードを入力してください。",
"discoverable": "検索などのサービスでこのアカウントを見つけることを許可する",
"avatar_size_instruction": "アバターの大きさは、150×150ピクセルか、それよりも大きくするといいです。",
"export_theme": "保存",
"filtering": "フィルタリング",

@ -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 вложений",

@ -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,
@ -95,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
}
}
@ -140,6 +143,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

@ -278,10 +278,12 @@ describe('API Entities normalizer', () => {
})
it('adds hide_follows and hide_followers user settings', () => {
const user = makeMockUserMasto({ pleroma: { hide_followers: true, hide_follows: false } })
const user = makeMockUserMasto({ pleroma: { hide_followers: true, hide_follows: false, hide_followers_count: false, hide_follows_count: true } })
expect(parseUser(user)).to.have.property('hide_followers', true)
expect(parseUser(user)).to.have.property('hide_follows', false)
expect(parseUser(user)).to.have.property('hide_followers_count', false)
expect(parseUser(user)).to.have.property('hide_follows_count', true)
})
})

Loading…
Cancel
Save