separated component
This commit is contained in:
parent
a4e3cccf1c
commit
8674f20023
8 changed files with 171 additions and 61 deletions
23
src/components/report/report.js
Normal file
23
src/components/report/report.js
Normal file
|
|
@ -0,0 +1,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
|
||||
Loading…
Add table
Add a link
Reference in a new issue