fixes and missing strings

This commit is contained in:
Henry Jameson 2026-06-10 14:39:58 +03:00
commit 5ef686f314
4 changed files with 73 additions and 23 deletions

View file

@ -78,11 +78,11 @@ const ENTRIES = [
separator: true, separator: true,
}, },
{ {
check: '!action:disable_mfa', check: 'action:disable_mfa',
label: 'user_card.admin_menu.disable_mfa', label: 'user_card.admin_menu.disable_mfa',
}, },
{ {
check: '!action:require_password_change', check: 'action:require_password_change',
label: 'user_card.admin_menu.require_password_change', label: 'user_card.admin_menu.require_password_change',
}, },
{ {
@ -507,21 +507,59 @@ const ModerationTools = {
switch (group) { switch (group) {
case 'action': { case 'action': {
if (name === 'delete') { switch (name) {
this.confirmDialogShow = true case 'delete': {
this.confirmDialogTitle = this.$t( this.confirmDialogShow = true
'user_card.admin_menu.confirm_modal.delete_title', this.confirmDialogTitle = this.$t(
) 'user_card.admin_menu.confirm_modal.delete_title',
this.confirmDialogDanger = true )
this.confirmDialogContent = this.confirmDialogDanger = true
'user_card.admin_menu.confirm_modal.delete_content' this.confirmDialogContent =
this.confirmDialogContent2 = 'user_card.admin_menu.confirm_modal.delete_content'
'user_card.admin_menu.confirm_modal.delete_content_2' this.confirmDialogContent2 =
this.confirmDialogConfirm = this.$t( 'user_card.admin_menu.confirm_modal.delete_content_2'
'user_card.admin_menu.confirm_modal.delete', this.confirmDialogConfirm = this.$t(
) 'user_card.admin_menu.confirm_modal.delete',
)
break
}
case 'resend_confirmation': {
this.confirmDialogShow = true
this.confirmDialogTitle = this.$t(
'user_card.admin_menu.confirm_modal.resend_confirmation_title',
)
this.confirmDialogContent =
'user_card.admin_menu.confirm_modal.resend_confirmation_content'
this.confirmDialogConfirm = this.$t(
'user_card.admin_menu.confirm_modal.send',
)
break
}
case 'disable_mfa': {
this.confirmDialogShow = true
this.confirmDialogTitle = this.$t(
'user_card.admin_menu.confirm_modal.disable_mfa_title',
)
this.confirmDialogContent =
'user_card.admin_menu.confirm_modal.disable_mfa_content'
this.confirmDialogConfirm = this.$t(
'settings.confirm'
)
break
}
case 'require_password_change': {
this.confirmDialogShow = true
this.confirmDialogTitle = this.$t(
'user_card.admin_menu.confirm_modal.require_password_change_title',
)
this.confirmDialogContent =
'user_card.admin_menu.confirm_modal.require_password_change_content'
this.confirmDialogConfirm = this.$t(
'settings.confirm'
)
break
}
} }
break
} }
case 'state': { case 'state': {
switch (name) { switch (name) {
@ -564,7 +602,7 @@ const ModerationTools = {
//: this.$t('user_card.admin_menu.confirm_modal.revoke') //: this.$t('user_card.admin_menu.confirm_modal.revoke')
break break
} }
case 'suggest': { case 'suggested': {
this.confirmDialogTitle = this.$t( this.confirmDialogTitle = this.$t(
'user_card.admin_menu.confirm_modal.suggest_title', 'user_card.admin_menu.confirm_modal.suggest_title',
) )

View file

@ -1788,7 +1788,7 @@
"revoke_admin": "Revoke Admin", "revoke_admin": "Revoke Admin",
"grant_moderator": "Grant Moderator", "grant_moderator": "Grant Moderator",
"revoke_moderator": "Revoke Moderator", "revoke_moderator": "Revoke Moderator",
"activate_account": "Activate account", "activate_account": "Activate",
"deactivate_account": "Deactivate", "deactivate_account": "Deactivate",
"delete_account": "Delete", "delete_account": "Delete",
"suggest_account": "Add to suggested", "suggest_account": "Add to suggested",
@ -1820,13 +1820,22 @@
"confirm_title": "Confirm users", "confirm_title": "Confirm users",
"confirm_content": "Approve user {user}? | Approve {count} users?", "confirm_content": "Approve user {user}? | Approve {count} users?",
"suggest_title": "Suggest users", "suggest_title": "Suggest users",
"add_suggest_content": "Add user {user} to suggested list? | Add {count} users to suggested list?", "add_suggest_content": "Add user {user} to suggested users list? | Add {count} users to suggested users list?",
"remove_suggest_content": "Remove user {user} from suggested users list? | Add {count} users to suggested users list?",
"rights_title": "Promote users", "rights_title": "Promote users",
"grant_rights_content": "Grant user {user} {name} role? | Grant {count} users {name} role?", "grant_rights_content": "Grant user {user} {name} role? | Grant {count} users {name} role?",
"revoke_rights_content": "Revoke {name} role from user {user}? | Revoke {name} from {count} users?", "revoke_rights_content": "Revoke {name} role from user {user}? | Revoke {name} from {count} users?",
"tag_title": "Assign user policy", "tag_title": "Assign user policy",
"assign_tag_content": "Assign {user} a {name} policy? | Assign {name} policy to {count} users?", "assign_tag_content": "Assign {user} a {name} policy? | Assign {name} policy to {count} users?",
"unassign_tag_content": "Unassign policy {name} from {user}? | Unassign policy {name} from {count} users?", "unassign_tag_content": "Unassign policy {name} from {user}? | Unassign policy {name} from {count} users?",
"resend_confirmation_title": "Email confirmation resend",
"resend_confirmation_content": "Resend confirmation email to {count} users?",
"disable_mfa_title": "Disable MFA",
"disable_mfa_content": "Disable Mult-Factor Authentication for {count} users?",
"require_password_change_title": "Force password change",
"require_password_change_content": "Force {count} users to change password on next login?",
"add": "Add",
"remove": "Remove",
"delete": "Delete", "delete": "Delete",
"activate": "Activate", "activate": "Activate",
"deactivate": "Deactivate", "deactivate": "Deactivate",
@ -1835,7 +1844,8 @@
"approve": "Approve", "approve": "Approve",
"confirm": "Confirm", "confirm": "Confirm",
"assign": "Assign", "assign": "Assign",
"unassign": "Unassign" "unassign": "Unassign",
"send": "Send"
} }
}, },
"highlight_new": { "highlight_new": {

View file

@ -1726,7 +1726,7 @@ const adminResendConfirmationEmail = ({
} }
const adminRequirePasswordChange = ({ const adminRequirePasswordChange = ({
user: { screen_names: nicknames }, screen_names: nicknames,
credentials, credentials,
}) => { }) => {
const url = PLEROMA_ADMIN_REQUIRE_PASSWORD_CHANGE_URL const url = PLEROMA_ADMIN_REQUIRE_PASSWORD_CHANGE_URL
@ -1740,7 +1740,7 @@ const adminRequirePasswordChange = ({
}) })
} }
const adminDisableMFA = ({ user: { screen_name: nickname }, credentials }) => { const adminDisableMFA = ({ screen_name: nickname, credentials }) => {
const url = PLEROMA_ADMIN_DISABLE_MFA_URL const url = PLEROMA_ADMIN_DISABLE_MFA_URL
return promisedRequest({ return promisedRequest({
url, url,

View file

@ -367,7 +367,9 @@ export const useAdminSettingsStore = defineStore('adminSettings', {
}, },
// Singular only! // Singular only!
disableMFA({ user }) { disableMFA({ user }) {
return this.backendInteractor.adminDisableMFA(user) const { screen_name } = user
return this.backendInteractor.adminDisableMFA({ screen_name })
}, },
async setUsersTags({ users, tags, value }) { async setUsersTags({ users, tags, value }) {
const screen_names = users.map((u) => u.screen_name) const screen_names = users.map((u) => u.screen_name)