refactor: Rename "suspend" into "ban" for account deletion
This commit is contained in:
@@ -76,7 +76,7 @@ export const VALIDATE_EMAIL = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_ACCOUNT = gql`
|
||||
export const DELETE_ACCOUNT_AS_USER = gql`
|
||||
mutation DeleteAccount($password: String, $userId: ID) {
|
||||
deleteAccount(password: $password, userId: $userId) {
|
||||
id
|
||||
@@ -84,8 +84,8 @@ export const DELETE_ACCOUNT = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const SUSPEND_USER = gql`
|
||||
mutation SuspendUser($userId: ID) {
|
||||
export const DELETE_ACCOUNT_AS_MODERATOR = gql`
|
||||
mutation DeleteAccount($userId: ID) {
|
||||
deleteAccount(userId: $userId) {
|
||||
id
|
||||
}
|
||||
|
||||
@@ -368,8 +368,8 @@
|
||||
"Displayed on homepage and meta tags. Describe what Mobilizon is and what makes this instance special in a single paragraph.": "Displayed on homepage and meta tags. Describe what Mobilizon is and what makes this instance special in a single paragraph.",
|
||||
"Distance": "Distance",
|
||||
"Do not receive any mail": "Do not receive any mail",
|
||||
"Do you really want to suspend the account \u00ab\u00a0{emailAccount}\u00a0\u00bb\u00a0?": "Do you really want to suspend the account \u00ab\u00a0{emailAccount}\u00a0\u00bb\u00a0?",
|
||||
"Do you really want to suspend this account? All of the user's profiles will be deleted.": "Do you really want to suspend this account? All of the user's profiles will be deleted.",
|
||||
"Do you really want to ban the account \u00ab\u00a0{emailAccount}\u00a0\u00bb\u00a0?": "Do you really want to ban the account \u00ab\u00a0{emailAccount}\u00a0\u00bb\u00a0?",
|
||||
"Do you really want to ban this account? All of the user's profiles will be deleted.": "Do you really want to ban this account? All of the user's profiles will be deleted.",
|
||||
"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.",
|
||||
"Do you wish to {create_event} or {explore_events}?": "Do you wish to {create_event} or {explore_events}?",
|
||||
"Do you wish to {create_group} or {explore_groups}?": "Do you wish to {create_group} or {explore_groups}?",
|
||||
@@ -1113,9 +1113,10 @@
|
||||
"Subtitles": "Subtitles",
|
||||
"Suggestions:": "Suggestions:",
|
||||
"Suspend": "Suspend",
|
||||
"Ban": "Ban",
|
||||
"Suspend group": "Suspend group",
|
||||
"Suspend the account": "Suspend the account",
|
||||
"Suspend the account?": "Suspend the account?",
|
||||
"Ban the account": "Ban the account",
|
||||
"Ban the account?": "Ban the account?",
|
||||
"Suspend the profile": "Suspend the profile",
|
||||
"Suspend the profile?": "Suspend the profile?",
|
||||
"Suspended": "Suspended",
|
||||
@@ -1192,7 +1193,7 @@
|
||||
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "The report will be sent to the moderators of your instance. You can explain why you report this content below.",
|
||||
"The selected picture is too heavy. You need to select a file smaller than {size}.": "The selected picture is too heavy. You need to select a file smaller than {size}.",
|
||||
"The technical details of the error can help developers solve the problem more easily. Please add them to your feedback.": "The technical details of the error can help developers solve the problem more easily. Please add them to your feedback.",
|
||||
"The user has been disabled": "The user has been disabled",
|
||||
"The user has been banned": "The user has been banned",
|
||||
"The videoconference will be created on {service}": "The videoconference will be created on {service}",
|
||||
"The {default_privacy_policy} will be used. They will be translated in the user's language.": "The {default_privacy_policy} will be used. They will be translated in the user's language.",
|
||||
"The {default_terms} will be used. They will be translated in the user's language.": "The {default_terms} will be used. They will be translated in the user's language.",
|
||||
@@ -1285,7 +1286,7 @@
|
||||
"This post is accessible only for members. You have access to it for moderation purposes only because you are an instance moderator.": "This post is accessible only for members. You have access to it for moderation purposes only because you are an instance moderator.",
|
||||
"This post is accessible only through it's link. Be careful where you post this link.": "This post is accessible only through it's link. Be careful where you post this link.",
|
||||
"This profile is from another instance, the informations shown here may be incomplete.": "This profile is from another instance, the informations shown here may be incomplete.",
|
||||
"This profile is located on this instance, so you need to {access_the_corresponding_account} to suspend it.": "This profile is located on this instance, so you need to {access_the_corresponding_account} to suspend it.",
|
||||
"This profile is located on this instance, so you need to {access_the_corresponding_account} to ban it.": "This profile is located on this instance, so you need to {access_the_corresponding_account} to ban it.",
|
||||
"This profile was not found": "This profile was not found",
|
||||
"This section lets you add links to external websites to the menu.": "This section lets you add links to external websites to the menu.",
|
||||
"This setting will be used to display the website and send you emails in the correct language.": "This setting will be used to display the website and send you emails in the correct language.",
|
||||
|
||||
@@ -366,8 +366,8 @@
|
||||
"Domain or instance name": "Domaine ou nom de l'instance",
|
||||
"Domain": "Domaine",
|
||||
"Do not receive any mail": "Ne pas recevoir d'e-mail",
|
||||
"Do you really want to suspend the account « {emailAccount} » ?": "Voulez-vous vraiment suspendre le compte « {emailAccount} » ?",
|
||||
"Do you really want to suspend this account? All of the user's profiles will be deleted.": "Voulez-vous vraiment suspendre ce compte ? Tous les profils de cet·te utilisateur·ice seront supprimés.",
|
||||
"Do you really want to ban the account « {emailAccount} » ?": "Voulez-vous vraiment bannir le compte « {emailAccount} » ?",
|
||||
"Do you really want to ban this account? All of the user's profiles will be deleted.": "Voulez-vous vraiment bannir ce compte ? Tous les profils de cet·te utilisateur·ice seront supprimés.",
|
||||
"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é.",
|
||||
"Do you wish to {create_event} or {explore_events}?": "Voulez-vous {create_event} ou {explore_events} ?",
|
||||
"Do you wish to {create_group} or {explore_groups}?": "Voulez-vous {create_group} ou {explore_groups} ?",
|
||||
@@ -1120,11 +1120,12 @@
|
||||
"Suggestions:": "Suggestions :",
|
||||
"Suspended": "Suspendu·e",
|
||||
"Suspend group": "Suspendre le groupe",
|
||||
"Suspend the account": "Suspendre le compte",
|
||||
"Suspend the account?": "Suspendre le compte ?",
|
||||
"Ban the account": "Bannir le compte",
|
||||
"Ban the account?": "Bannir le compte ?",
|
||||
"Suspend the profile": "Suspendre le profil",
|
||||
"Suspend the profile?": "Suspendre le profil ?",
|
||||
"Suspend": "Suspendre",
|
||||
"Ban": "Bannir",
|
||||
"Tag search": "Recherche par tag",
|
||||
"Task lists": "Listes de tâches",
|
||||
"Technical details": "Détails techniques",
|
||||
@@ -1211,7 +1212,7 @@
|
||||
"The URL of a poll where the choice for the event date is happening": "L'URL d'un sondage où la date de l'événement doit être choisie",
|
||||
"The URL where the event can be watched live": "L'URL où l'événement peut être visionné en direct",
|
||||
"The URL where the event live can be watched again after it has ended": "L'URL où le direct de l'événement peut être visionné à nouveau une fois terminé",
|
||||
"The user has been disabled": "L'utilisateur·ice a été désactivé",
|
||||
"The user has been banned": "L'utilisateur·ice a été banni.e",
|
||||
"The videoconference will be created on {service}": "La visio-conférence sera créée sur {service}",
|
||||
"The Zoom video teleconference URL": "L'URL de visio-conférence Zoom",
|
||||
"The {default_privacy_policy} will be used. They will be translated in the user's language.": "La {default_privacy_policy} sera utilisée. Elle sera traduite dans la langue de l'utilisateur·rice.",
|
||||
@@ -1290,7 +1291,7 @@
|
||||
"This post is accessible only for members. You have access to it for moderation purposes only because you are an instance moderator.": "Ce billet est accessible uniquement aux membres. Vous y avez accès à des fins de modération car vous êtes modérateur·ice de l'instance.",
|
||||
"This post is accessible only through it's link. Be careful where you post this link.": "Ce billet est accessible uniquement à travers son lien. Faites attention où vous le diffusez.",
|
||||
"This profile is from another instance, the informations shown here may be incomplete.": "Ce profil provient d'une autre instance, les informations montrées ici peuvent être incomplètes.",
|
||||
"This profile is located on this instance, so you need to {access_the_corresponding_account} to suspend it.": "Ce profil se situe sur cette instance, vous devez donc {access_the_corresponding_account} afin de le suspendre.",
|
||||
"This profile is located on this instance, so you need to {access_the_corresponding_account} to ban it.": "Ce profil se situe sur cette instance, vous devez donc {access_the_corresponding_account} afin de le bannir.",
|
||||
"This profile was not found": "Ce profil n'a pas été trouvé",
|
||||
"This section lets you add links to external websites to the menu.": "Cette section vous permet d'ajouter des liens vers des sites internet externes au menu.",
|
||||
"This setting will be used to display the website and send you emails in the correct language.": "Ce paramètre sera utilisé pour l'affichage du site et pour vous envoyer des courriels dans la bonne langue.",
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
role="alert"
|
||||
>
|
||||
<i18n-t
|
||||
keypath="This profile is located on this instance, so you need to {access_the_corresponding_account} to suspend it."
|
||||
keypath="This profile is located on this instance, so you need to {access_the_corresponding_account} to ban it."
|
||||
>
|
||||
<template #access_the_corresponding_account>
|
||||
<router-link
|
||||
|
||||
@@ -184,8 +184,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="buttons" v-if="!user.disabled">
|
||||
<o-button @click="suspendAccount" variant="danger">{{
|
||||
t("Suspend")
|
||||
<o-button @click="deleteAccount" variant="danger">{{
|
||||
t("Ban")
|
||||
}}</o-button>
|
||||
</div>
|
||||
<div
|
||||
@@ -193,7 +193,7 @@
|
||||
class="p-4 mb-4 text-sm text-red-700 bg-red-100 rounded-lg"
|
||||
role="alert"
|
||||
>
|
||||
{{ t("The user has been disabled") }}
|
||||
{{ t("The user has been banned") }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -339,7 +339,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { formatBytes } from "@/utils/datetime";
|
||||
import { ICurrentUserRole } from "@/types/enums";
|
||||
import { GET_USER, SUSPEND_USER } from "../../graphql/user";
|
||||
import { GET_USER, DELETE_ACCOUNT_AS_MODERATOR } from "../../graphql/user";
|
||||
import RouteName from "../../router/name";
|
||||
import { IUser } from "../../types/current-user.model";
|
||||
import EmptyContent from "../../components/Utils/EmptyContent.vue";
|
||||
@@ -479,24 +479,24 @@ const roleName = (role: ICurrentUserRole): string => {
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const { mutate: suspendUser } = useMutation<
|
||||
{ suspendProfile: { id: string } },
|
||||
const { mutate: deleteUserAccount } = useMutation<
|
||||
{ deleteProfile: { id: string } },
|
||||
{ userId: string }
|
||||
>(SUSPEND_USER);
|
||||
>(DELETE_ACCOUNT_AS_MODERATOR);
|
||||
|
||||
const dialog = inject<Dialog>("dialog");
|
||||
|
||||
const suspendAccount = async (): Promise<void> => {
|
||||
const deleteAccount = async (): Promise<void> => {
|
||||
dialog?.confirm({
|
||||
title: t("Suspend the account?"),
|
||||
title: t("Ban the account?"),
|
||||
message: t(
|
||||
"Do you really want to suspend this account? All of the user's profiles will be deleted."
|
||||
"Do you really want to ban this account? All of the user's profiles will be deleted."
|
||||
),
|
||||
confirmText: t("Suspend the account"),
|
||||
confirmText: t("Ban the account"),
|
||||
cancelText: t("Cancel"),
|
||||
variant: "danger",
|
||||
onConfirm: async () => {
|
||||
suspendUser({
|
||||
deleteUserAccount({
|
||||
userId: props.id,
|
||||
});
|
||||
return router.push({ name: RouteName.USERS });
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
@click="suspendUser((report.reported as IPerson).user as IUser)"
|
||||
icon-left="delete"
|
||||
size="small"
|
||||
>{{ t("Suspend the account") }}</o-button
|
||||
>{{ t("Ban the account") }}</o-button
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -429,7 +429,7 @@ import EmptyContent from "@/components/Utils/EmptyContent.vue";
|
||||
import EventComment from "@/components/Comment/EventComment.vue";
|
||||
import DiscussionComment from "@/components/Discussion/DiscussionComment.vue";
|
||||
import { SUSPEND_PROFILE } from "@/graphql/actor";
|
||||
import { GET_USER, SUSPEND_USER } from "@/graphql/user";
|
||||
import { GET_USER, DELETE_ACCOUNT_AS_MODERATOR } from "@/graphql/user";
|
||||
import { IUser } from "@/types/current-user.model";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -757,7 +757,7 @@ const { mutate: doSuspendProfile, onDone: onSuspendProfileDone } = useMutation<
|
||||
const { mutate: doSuspendUser, onDone: onSuspendUserDone } = useMutation<
|
||||
{ suspendProfile: { id: string } },
|
||||
{ userId: string }
|
||||
>(SUSPEND_USER);
|
||||
>(DELETE_ACCOUNT_AS_MODERATOR);
|
||||
|
||||
const { load: loadUserLazyQuery } = useLazyQuery<
|
||||
{ user: IUser },
|
||||
@@ -812,9 +812,9 @@ const suspendUser = async (user: IUser): Promise<void> => {
|
||||
}
|
||||
|
||||
dialog?.confirm({
|
||||
title: t("Suspend the account?"),
|
||||
title: t("Ban the account?"),
|
||||
message:
|
||||
t("Do you really want to suspend the account « {emailAccount} » ?", {
|
||||
t("Do you really want to ban the account « {emailAccount} » ?", {
|
||||
emailAccount: cachedReportedUser.value.email,
|
||||
}) +
|
||||
" " +
|
||||
@@ -822,7 +822,7 @@ const suspendUser = async (user: IUser): Promise<void> => {
|
||||
"<b>" +
|
||||
t("There will be no way to restore the user's data!") +
|
||||
`</b>`,
|
||||
confirmText: t("Suspend the account"),
|
||||
confirmText: t("Ban the account"),
|
||||
cancelText: t("Cancel"),
|
||||
variant: "danger",
|
||||
onConfirm: async () => {
|
||||
|
||||
@@ -243,7 +243,7 @@ import { useRouter } from "vue-router";
|
||||
import {
|
||||
CHANGE_EMAIL,
|
||||
CHANGE_PASSWORD,
|
||||
DELETE_ACCOUNT,
|
||||
DELETE_ACCOUNT_AS_USER,
|
||||
} from "../../graphql/user";
|
||||
import RouteName from "../../router/name";
|
||||
import { logout, SELECTED_PROVIDERS } from "../../utils/auth";
|
||||
@@ -342,7 +342,7 @@ const {
|
||||
onDone: deleteAccountMutationDone,
|
||||
onError: deleteAccountMutationError,
|
||||
} = useMutation<{ deleteAccount: { id: string } }, { password?: string }>(
|
||||
DELETE_ACCOUNT
|
||||
DELETE_ACCOUNT_AS_USER
|
||||
);
|
||||
|
||||
const { notification } = useOruga();
|
||||
|
||||
@@ -86,7 +86,7 @@ exports[`AdminProfile > Show simple 1`] = `
|
||||
<section class="mt-4 mb-3">
|
||||
<h2 class="">Actions</h2>
|
||||
<p></p>
|
||||
<div class="p-4 mb-4 text-sm text-blue-700 bg-blue-100 rounded-lg" role="alert">This profile is located on this instance, so you need to <a href="/settings/admin/users/1" class="underline">access the corresponding account</a> to suspend it.</div>
|
||||
<div class="p-4 mb-4 text-sm text-blue-700 bg-blue-100 rounded-lg" role="alert">This profile is located on this instance, so you need to <a href="/settings/admin/users/1" class="underline">access the corresponding account</a> to ban it.</div>
|
||||
</section>
|
||||
<section class="mt-4 mb-3">
|
||||
<h2 class="">Organized events</h2>
|
||||
|
||||
Reference in New Issue
Block a user