See #890: Collapse report on resolution instead of reloading the page

This commit is contained in:
Eliot Berriot 2019-09-02 11:37:20 +02:00
parent fb0dcf4568
commit 43dfab9a82
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 32 additions and 2 deletions

View file

@ -5,8 +5,10 @@
<router-link :to="{name: 'manage.moderation.reports.detail', params: {id: obj.uuid}}">
<translate translate-context="Content/Moderation/Card/Short" :translate-params="{id: obj.uuid.substring(0, 8)}">Report %{ id }</translate>
</router-link>
<collapse-link class="right floated" v-model="isCollapsed"></collapse-link>
</div>
<div class="content">
<div class="ui hidden divider"></div>
<div class="ui stackable two column grid">
<div class="column">
<table class="ui very basic unstackable table">
@ -99,7 +101,7 @@
</div>
</div>
</div>
<div class="main content">
<div class="main content" v-if="!isCollapsed">
<div class="ui stackable two column grid">
<div class="column">
<h3>
@ -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