diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-10-02 18:11:46 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-10-02 18:46:28 +0200 |
commit | bfc539cfb4f040fcffac740b36791c26c2a74119 (patch) | |
tree | 6dcf45444eda50d6745bc3e2e05521d3b703250d | |
parent | 4500504ec2be89bdedaef27bbf1cf82f77483ccd (diff) |
Revert "Change "Allow trends without prior review" setting to include statuses (#17977)"
This reverts commit 546672e292dc3218e996048464c4c52e5d00f766.
-rw-r--r-- | app/javascript/styles/mastodon/accounts.scss | 9 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/forms.scss | 3 | ||||
-rw-r--r-- | app/models/account.rb | 4 | ||||
-rw-r--r-- | app/views/admin/settings/edit.html.haml | 2 | ||||
-rw-r--r-- | config/i18n-tasks.yml | 2 | ||||
-rw-r--r-- | config/initializers/simple_form.rb | 5 | ||||
-rw-r--r-- | config/locales/en.yml | 4 | ||||
-rw-r--r-- | config/locales/simple_form.en.yml | 1 |
8 files changed, 7 insertions, 23 deletions
diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index c007eb4b5..54b65bfc8 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -202,8 +202,7 @@ } .account-role, -.simple_form .recommended, -.simple_form .not_recommended { +.simple_form .recommended { display: inline-block; padding: 4px 6px; cursor: default; @@ -228,12 +227,6 @@ } } -.simple_form .not_recommended { - color: lighten($error-red, 12%); - background-color: rgba(lighten($error-red, 12%), 0.1); - border-color: rgba(lighten($error-red, 12%), 0.5); -} - .account__header__fields { max-width: 100vw; padding: 0; diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index a6419821f..990903859 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -102,8 +102,7 @@ code { } } - .recommended, - .not_recommended { + .recommended { position: absolute; margin: 0 4px; margin-top: -2px; diff --git a/app/models/account.rb b/app/models/account.rb index 33870beda..f75750838 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -262,10 +262,6 @@ class Account < ApplicationRecord update!(memorial: true) end - def trendable - boolean_with_default('trendable', Setting.trendable_by_default) - end - def sign? true end diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index c8ebb3360..f2fdab90d 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -81,7 +81,7 @@ = 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'), recommended: :not_recommended + = 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('admin.settings.trending_status_cw.desc_html') diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index cc607f72a..7139bcea7 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -51,7 +51,7 @@ ignore_unused: - 'activerecord.errors.*' - '{devise,pagination,doorkeeper}.*' - '{date,datetime,time,number}.*' - - 'simple_form.{yes,no,recommended,not_recommended}' + - 'simple_form.{yes,no,recommended}' - 'simple_form.{placeholders,hints,labels}.*' - 'simple_form.{error_notification,required}.:' - 'errors.messages.*' diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index 92cffc5a2..3a2097d2f 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -11,10 +11,7 @@ end module RecommendedComponent def recommended(_wrapper_options = nil) return unless options[:recommended] - - key = options[:recommended].is_a?(Symbol) ? options[:recommended] : :recommended - options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t(key, scope: 'simple_form'), class: key)]) } - + options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t('simple_form.recommended'), class: 'recommended')]) } nil end end diff --git a/config/locales/en.yml b/config/locales/en.yml index dd341e0c8..6f0f3e953 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -807,8 +807,8 @@ en: title: Allow unauthenticated access to public timeline title: Site settings trendable_by_default: - desc_html: Specific trending content can still be explicitly disallowed - title: Allow trends without prior review + desc_html: Affects hashtags that have not been previously disallowed + title: Allow hashtags to trend without prior review trends: desc_html: Publicly display previously reviewed content that is currently trending title: Trends diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index db5b45e41..ec4c445e8 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -261,7 +261,6 @@ en: events: Enabled events url: Endpoint URL 'no': 'No' - not_recommended: Not recommended recommended: Recommended required: mark: "*" |