gearheads
/
mastodon
Archived
2
0
Fork 0

Add admin setting to auto-approve hashtags (#12122)

Change inaccurate labels on other admin settings
gh/stable
Eugen Rochko 2019-10-09 00:30:15 +02:00 committed by GitHub
parent 19cdc62765
commit c8bcf5cbfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 8 deletions

View File

@ -30,6 +30,7 @@ class Form::AdminSettings
mascot mascot
spam_check_enabled spam_check_enabled
trends trends
trendable_by_default
show_domain_blocks show_domain_blocks
show_domain_blocks_rationale show_domain_blocks_rationale
noindex noindex
@ -46,6 +47,7 @@ class Form::AdminSettings
profile_directory profile_directory
spam_check_enabled spam_check_enabled
trends trends
trendable_by_default
noindex noindex
).freeze ).freeze

View File

@ -76,7 +76,7 @@ class Tag < ApplicationRecord
alias listable? listable alias listable? listable
def trendable def trendable
boolean_with_default('trendable', false) boolean_with_default('trendable', Setting.trendable_by_default)
end end
alias trendable? trendable alias trendable? trendable

View File

@ -20,10 +20,10 @@
= f.input :site_contact_email, wrapper: :with_label, label: t('admin.settings.contact_information.email') = f.input :site_contact_email, wrapper: :with_label, label: t('admin.settings.contact_information.email')
.fields-group .fields-group
= f.input :site_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description.title'), hint: t('admin.settings.site_description.desc_html'), input_html: { rows: 4 } = f.input :site_short_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_short_description.title'), hint: t('admin.settings.site_short_description.desc_html'), input_html: { rows: 2 }
.fields-group .fields-group
= f.input :site_short_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_short_description.title'), hint: t('admin.settings.site_short_description.desc_html'), input_html: { rows: 2 } = f.input :site_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description.title'), hint: t('admin.settings.site_description.desc_html'), input_html: { rows: 2 }
.fields-row .fields-row
.fields-row__column.fields-row__column-6.fields-group .fields-row__column.fields-row__column-6.fields-group
@ -71,6 +71,9 @@
.fields-group .fields-group
= f.input :trends, as: :boolean, wrapper: :with_label, label: t('admin.settings.trends.title'), hint: t('admin.settings.trends.desc_html') = f.input :trends, as: :boolean, wrapper: :with_label, label: t('admin.settings.trends.title'), hint: t('admin.settings.trends.desc_html')
.fields-group
= f.input :trendable_by_default, as: :boolean, wrapper: :with_label, label: t('admin.settings.trendable_by_default.title'), hint: t('admin.settings.trendable_by_default.desc_html')
.fields-group .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') = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
@ -89,8 +92,8 @@
= f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks_rationale.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' = f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label: t('admin.settings.domain_blocks_rationale.title'), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
.fields-group .fields-group
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 }
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 } unless whitelist_mode? = f.input :site_extended_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description_extended.title'), hint: t('admin.settings.site_description_extended.desc_html'), input_html: { rows: 8 } unless whitelist_mode?
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, label: t('admin.settings.registrations.closed_message.title'), hint: t('admin.settings.registrations.closed_message.desc_html'), input_html: { rows: 8 }
= f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 } = f.input :site_terms, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_terms.title'), hint: t('admin.settings.site_terms.desc_html'), input_html: { rows: 8 }
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }, label: t('admin.settings.custom_css.title'), hint: t('admin.settings.custom_css.desc_html') = f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }, label: t('admin.settings.custom_css.title'), hint: t('admin.settings.custom_css.desc_html')

View File

@ -478,8 +478,8 @@ en:
open: Anyone can sign up open: Anyone can sign up
title: Registrations mode title: Registrations mode
show_known_fediverse_at_about_page: show_known_fediverse_at_about_page:
desc_html: When toggled, it will show toots from all the known fediverse on preview. Otherwise it will only show local toots. desc_html: When disabled, restricts the public timeline linked from the landing page to showing only local content
title: Show known fediverse on timeline preview title: Include federated content on unauthenticated public timeline page
show_staff_badge: show_staff_badge:
desc_html: Show a staff badge on a user page desc_html: Show a staff badge on a user page
title: Show staff badge title: Show staff badge
@ -503,9 +503,12 @@ en:
desc_html: Used for previews via OpenGraph and API. 1200x630px recommended desc_html: Used for previews via OpenGraph and API. 1200x630px recommended
title: Server thumbnail title: Server thumbnail
timeline_preview: timeline_preview:
desc_html: Display public timeline on landing page desc_html: Display link to public timeline on landing page and allow API access to the public timeline without authentication
title: Timeline preview title: Allow unauthenticated access to public timeline
title: Site settings title: Site settings
trendable_by_default:
desc_html: Affects hashtags that have not been previously disallowed
title: Allow hashtags to trend without prior review
trends: trends:
desc_html: Publicly display previously reviewed hashtags that are currently trending desc_html: Publicly display previously reviewed hashtags that are currently trending
title: Trending hashtags title: Trending hashtags

View File

@ -35,6 +35,7 @@ defaults: &defaults
use_blurhash: true use_blurhash: true
use_pending_items: false use_pending_items: false
trends: true trends: true
trendable_by_default: false
notification_emails: notification_emails:
follow: false follow: false
reblog: false reblog: false