diff --git a/front/src/components/common/CollapseLink.vue b/front/src/components/common/CollapseLink.vue new file mode 100644 index 000000000..072a3282b --- /dev/null +++ b/front/src/components/common/CollapseLink.vue @@ -0,0 +1,20 @@ + + diff --git a/front/src/components/globals.js b/front/src/components/globals.js index 4131c5d15..e22a67a8c 100644 --- a/front/src/components/globals.js +++ b/front/src/components/globals.js @@ -51,4 +51,9 @@ Vue.component('empty-state', EmptyState) import ExpandableDiv from '@/components/common/ExpandableDiv' Vue.component('expandable-div', ExpandableDiv) + +import CollapseLink from '@/components/common/CollapseLink' + +Vue.component('collapse-link', CollapseLink) + export default {} diff --git a/front/src/components/manage/moderation/ReportCard.vue b/front/src/components/manage/moderation/ReportCard.vue index 32dcea4cc..99c571291 100644 --- a/front/src/components/manage/moderation/ReportCard.vue +++ b/front/src/components/manage/moderation/ReportCard.vue @@ -5,8 +5,10 @@ Report %{ id } +
+
@@ -99,7 +101,7 @@ -
+

@@ -247,6 +249,7 @@ export default { return { markdown: new showdown.Converter(), isLoading: false, + isCollapsed: false, } }, computed: { @@ -354,8 +357,10 @@ export default { axios.patch(url, {is_handled: v}).then((response) => { self.$emit('handled', v) self.isLoading = false + self.obj.is_handled = v let increment if (v) { + self.isCollapsed = true increment = -1 } else { increment = 1 diff --git a/front/src/views/admin/moderation/ReportsList.vue b/front/src/views/admin/moderation/ReportsList.vue index e8a7e3ed4..5a3b48c60 100644 --- a/front/src/views/admin/moderation/ReportsList.vue +++ b/front/src/views/admin/moderation/ReportsList.vue @@ -55,7 +55,7 @@

- +