From d35fe3d5e3a45629634edde4c3d2726262c4f57e Mon Sep 17 00:00:00 2001 From: Darius Kazemi Date: Fri, 13 Jan 2023 07:43:17 -0800 Subject: Add peers API endpoint toggle to Server Settings (#22810) * Add peers endpoint toggle to Server Settings This places the toggle under "Discovery" and expands the hint text to explain further what the endpoint is used for. Added a "Recommended" tag since it was recommended in v3 before it was removed. Fixes https://github.com/mastodon/mastodon/issues/22222 * i18n normalize step --- app/views/admin/settings/discovery/show.html.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/views/admin/settings') diff --git a/app/views/admin/settings/discovery/show.html.haml b/app/views/admin/settings/discovery/show.html.haml index f60d1c766..17c9e93dd 100644 --- a/app/views/admin/settings/discovery/show.html.haml +++ b/app/views/admin/settings/discovery/show.html.haml @@ -29,6 +29,11 @@ .fields-group = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html') + %h4= t('admin.settings.discovery.publish_discovered_servers') + + .fields-group + = f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended + %h4= t('admin.settings.discovery.follow_recommendations') .fields-group -- cgit From 507e1d22f580b23d47d8dc0cb47f6f0b3170fc56 Mon Sep 17 00:00:00 2001 From: Darius Kazemi Date: Fri, 13 Jan 2023 08:14:39 -0800 Subject: Allow admins to toggle public statistics API (#22833) * Allow admins to toggle public statistics API * Normalize i18n Co-authored-by: Claire --- app/views/admin/settings/discovery/show.html.haml | 5 +++++ config/locales/en.yml | 1 + config/locales/simple_form.en.yml | 2 ++ 3 files changed, 8 insertions(+) (limited to 'app/views/admin/settings') diff --git a/app/views/admin/settings/discovery/show.html.haml b/app/views/admin/settings/discovery/show.html.haml index 17c9e93dd..59188833b 100644 --- a/app/views/admin/settings/discovery/show.html.haml +++ b/app/views/admin/settings/discovery/show.html.haml @@ -29,6 +29,11 @@ .fields-group = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html') + %h4= t('admin.settings.discovery.publish_statistics') + + .fields-group + = f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended + %h4= t('admin.settings.discovery.publish_discovered_servers') .fields-group diff --git a/config/locales/en.yml b/config/locales/en.yml index e5c7c0ea3..4f04430ee 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -715,6 +715,7 @@ en: profile_directory: Profile directory public_timelines: Public timelines publish_discovered_servers: Publish discovered servers + publish_statistics: Publish statistics title: Discovery trends: Trends domain_blocks: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index e9f4d3746..f66e12c4c 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -74,6 +74,7 @@ en: hide: Completely hide the filtered content, behaving as if it did not exist warn: Hide the filtered content behind a warning mentioning the filter's title form_admin_settings: + activity_api_enabled: Counts of locally published posts, active users, and new registrations in weekly buckets backups_retention_period: Keep generated user archives for the specified number of days. bootstrap_timeline_accounts: These accounts will be pinned to the top of new users' follow recommendations. closed_registrations_message: Displayed when sign-ups are closed @@ -230,6 +231,7 @@ en: hide: Hide completely warn: Hide with a warning form_admin_settings: + activity_api_enabled: Publish aggregate statistics about user activity in the API backups_retention_period: User archive retention period bootstrap_timeline_accounts: Always recommend these accounts to new users closed_registrations_message: Custom message when sign-ups are not available -- cgit