logo

pleroma-fe

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

report.js (1005B)


  1. import Select from '../select/select.vue'
  2. import StatusContent from '../status_content/status_content.vue'
  3. import Timeago from '../timeago/timeago.vue'
  4. import RichContent from 'src/components/rich_content/rich_content.jsx'
  5. import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
  6. const Report = {
  7. props: [
  8. 'reportId'
  9. ],
  10. components: {
  11. Select,
  12. StatusContent,
  13. Timeago,
  14. RichContent
  15. },
  16. computed: {
  17. report () {
  18. return this.$store.state.reports.reports[this.reportId] || {}
  19. },
  20. state: {
  21. get: function () { return this.report.state },
  22. set: function (val) { this.setReportState(val) }
  23. }
  24. },
  25. methods: {
  26. generateUserProfileLink (user) {
  27. return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
  28. },
  29. setReportState (state) {
  30. return this.$store.dispatch('setReportState', { id: this.report.id, state })
  31. }
  32. }
  33. }
  34. export default Report