diff --git a/js/src/graphql/report.ts b/js/src/graphql/report.ts index eac2e1502..9185c7f79 100644 --- a/js/src/graphql/report.ts +++ b/js/src/graphql/report.ts @@ -42,14 +42,17 @@ const REPORT_FRAGMENT = gql` id reported { ...ActorFragment + suspended ... on Person { user { id + disabled } } } reporter { ...ActorFragment + suspended } events { id diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 74cde1814..492e68caf 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -1601,5 +1601,6 @@ "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" + "Profile suspended and report resolved": "Profile suspended and report resolved", + "{profileName} (suspended)": "{profileName} (suspended)" } \ No newline at end of file diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 281bd276e..2de32e18e 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -1599,5 +1599,6 @@ "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" + "Profile suspended and report resolved": "Profil suspendu et signalement résolu", + "{profileName} (suspended)": "{profileName} (suspendu·e)" } diff --git a/js/src/views/Moderation/ReportView.vue b/js/src/views/Moderation/ReportView.vue index 9d4c01113..8b7b69f7d 100644 --- a/js/src/views/Moderation/ReportView.vue +++ b/js/src/views/Moderation/ReportView.vue @@ -94,27 +94,42 @@ name: RouteName.ADMIN_PROFILE, params: { id: report.reported.id }, }" + class="inline-flex gap-1" > <img v-if="report.reported.avatar" - class="image" + class="image rounded-full" :src="report.reported.avatar.url" alt="" /> - {{ displayNameAndUsername(report.reported) }} + <template v-if="report.reported.suspended"> + <i18n-t keypath="{profileName} (suspended)"> + <template #profileName> + {{ displayNameAndUsername(report.reported) }} + </template> + </i18n-t> + </template> + <template v-else>{{ + displayNameAndUsername(report.reported) + }}</template> </router-link> <o-button - v-if="report.reported.domain" + v-if="report.reported.domain && !report.reported.suspended" variant="danger" @click="suspendProfile(report.reported.id as string)" icon-left="delete" + size="small" >{{ t("Suspend the profile") }}</o-button > <o-button - v-else-if="(report.reported as IPerson).user" + v-else-if=" + (report.reported as IPerson).user && + !((report.reported as IPerson).user as IUser).disabled + " variant="danger" @click="suspendUser((report.reported as IPerson).user as IUser)" icon-left="delete" + size="small" >{{ t("Suspend the account") }}</o-button > </td> @@ -133,7 +148,7 @@ > <img v-if="report.reporter.avatar" - class="image" + class="image rounded-full" :src="report.reporter.avatar.url" alt="" />