Skip to content

Commit

Permalink
eh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jun 29, 2024
1 parent bb7e3d9 commit 55bd152
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/helpers/admin/settings/discovery_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/settings/discovery/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 55bd152

Please sign in to comment.