diff --git a/src/components/report/report.js b/src/components/report/report.js index 8131dd89bd..4d9108afbb 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 7e9cc2b6a9..578b4eb1b5 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 638a3aa04e..4020773d2d 100644 --- a/src/components/report/report.vue +++ b/src/components/report/report.vue @@ -1,29 +1,5 @@