Hide groups and multiple fixes
Closes #169 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<section class="container">
|
||||
<nav class="breadcrumb" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><router-link :to="{ name: AdminRouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: ModerationRouteName.LOGS }" aria-current="page">Logs</router-link></li>
|
||||
<li><router-link :to="{ name: RouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: RouteName.LOGS }" aria-current="page">Logs</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<ul v-if="actionLogs.length > 0">
|
||||
@@ -12,17 +12,17 @@
|
||||
<img class="image" :src="log.actor.avatar.url" />
|
||||
<span>@{{ log.actor.preferredUsername }}</span>
|
||||
<span v-if="log.action === ActionLogAction.REPORT_UPDATE_CLOSED">
|
||||
closed <router-link :to="{ name: ModerationRouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link>
|
||||
closed <router-link :to="{ name: RouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link>
|
||||
</span>
|
||||
<span v-else-if="log.action === ActionLogAction.REPORT_UPDATE_OPENED">
|
||||
reopened <router-link :to="{ name: ModerationRouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link>
|
||||
reopened <router-link :to="{ name: RouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link>
|
||||
</span>
|
||||
<span v-else-if="log.action === ActionLogAction.REPORT_UPDATE_RESOLVED">
|
||||
marked <router-link :to="{ name: ModerationRouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link> as resolved
|
||||
marked <router-link :to="{ name: RouteName.REPORT, params: { reportId: log.object.id } }">report #{{ log.object.id }}</router-link> as resolved
|
||||
</span>
|
||||
<span v-else-if="log.action === ActionLogAction.NOTE_CREATION">
|
||||
added a note on
|
||||
<router-link v-if="log.object.report" :to="{ name: ModerationRouteName.REPORT, params: { reportId: log.object.report.id } }">report #{{ log.object.report.id }}</router-link>
|
||||
<router-link v-if="log.object.report" :to="{ name: RouteName.REPORT, params: { reportId: log.object.report.id } }">report #{{ log.object.report.id }}</router-link>
|
||||
<span v-else>a non-existent report</span>
|
||||
</span>
|
||||
<span v-else-if="log.action === ActionLogAction.EVENT_DELETION">
|
||||
@@ -44,8 +44,7 @@ import { Component, Vue } from 'vue-property-decorator';
|
||||
import { IActionLog, ActionLogAction } from '@/types/report.model';
|
||||
import { LOGS } from '@/graphql/report';
|
||||
import ReportCard from '@/components/Report/ReportCard.vue';
|
||||
import { AdminRouteName } from '@/router/admin';
|
||||
import { ModerationRouteName } from '@/router/moderation';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -62,8 +61,7 @@ export default class ReportList extends Vue {
|
||||
actionLogs?: IActionLog[] = [];
|
||||
|
||||
ActionLogAction = ActionLogAction;
|
||||
AdminRouteName = AdminRouteName;
|
||||
ModerationRouteName = ModerationRouteName;
|
||||
RouteName = RouteName;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<div class="container" v-if="report">
|
||||
<nav class="breadcrumb" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><router-link :to="{ name: AdminRouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li><router-link :to="{ name: ModerationRouteName.REPORTS }">Reports</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: ModerationRouteName.REPORT, params: { reportId: this.report.id} }" aria-current="page">Report</router-link></li>
|
||||
<li><router-link :to="{ name: RouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li><router-link :to="{ name: RouteName.REPORTS }">Reports</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: RouteName.REPORT, params: { reportId: this.report.id} }" aria-current="page">Report</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="buttons">
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr>
|
||||
<td>Compte signalé</td>
|
||||
<td>
|
||||
<router-link :to="{ name: ActorRouteName.PROFILE, params: { name: report.reported.preferredUsername } }">
|
||||
<router-link :to="{ name: RouteName.PROFILE, params: { name: report.reported.preferredUsername } }">
|
||||
<img v-if="report.reported.avatar" class="image" :src="report.reported.avatar.url" /> @{{ report.reported.preferredUsername }}
|
||||
</router-link>
|
||||
</td>
|
||||
@@ -30,7 +30,7 @@
|
||||
<tr>
|
||||
<td>Signalé par</td>
|
||||
<td>
|
||||
<router-link :to="{ name: ActorRouteName.PROFILE, params: { name: report.reporter.preferredUsername } }">
|
||||
<router-link :to="{ name: RouteName.PROFILE, params: { name: report.reporter.preferredUsername } }">
|
||||
<img v-if="report.reporter.avatar" class="image" :src="report.reporter.avatar.url" /> @{{ report.reporter.preferredUsername }}
|
||||
</router-link>
|
||||
</td>
|
||||
@@ -66,14 +66,14 @@
|
||||
</div>
|
||||
|
||||
<div class="box" v-if="report.event">
|
||||
<router-link :to="{ name: EventRouteName.EVENT, params: { uuid: report.event.uuid }}">
|
||||
<router-link :to="{ name: RouteName.EVENT, params: { uuid: report.event.uuid }}">
|
||||
<h3 class="title">{{ report.event.title }}</h3>
|
||||
<p v-html="report.event.description"></p>
|
||||
</router-link>
|
||||
<b-button
|
||||
tag="router-link"
|
||||
type="is-primary"
|
||||
:to="{ name: EventRouteName.EDIT_EVENT, params: {eventId: report.event.uuid } }"
|
||||
:to="{ name: RouteName.EDIT_EVENT, params: {eventId: report.event.uuid } }"
|
||||
icon-left="pencil"
|
||||
size="is-small">Edit</b-button>
|
||||
<b-button
|
||||
@@ -86,7 +86,7 @@
|
||||
<h2 class="title" v-if="report.notes.length > 0">Notes</h2>
|
||||
<div class="box note" v-for="note in report.notes" :id="`note-${note.id}`">
|
||||
<p>{{ note.content }}</p>
|
||||
<router-link :to="{ name: ActorRouteName.PROFILE, params: { name: note.moderator.preferredUsername } }">
|
||||
<router-link :to="{ name: RouteName.PROFILE, params: { name: note.moderator.preferredUsername } }">
|
||||
<img class="image" :src="note.moderator.avatar.url" /> @{{ note.moderator.preferredUsername }}
|
||||
</router-link><br />
|
||||
<small><a :href="`#note-${note.id}`" v-if="note.insertedAt">{{ note.insertedAt | formatDateTimeString }}</a></small>
|
||||
@@ -105,10 +105,7 @@
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { CREATE_REPORT_NOTE, REPORT, REPORTS, UPDATE_REPORT } from '@/graphql/report';
|
||||
import { IReport, IReportNote, ReportStatusEnum } from '@/types/report.model';
|
||||
import { EventRouteName } from '@/router/event';
|
||||
import { ActorRouteName } from '@/router/actor';
|
||||
import { AdminRouteName } from '@/router/admin';
|
||||
import { ModerationRouteName } from '@/router/moderation';
|
||||
import { RouteName } from '@/router';
|
||||
import { CURRENT_ACTOR_CLIENT } from '@/graphql/actor';
|
||||
import { IPerson } from '@/types/actor';
|
||||
import { DELETE_EVENT } from '@/graphql/event';
|
||||
@@ -139,10 +136,7 @@ export default class Report extends Vue {
|
||||
errors: string[] = [];
|
||||
|
||||
ReportStatusEnum = ReportStatusEnum;
|
||||
EventRouteName = EventRouteName;
|
||||
ActorRouteName = ActorRouteName;
|
||||
AdminRouteName = AdminRouteName;
|
||||
ModerationRouteName = ModerationRouteName;
|
||||
RouteName = RouteName;
|
||||
|
||||
noteContent: string = '';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<section class="container">
|
||||
<nav class="breadcrumb" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><router-link :to="{ name: AdminRouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: ModerationRouteName.REPORTS }" aria-current="page">Reports</router-link></li>
|
||||
<li><router-link :to="{ name: RouteName.DASHBOARD }">Dashboard</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: RouteName.REPORTS }" aria-current="page">Reports</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<b-field>
|
||||
@@ -22,7 +22,7 @@
|
||||
</b-field>
|
||||
<ul v-if="reports.length > 0">
|
||||
<li v-for="report in reports">
|
||||
<router-link :to="{ name: ModerationRouteName.REPORT, params: { reportId: report.id } }">
|
||||
<router-link :to="{ name: RouteName.REPORT, params: { reportId: report.id } }">
|
||||
<report-card :report="report" />
|
||||
</router-link>
|
||||
</li>
|
||||
@@ -39,8 +39,7 @@ import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
||||
import { IReport, ReportStatusEnum } from '@/types/report.model';
|
||||
import { REPORTS } from '@/graphql/report';
|
||||
import ReportCard from '@/components/Report/ReportCard.vue';
|
||||
import { AdminRouteName } from '@/router/admin';
|
||||
import { ModerationRouteName } from '@/router/moderation';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -62,8 +61,7 @@ import { ModerationRouteName } from '@/router/moderation';
|
||||
export default class ReportList extends Vue {
|
||||
|
||||
reports?: IReport[] = [];
|
||||
AdminRouteName = AdminRouteName;
|
||||
ModerationRouteName = ModerationRouteName;
|
||||
RouteName = RouteName;
|
||||
ReportStatusEnum = ReportStatusEnum;
|
||||
filterReports: ReportStatusEnum = ReportStatusEnum.OPEN;
|
||||
|
||||
@@ -78,7 +76,7 @@ export default class ReportList extends Vue {
|
||||
|
||||
@Watch('filterReports', { immediate: true })
|
||||
async onFilterChanged (val: string) {
|
||||
await this.$router.push({ name: ModerationRouteName.REPORTS, params: { filter: val.toLowerCase() } });
|
||||
await this.$router.push({ name: RouteName.REPORTS, params: { filter: val.toLowerCase() } });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user