From 0fb9536d3888cd7b6013c239d5be85f095a6e8ad Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 5 Dec 2021 21:48:39 +0100 Subject: Add batch suspend for accounts in admin UI (#17009) --- config/locales/en.yml | 11 +++++------ config/navigation.rb | 2 +- config/routes.rb | 12 ++++-------- 3 files changed, 10 insertions(+), 15 deletions(-) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index 1aa96ba0f..0aa25ae86 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -99,7 +99,6 @@ en: accounts: add_email_domain_block: Block e-mail domain approve: Approve - approve_all: Approve all approved_msg: Successfully approved %{username}'s sign-up application are_you_sure: Are you sure? avatar: Avatar @@ -153,7 +152,6 @@ en: active: Active all: All pending: Pending - silenced: Limited suspended: Suspended title: Moderation moderation_notes: Moderation notes @@ -171,7 +169,6 @@ en: redownload: Refresh profile redownloaded_msg: Successfully refreshed %{username}'s profile from origin reject: Reject - reject_all: Reject all rejected_msg: Successfully rejected %{username}'s sign-up application remove_avatar: Remove avatar remove_header: Remove header @@ -210,7 +207,6 @@ en: suspended: Suspended suspension_irreversible: The data of this account has been irreversibly deleted. You can unsuspend the account to make it usable but it will not recover any data it previously had. suspension_reversible_hint_html: The account has been suspended, and the data will be fully removed on %{date}. Until then, the account can be restored without any ill effects. If you wish to remove all of the account's data immediately, you can do so below. - time_in_queue: Waiting in queue %{time} title: Accounts unconfirmed_email: Unconfirmed email undo_sensitized: Undo force-sensitive @@ -226,6 +222,7 @@ en: whitelisted: Allowed for federation action_logs: action_types: + approve_user: Approve User assigned_to_self_report: Assign Report change_email_user: Change E-mail for User confirm_user: Confirm User @@ -255,6 +252,7 @@ en: enable_user: Enable User memorialize_account: Memorialize Account promote_user: Promote User + reject_user: Reject User remove_avatar_user: Remove Avatar reopen_report: Reopen Report reset_password_user: Reset Password @@ -271,6 +269,7 @@ en: update_domain_block: Update Domain Block update_status: Update Post actions: + approve_user_html: "%{name} approved sign-up from %{target}" assigned_to_self_report_html: "%{name} assigned report %{target} to themselves" change_email_user_html: "%{name} changed the e-mail address of user %{target}" confirm_user_html: "%{name} confirmed e-mail address of user %{target}" @@ -300,6 +299,7 @@ en: enable_user_html: "%{name} enabled login for user %{target}" memorialize_account_html: "%{name} turned %{target}'s account into a memoriam page" promote_user_html: "%{name} promoted user %{target}" + reject_user_html: "%{name} rejected sign-up from %{target}" remove_avatar_user_html: "%{name} removed %{target}'s avatar" reopen_report_html: "%{name} reopened report %{target}" reset_password_user_html: "%{name} reset password of user %{target}" @@ -519,8 +519,6 @@ en: title: Create new IP rule no_ip_block_selected: No IP rules were changed as none were selected title: IP rules - pending_accounts: - title: Pending accounts (%{count}) relationships: title: "%{acct}'s relationships" relays: @@ -980,6 +978,7 @@ en: none: None order_by: Order by save_changes: Save changes + today: today validation_errors: one: Something isn't quite right yet! Please review the error below other: Something isn't quite right yet! Please review %{count} errors below diff --git a/config/navigation.rb b/config/navigation.rb index 99743c222..fc03a2a77 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -41,7 +41,7 @@ SimpleNavigation::Configuration.run do |navigation| n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), admin_reports_url, if: proc { current_user.staff? } do |s| s.item :action_logs, safe_join([fa_icon('bars fw'), t('admin.action_logs.title')]), admin_action_logs_url s.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_url, highlights_on: %r{/admin/reports} - s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url, highlights_on: %r{/admin/accounts|/admin/pending_accounts} + s.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url(origin: 'local'), highlights_on: %r{/admin/accounts|/admin/pending_accounts} s.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path s.item :follow_recommendations, safe_join([fa_icon('user-plus fw'), t('admin.follow_recommendations.title')]), admin_follow_recommendations_path, highlights_on: %r{/admin/follow_recommendations} s.item :instances, safe_join([fa_icon('cloud fw'), t('admin.instances.title')]), admin_instances_url(limited: whitelist_mode? ? nil : '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks|/admin/domain_allows}, if: -> { current_user.admin? } diff --git a/config/routes.rb b/config/routes.rb index 5f73129ea..31b398e2c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -251,6 +251,10 @@ Rails.application.routes.draw do post :reject end + collection do + post :batch + end + resource :change_email, only: [:show, :update] resource :reset, only: [:create] resource :action, only: [:new, :create], controller: 'account_actions' @@ -271,14 +275,6 @@ Rails.application.routes.draw do end end - resources :pending_accounts, only: [:index] do - collection do - post :approve_all - post :reject_all - post :batch - end - end - resources :users, only: [] do resource :two_factor_authentication, only: [:destroy] resource :sign_in_token_authentication, only: [:create, :destroy] -- cgit From 0fc73bbcb937d62c47a37325794825c77ef8a8a7 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 13 Dec 2021 18:25:25 +0100 Subject: Fix incorrect singular version of some translation strings (#17124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #17120 Co-authored-by: Mélanie Chauvel Co-authored-by: Mélanie Chauvel --- config/locales/en.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/locales/en.yml b/config/locales/en.yml index 0aa25ae86..e9a0aea54 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -377,13 +377,13 @@ en: new_users: new users opened_reports: reports opened pending_reports_html: - one: "1 pending reports" + one: "1 pending report" other: "%{count} pending reports" pending_tags_html: - one: "1 pending hashtags" + one: "1 pending hashtag" other: "%{count} pending hashtags" pending_users_html: - one: "1 pending users" + one: "1 pending user" other: "%{count} pending users" resolved_reports: reports resolved software: Software -- cgit