aboutsummaryrefslogtreecommitdiff
path: root/src/components/report/report.js
blob: e81417a84a898ec57d6f9360bcc5693fee4ffb6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import StatusContent from '../status_content/status_content.vue'
import Timeago from '../timeago/timeago.vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'

const Report = {
  props: [
    'report'
  ],
  components: {
    StatusContent,
    Timeago
  },
  methods: {
    generateUserProfileLink (user) {
      return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
    },
    setReportState (id, state) {
      return this.$store.state.api.backendInteractor.setReportState({ id, state })
    }
  }
}

export default Report