diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb index 9efdf67d2..4a13544e8 100644 --- a/app/helpers/accounts_helper.rb +++ b/app/helpers/accounts_helper.rb @@ -70,7 +70,7 @@ module AccountsHelper content_tag(:div, t('admin.accounts.roles.user'), class: 'account-role') elsif account.user_admin? content_tag(:div, t('accounts.roles.admin'), class: 'account-role admin') - elsif account.user_moderator? + elsif Setting.show_moderator_badge && account.user_moderator? content_tag(:div, t('accounts.roles.moderator'), class: 'account-role moderator') end end diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index 6fc7c56fd..2029ab726 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -16,6 +16,7 @@ class Form::AdminSettings open_deletion timeline_preview show_staff_badge + show_moderator_badge bootstrap_timeline_accounts theme min_invite_role @@ -40,6 +41,7 @@ class Form::AdminSettings open_deletion timeline_preview show_staff_badge + show_moderator_badge activity_api_enabled peers_api_enabled show_known_fediverse_at_about_page diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index 33bfc43d3..664cd0b5e 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -64,6 +64,9 @@ .fields-group = f.input :show_staff_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_staff_badge.title'), hint: t('admin.settings.show_staff_badge.desc_html') + .fields-group + = f.input :show_moderator_badge, as: :boolean, wrapper: :with_label, label: t('admin.settings.show_moderator_badge.title'), hint: t('admin.settings.show_moderator_badge.desc_html'), fedibird_features: true + .fields-group = f.input :open_deletion, as: :boolean, wrapper: :with_label, label: t('admin.settings.registrations.deletion.title'), hint: t('admin.settings.registrations.deletion.desc_html') diff --git a/config/locales/en.yml b/config/locales/en.yml index 911962ecd..bf2375fd5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -666,6 +666,9 @@ en: show_known_fediverse_at_about_page: desc_html: When disabled, restricts the public timeline linked from the landing page to showing only local content title: Include federated content on unauthenticated public timeline page + show_moderator_badge: + desc_html: Show a moderator badge on a user page + title: Show moderator badge show_staff_badge: desc_html: Show a staff badge on a user page title: Show staff badge diff --git a/config/locales/ja.yml b/config/locales/ja.yml index c5d91c9d2..4ccc5d192 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -645,6 +645,9 @@ ja: show_known_fediverse_at_about_page: desc_html: チェックを外すと、ランディングページからリンクされた公開タイムラインにローカルの公開投稿のみ表示します。 title: 公開タイムラインに連合先のコンテンツも表示する + show_moderator_badge: + desc_html: ユーザーページにモデレーターのバッジを表示します + title: モデレーターバッジを表示する show_staff_badge: desc_html: ユーザーページにスタッフのバッジを表示します title: スタッフバッジを表示する diff --git a/config/settings.yml b/config/settings.yml index d11bc33d0..b3cdf0131 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -16,6 +16,7 @@ defaults: &defaults min_invite_role: 'admin' timeline_preview: true show_staff_badge: true + show_moderator_badge: true default_sensitive: false hide_network: false unfollow_modal: false