From 9bd668df32a745c2e6e9b0b2c23a2d359a36c3eb Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 24 Feb 2022 10:20:40 +0100 Subject: [PATCH] improve moderation UI - add missing icons - add links to fedi user and event - clean resource creation date --- components/admin/Moderation.vue | 17 ++++++++++++----- plugins/filters.js | 3 +++ server/api/controller/resource.js | 4 +++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/components/admin/Moderation.vue b/components/admin/Moderation.vue index e48422bc..8d025f21 100644 --- a/components/admin/Moderation.vue +++ b/components/admin/Moderation.vue @@ -10,6 +10,7 @@ :items-per-page='5' :search='instancesFilter' :hide-default-footer='instances.length<5' + :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' dense :headers='instancesHeader' @click:row='instanceSelected') template(v-slot:item.blocked="{ item }") @@ -22,6 +23,7 @@ :items-per-page='5' :search='usersFilter' :hide-default-footer='users.length<5' + :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }' dense :headers='usersHeader') template(v-slot:item.blocked="{ item }") v-icon(@click='toggleUserBlock(item)' v-text='item.blocked ? mdiCheckboxIntermediate : mdiCheckboxBlankOutline') @@ -31,13 +33,16 @@ v-data-table(:items='resources' dense :headers='resourcesHeader' :hide-default-footer='resources.length<10' - :items-per-page='10') + :items-per-page='10' + :footer-props='{ prevIcon: mdiChevronLeft, nextIcon: mdiChevronRight }') template(v-slot:item.content='{ item }') span(v-html='item.data.content') + template(v-slot:item.created='{ item }') + span {{item.created | dateFormat('lll')}} template(v-slot:item.user='{ item }') - span {{item.ap_user.preferredUsername}} + a(:href='item.ap_user.url || item.ap_user.ap_id' target='_blank') {{item.ap_user.preferredUsername}} template(v-slot:item.event='{ item }') - span {{item.event.title}} + nuxt-link(:to='`/event/${item.event.slug || item.event.id}`') {{item.event.title}} template(v-slot:item.actions='{ item }') v-menu(offset-y) template(v-slot:activator="{ on }") @@ -56,13 +61,15 @@