From 8674f2002320aaa6c380488b0eab636a53c76705 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 11 Jan 2021 19:32:58 +0200 Subject: separated component --- src/components/report/report.scss | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/report/report.scss (limited to 'src/components/report/report.scss') diff --git a/src/components/report/report.scss b/src/components/report/report.scss new file mode 100644 index 00000000..7e9cc2b6 --- /dev/null +++ b/src/components/report/report.scss @@ -0,0 +1,39 @@ +@import '../../_variables.scss'; + +.Report { + .report-content { + margin: 0.5em 0; + } + + .reported-status { + border: 1px solid $fallback--faint; + border-color: var(--faint, $fallback--faint); + border-radius: $fallback--inputRadius; + border-radius: var(--inputRadius, $fallback--inputRadius); + color: $fallback--text; + color: var(--text, $fallback--text); + display: block; + padding: 0.5em; + margin: 0.5em 0; + + .status-content { + pointer-events: none; + } + + .reported-status-heading { + display: flex; + width: 100%; + justify-content: space-between; + margin-bottom: 0.2em; + } + + .reported-status-name { + font-weight: bold; + } + } + + .note { + width: 100%; + margin-bottom: 0.5em; + } +} -- cgit v1.2.3-70-g09d2 From 06f795d1d656d18d87015e3a52e090d6396a03ab Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 27 Jan 2021 13:13:10 +0200 Subject: add proper state switcher --- src/components/report/report.js | 9 +++++++-- src/components/report/report.scss | 6 +++++- src/components/report/report.vue | 33 +++++++++++++++------------------ src/modules/reports.js | 7 ++++--- src/services/api/api.service.js | 7 +------ 5 files changed, 32 insertions(+), 30 deletions(-) (limited to 'src/components/report/report.scss') 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,19 +1,32 @@