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

* upstream/develop:
  fix orders of a buttons
  revert lint autofix
  fix position account actions
  removed unused code
  update css
  remove unused code
  change icon
  fix follow request on search page
  updated user_card
  Revert "added acccount_actions component"
  [i18n] spanish new strings translations
  added acccount_actions component
  revert font
  use `repeats` intead `boosts`
  fontello/ added `eye` icon
  added support hide\show reblogs from a specific user
This commit is contained in:
Henry Jameson 2019-10-15 09:27:54 +03:00
commit 9e0c14bb33
15 changed files with 283 additions and 137 deletions

View file

@ -60,6 +60,18 @@ const unmuteUser = (store, id) => {
.then((relationship) => store.commit('updateUserRelationship', [relationship]))
}
const hideReblogs = (store, userId) => {
return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: false })
.then((relationship) => {
store.commit('updateUserRelationship', [relationship])
})
}
const showReblogs = (store, userId) => {
return store.rootState.api.backendInteractor.followUser({ id: userId, reblogs: true })
.then((relationship) => store.commit('updateUserRelationship', [relationship]))
}
export const mutations = {
setMuted (state, { user: { id }, muted }) {
const user = state.usersObject[id]
@ -135,6 +147,7 @@ export const mutations = {
user.muted = relationship.muting
user.statusnet_blocking = relationship.blocking
user.subscribed = relationship.subscribing
user.showing_reblogs = relationship.showing_reblogs
}
})
},
@ -272,6 +285,12 @@ const users = {
unmuteUser (store, id) {
return unmuteUser(store, id)
},
hideReblogs (store, id) {
return hideReblogs(store, id)
},
showReblogs (store, id) {
return showReblogs(store, id)
},
muteUsers (store, ids = []) {
return Promise.all(ids.map(id => muteUser(store, id)))
},