This commit is contained in:
Shpuld Shpuldson 2021-01-18 15:26:08 +02:00
commit e73553dca7
6 changed files with 75 additions and 13 deletions

View file

@ -4,18 +4,23 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p
const Report = {
props: [
'report'
'reportId'
],
components: {
StatusContent,
Timeago
},
computed: {
report () {
return this.$store.state.reports.reports[this.reportId] || {}
}
},
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 })
return this.$store.dispatch('setReportState', { id, state })
}
}
}