diff --git a/js/src/graphql/report.ts b/js/src/graphql/report.ts index c3d3b2bc..eac2e150 100644 --- a/js/src/graphql/report.ts +++ b/js/src/graphql/report.ts @@ -42,6 +42,11 @@ const REPORT_FRAGMENT = gql` id reported { ...ActorFragment + ... on Person { + user { + id + } + } } reporter { ...ActorFragment diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 4003abde..74cde181 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -1592,5 +1592,14 @@ "Event deleted and report resolved": "Event deleted and report resolved", "Event deleted": "Event deleted", "Comment deleted and report resolved": "Comment deleted and report resolved", - "Comment under event {eventTitle}": "Comment under event {eventTitle}" + "Comment under event {eventTitle}": "Comment under event {eventTitle}", + "Suspend profile": "Suspend profile", + "Do you really want to suspend this profile? All of the profiles content will be deleted.": "Do you really want to suspend this profile? All of the profiles content will be deleted.", + "There will be no way to restore the profile's data!": "There will be no way to restore the profile's data!", + "Suspend the profile": "Suspend the profile", + "The following user's profiles will be deleted, with all their data:": "The following user's profiles will be deleted, with all their data:", + "Do you really want to suspend the account « {emailAccount} » ?": "Do you really want to suspend the account « {emailAccount} » ?", + "There will be no way to restore the user's data!": "There will be no way to restore the user's data!", + "User suspended and report resolved": "User suspended and report resolved", + "Profile suspended and report resolved": "Profile suspended and report resolved" } \ No newline at end of file diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 81b4b84e..281bd276 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1590,5 +1590,14 @@ "Event deleted and report resolved": "Événement supprimé et signalement résolu", "Event deleted": "Événement supprimé", "Comment deleted and report resolved": "Commentaire supprimé et signalement résolu", - "Comment under event {eventTitle}": "Commentaire sous l'événement {eventTitle}" + "Comment under event {eventTitle}": "Commentaire sous l'événement {eventTitle}", + "Suspend the profile?": "Suspendre le profil ?", + "Do you really want to suspend this profile? All of the profiles content will be deleted.": "Voulez-vous vraiment suspendre ce profil ? Tout le contenu du profil sera supprimé.", + "There will be no way to restore the profile's data!": "Il n'y aura aucun moyen de restorer les données du profil !", + "Suspend the profile": "Suspendre le profil", + "The following user's profiles will be deleted, with all their data:": "Les profils suivants de l'utilisateur·ice seront supprimés, avec toutes leurs données :", + "Do you really want to suspend the account « {emailAccount} » ?": "Voulez-vous vraiment suspendre le compte « {emailAccount} » ?", + "There will be no way to restore the user's data!": "Il n'y aura aucun moyen de restorer les données de l'utilisateur·ice !", + "User suspended and report resolved": "Utilisateur suspendu et signalement résolu", + "Profile suspended and report resolved": "Profil suspendu et signalement résolu" } diff --git a/js/src/views/Moderation/ReportView.vue b/js/src/views/Moderation/ReportView.vue index 347a74ec..9d4c0111 100644 --- a/js/src/views/Moderation/ReportView.vue +++ b/js/src/views/Moderation/ReportView.vue @@ -88,7 +88,7 @@
` + + t("There will be no way to restore the profile's data!") + + `
`, + confirmText: t("Suspend the profile"), + cancelText: t("Cancel"), + variant: "danger", + onConfirm: async () => { + doSuspendProfile({ + id: actorId, + }); + return router.push({ name: RouteName.USERS }); + }, + }); +}; + +const userSuspendedProfilesMessages = (user: IUser) => { + return ( + t("The following user's profiles will be deleted, with all their data:") + + `