2021-01-11 09:32:58 -08:00
|
|
|
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: [
|
2021-01-18 05:26:08 -08:00
|
|
|
'reportId'
|
2021-01-11 09:32:58 -08:00
|
|
|
],
|
|
|
|
components: {
|
|
|
|
StatusContent,
|
|
|
|
Timeago
|
|
|
|
},
|
2021-01-18 05:26:08 -08:00
|
|
|
computed: {
|
|
|
|
report () {
|
|
|
|
return this.$store.state.reports.reports[this.reportId] || {}
|
|
|
|
}
|
|
|
|
},
|
2021-01-11 09:32:58 -08:00
|
|
|
methods: {
|
|
|
|
generateUserProfileLink (user) {
|
|
|
|
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
|
|
|
},
|
|
|
|
setReportState (id, state) {
|
2021-01-18 05:26:08 -08:00
|
|
|
return this.$store.dispatch('setReportState', { id, state })
|
2021-01-11 09:32:58 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Report
|