mirror of https://github.com/tootsuite/mastodon
Add option (on by default) to allow toots with content warnings to trend
parent
c6df6686af
commit
756f1b6615
|
@ -35,6 +35,7 @@ class Form::AdminSettings
|
||||||
show_replies_in_public_timelines
|
show_replies_in_public_timelines
|
||||||
trends
|
trends
|
||||||
trendable_by_default
|
trendable_by_default
|
||||||
|
trending_status_cw
|
||||||
show_domain_blocks
|
show_domain_blocks
|
||||||
show_domain_blocks_rationale
|
show_domain_blocks_rationale
|
||||||
noindex
|
noindex
|
||||||
|
@ -57,6 +58,7 @@ class Form::AdminSettings
|
||||||
show_replies_in_public_timelines
|
show_replies_in_public_timelines
|
||||||
trends
|
trends
|
||||||
trendable_by_default
|
trendable_by_default
|
||||||
|
trending_status_cw
|
||||||
noindex
|
noindex
|
||||||
require_invite_text
|
require_invite_text
|
||||||
captcha_enabled
|
captcha_enabled
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Trends::Statuses < Trends::Base
|
||||||
|
|
||||||
original_status.public_visibility? &&
|
original_status.public_visibility? &&
|
||||||
original_status.account.discoverable? && !original_status.account.silenced? &&
|
original_status.account.discoverable? && !original_status.account.silenced? &&
|
||||||
original_status.spoiler_text.blank? && !original_status.sensitive? && !original_status.reply?
|
(original_status.spoiler_text.blank? || Setting.trending_status_cw) && !original_status.sensitive? && !original_status.reply?
|
||||||
end
|
end
|
||||||
|
|
||||||
def calculate_scores(statuses, at_time)
|
def calculate_scores(statuses, at_time)
|
||||||
|
|
|
@ -86,6 +86,9 @@
|
||||||
.fields-group
|
.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')
|
= 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
|
||||||
|
= f.input :trending_status_cw, as: :boolean, wrapper: :with_label, label: t('admin.settings.trending_status_cw.title'), hint: t('trending_status_cw.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')
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ en:
|
||||||
show_replies_in_public_timelines:
|
show_replies_in_public_timelines:
|
||||||
desc_html: In addition to public self-replies (threads), show public replies in local and public timelines.
|
desc_html: In addition to public self-replies (threads), show public replies in local and public timelines.
|
||||||
title: Show replies in public timelines
|
title: Show replies in public timelines
|
||||||
|
trending_status_cw:
|
||||||
|
desc_html: When trending posts are enabled, allow posts with Content Warnings to be eligible. Changes to this setting are not retroactive.
|
||||||
|
title: Allow posts with Content Warnings to trend
|
||||||
auth:
|
auth:
|
||||||
captcha_confirmation:
|
captcha_confirmation:
|
||||||
hint_html: Just one more step! To confirm your account, this server requires you to solve a CAPTCHA. You can <a href="/about/more">contact the server administrator</a> if you have questions or need assistance with confirming your account.
|
hint_html: Just one more step! To confirm your account, this server requires you to solve a CAPTCHA. You can <a href="/about/more">contact the server administrator</a> if you have questions or need assistance with confirming your account.
|
||||||
|
|
|
@ -41,6 +41,7 @@ defaults: &defaults
|
||||||
use_pending_items: false
|
use_pending_items: false
|
||||||
trends: true
|
trends: true
|
||||||
trendable_by_default: false
|
trendable_by_default: false
|
||||||
|
trending_status_cw: true
|
||||||
crop_images: true
|
crop_images: true
|
||||||
notification_emails:
|
notification_emails:
|
||||||
follow: false
|
follow: false
|
||||||
|
|
Loading…
Reference in New Issue