logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

mute_card.js (806B)


  1. import BasicUserCard from '../basic_user_card/basic_user_card.vue'
  2. const MuteCard = {
  3. props: ['userId'],
  4. data () {
  5. return {
  6. progress: false
  7. }
  8. },
  9. computed: {
  10. user () {
  11. return this.$store.getters.findUser(this.userId)
  12. },
  13. relationship () {
  14. return this.$store.getters.relationship(this.userId)
  15. },
  16. muted () {
  17. return this.relationship.muting
  18. }
  19. },
  20. components: {
  21. BasicUserCard
  22. },
  23. methods: {
  24. unmuteUser () {
  25. this.progress = true
  26. this.$store.dispatch('unmuteUser', this.userId).then(() => {
  27. this.progress = false
  28. })
  29. },
  30. muteUser () {
  31. this.progress = true
  32. this.$store.dispatch('muteUser', this.userId).then(() => {
  33. this.progress = false
  34. })
  35. }
  36. }
  37. }
  38. export default MuteCard