Merge branch 'add-missing-comment-deletion-action-log-type' into 'master'
Fix missing deleted comment moderation logaction See merge request framasoft/mobilizon!915
This commit is contained in:
commit
1b1022f33f
@ -185,6 +185,21 @@ export const LOGS = gql`
|
||||
id
|
||||
title
|
||||
}
|
||||
... on Comment {
|
||||
id
|
||||
text
|
||||
event {
|
||||
id
|
||||
title
|
||||
uuid
|
||||
}
|
||||
actor {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
}
|
||||
}
|
||||
... on Person {
|
||||
id
|
||||
preferredUsername
|
||||
|
@ -987,5 +987,8 @@
|
||||
"Error while loading the preview": "Error while loading the preview",
|
||||
"Instance feeds": "Instance feeds",
|
||||
"{moderator} suspended group {profile}": "{moderator} suspended group {profile}",
|
||||
"{moderator} has unsuspended group {profile}": "{moderator} has unsuspended group {profile}"
|
||||
"{moderator} has unsuspended group {profile}": "{moderator} has unsuspended group {profile}",
|
||||
"{moderator} has done an unknown action": "{moderator} has done an unknown action",
|
||||
"{moderator} has deleted a comment from {author} under the event {event}": "{moderator} has deleted a comment from {author} under the event {event}",
|
||||
"{moderator} has deleted a comment from {author}": "{moderator} has deleted a comment from {author}"
|
||||
}
|
||||
|
@ -1081,5 +1081,8 @@
|
||||
"Error while loading the preview": "Erreur lors du chargement de l'aperçu",
|
||||
"Instance feeds": "Flux de l'instance",
|
||||
"{moderator} suspended group {profile}": "{moderator} a suspendu le groupe {profile}",
|
||||
"{moderator} has unsuspended group {profile}": "{moderator} a annulé la suspension du groupe {profile}"
|
||||
"{moderator} has unsuspended group {profile}": "{moderator} a annulé la suspension du groupe {profile}",
|
||||
"{moderator} has done an unknown action": "{moderator} a effectué une action inconnue",
|
||||
"{moderator} has deleted a comment from {author} under the event {event}": "{moderator} a supprimé un commentaire de {author} sous l'événement {event}",
|
||||
"{moderator} has deleted a comment from {author}": "{moderator} a supprimé un commentaire de {author}"
|
||||
}
|
||||
|
@ -270,6 +270,83 @@
|
||||
</router-link>
|
||||
<b v-else slot="user">{{ log.object.email }}</b>
|
||||
</i18n>
|
||||
<span
|
||||
v-else-if="
|
||||
log.action === ActionLogAction.COMMENT_DELETION &&
|
||||
log.object.event
|
||||
"
|
||||
>
|
||||
<i18n
|
||||
tag="span"
|
||||
path="{moderator} has deleted a comment from {author} under the event {event}"
|
||||
>
|
||||
<router-link
|
||||
slot="moderator"
|
||||
:to="{
|
||||
name: RouteName.ADMIN_PROFILE,
|
||||
params: { id: log.actor.id },
|
||||
}"
|
||||
>@{{ log.actor.preferredUsername }}</router-link
|
||||
>
|
||||
<router-link
|
||||
v-if="log.object.event && log.object.event.uuid"
|
||||
slot="event"
|
||||
:to="{
|
||||
name: RouteName.EVENT,
|
||||
params: { uuid: log.object.event.uuid },
|
||||
}"
|
||||
>{{ log.object.event.title }}
|
||||
</router-link>
|
||||
<b v-else slot="event">{{ log.object.event.title }}</b>
|
||||
<router-link
|
||||
slot="author"
|
||||
:to="{
|
||||
name: RouteName.ADMIN_PROFILE,
|
||||
params: { id: log.object.actor.id },
|
||||
}"
|
||||
>{{ displayNameAndUsername(log.object.actor) }}
|
||||
</router-link>
|
||||
</i18n>
|
||||
<pre v-html="log.object.text" />
|
||||
</span>
|
||||
<span v-else-if="log.action === ActionLogAction.COMMENT_DELETION">
|
||||
<i18n
|
||||
tag="span"
|
||||
path="{moderator} has deleted a comment from {author}"
|
||||
>
|
||||
<router-link
|
||||
slot="moderator"
|
||||
:to="{
|
||||
name: RouteName.ADMIN_PROFILE,
|
||||
params: { id: log.actor.id },
|
||||
}"
|
||||
>@{{ log.actor.preferredUsername }}</router-link
|
||||
>
|
||||
<router-link
|
||||
slot="author"
|
||||
:to="{
|
||||
name: RouteName.ADMIN_PROFILE,
|
||||
params: { id: log.object.actor.id },
|
||||
}"
|
||||
>{{ displayNameAndUsername(log.object.actor) }}
|
||||
</router-link>
|
||||
</i18n>
|
||||
<pre v-html="log.object.text" />
|
||||
</span>
|
||||
<i18n
|
||||
v-else
|
||||
tag="span"
|
||||
path="{moderator} has done an unknown action"
|
||||
>
|
||||
<router-link
|
||||
slot="moderator"
|
||||
:to="{
|
||||
name: RouteName.ADMIN_PROFILE,
|
||||
params: { id: log.actor.id },
|
||||
}"
|
||||
>@{{ log.actor.preferredUsername }}</router-link
|
||||
>
|
||||
</i18n>
|
||||
<br />
|
||||
<small>{{ log.insertedAt | formatDateTimeString }}</small>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@ defmodule Mobilizon.GraphQL.Schema.Discussions.CommentType do
|
||||
|
||||
import Absinthe.Resolution.Helpers, only: [dataloader: 1]
|
||||
|
||||
alias Mobilizon.{Actors, Discussions}
|
||||
alias Mobilizon.{Actors, Discussions, Events}
|
||||
alias Mobilizon.GraphQL.Resolvers.Comment
|
||||
|
||||
@desc "A comment"
|
||||
|
Loading…
Reference in New Issue
Block a user