diff --git a/app/helpers/admin/settings/discovery_helper.rb b/app/helpers/admin/settings/discovery_helper.rb index 041f88416380ba..d1ee4a85726125 100644 --- a/app/helpers/admin/settings/discovery_helper.rb +++ b/app/helpers/admin/settings/discovery_helper.rb @@ -13,10 +13,14 @@ def discovery_recommended_value authorized_fetch_overridden? ? :overridden : nil end - def public_feed_auth + def public_feed_auth? Setting.timeline_preview end + def public_timelines_recommended_value + public_feed_auth? ? :overridden : nil + end + def public_timelines_warning_hint_text public_feed_auth? ? t('admin.settings.security.public_timelines_warning_hint') : nil end diff --git a/app/views/admin/settings/discovery/show.html.haml b/app/views/admin/settings/discovery/show.html.haml index 5cb6f0d45d0626..c95c22d9561172 100644 --- a/app/views/admin/settings/discovery/show.html.haml +++ b/app/views/admin/settings/discovery/show.html.haml @@ -30,10 +30,10 @@ = f.input :timeline_preview, as: :boolean, wrapper: :with_label .fields-group - = f.input :timeline_preview_local, as: :boolean, wrapper: :with_label, warning_hint: public_timelines_warning_hint_text, disabled: public_feed_auth?, glitch_only: true + = f.input :timeline_preview_local, as: :boolean, wrapper: :with_label, warning_hint: public_timelines_warning_hint_text, disabled: public_feed_auth?, recommended: public_timelines_recommended_value, glitch_only: true .fields-group - = f.input :timeline_preview_remote, as: :boolean, wrapper: :with_label, warning_hint: public_timelines_warning_hint_text, disabled: public_feed_auth?, glitch_only: true + = f.input :timeline_preview_remote, as: :boolean, wrapper: :with_label, warning_hint: public_timelines_warning_hint_text, disabled: public_feed_auth?, recommended: public_timelines_recommended_value, glitch_only: true .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')