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 }) } } } diff --git a/src/components/report/report.scss b/src/components/report/report.scss index 7e9cc2b6..578b4eb1 100644 --- a/src/components/report/report.scss +++ b/src/components/report/report.scss @@ -2,7 +2,11 @@ .Report { .report-content { - margin: 0.5em 0; + margin: 0.5em 0 1em; + } + + .report-state { + margin: 0.5em 0 1em; } .reported-status { diff --git a/src/components/report/report.vue b/src/components/report/report.vue index 638a3aa0..4020773d 100644 --- a/src/components/report/report.vue +++ b/src/components/report/report.vue @@ -1,29 +1,5 @@