diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2021-01-27 13:13:10 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2021-01-27 13:13:10 +0200 |
| commit | 06f795d1d656d18d87015e3a52e090d6396a03ab (patch) | |
| tree | 296d864cee5949cb6c6d15acd9c9b4afb4583467 /src/components/report/report.js | |
| parent | e73553dca726703f83e5085560377bfaa202a5f9 (diff) | |
add proper state switcher
Diffstat (limited to 'src/components/report/report.js')
| -rw-r--r-- | src/components/report/report.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/report/report.js b/src/components/report/report.js index 8131dd89..4d9108af 100644 --- a/src/components/report/report.js +++ b/src/components/report/report.js @@ -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 }) } } } |
