add proper state switcher
This commit is contained in:
parent
e73553dca7
commit
06f795d1d6
5 changed files with 39 additions and 37 deletions
|
|
@ -13,14 +13,19 @@ const Report = {
|
|||
computed: {
|
||||
report () {
|
||||
return this.$store.state.reports.reports[this.reportId] || {}
|
||||
},
|
||||
state: {
|
||||
get: function () { return this.report.state },
|
||||
set: function (val) { this.setReportState(val) }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
generateUserProfileLink (user) {
|
||||
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
||||
},
|
||||
setReportState (id, state) {
|
||||
return this.$store.dispatch('setReportState', { id, state })
|
||||
setReportState (state) {
|
||||
console.log('setting state', state)
|
||||
return this.$store.dispatch('setReportState', { id: this.report.id, state })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue