Merge branch 'develop' into feature/following_reblogs
This commit is contained in:
commit
541a71c3a5
31 changed files with 217 additions and 49 deletions
|
@ -1,24 +1,41 @@
|
|||
import PostStatusForm from '../post_status_form/post_status_form.vue'
|
||||
import get from 'lodash/get'
|
||||
|
||||
const PostStatusModal = {
|
||||
components: {
|
||||
PostStatusForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
resettingForm: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isLoggedIn () {
|
||||
return !!this.$store.state.users.currentUser
|
||||
},
|
||||
isOpen () {
|
||||
return this.isLoggedIn && this.$store.state.postStatus.modalActivated
|
||||
modalActivated () {
|
||||
return this.$store.state.postStatus.modalActivated
|
||||
},
|
||||
isFormVisible () {
|
||||
return this.isLoggedIn && !this.resettingForm && this.modalActivated
|
||||
},
|
||||
params () {
|
||||
return this.$store.state.postStatus.params || {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isOpen (val) {
|
||||
params (newVal, oldVal) {
|
||||
if (get(newVal, 'repliedUser.id') !== get(oldVal, 'repliedUser.id')) {
|
||||
this.resettingForm = true
|
||||
this.$nextTick(() => {
|
||||
this.resettingForm = false
|
||||
})
|
||||
}
|
||||
},
|
||||
isFormVisible (val) {
|
||||
if (val) {
|
||||
this.$nextTick(() => this.$el.querySelector('textarea').focus())
|
||||
this.$nextTick(() => this.$el && this.$el.querySelector('textarea').focus())
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="isOpen"
|
||||
v-if="isLoggedIn && !resettingForm"
|
||||
v-show="modalActivated"
|
||||
class="post-form-modal-view modal-view"
|
||||
@click="closeModal"
|
||||
>
|
||||
|
|
|
@ -122,6 +122,17 @@
|
|||
{{ $t("nav.about") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li
|
||||
v-if="currentUser && currentUser.role === 'admin'"
|
||||
@click="toggleDrawer"
|
||||
>
|
||||
<a
|
||||
href="/pleroma/admin/#/login-pleroma"
|
||||
target="_blank"
|
||||
>
|
||||
{{ $t("nav.administration") }}
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
v-if="currentUser"
|
||||
@click="toggleDrawer"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue