From fdfacb0ec0e81e323e67abde0d4b5b16f0d8bf0a Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 12 Nov 2022 10:17:22 +0100 Subject: Revert "Revert "Change "Allow trends without prior review" setting to include statuses (#17977)"" This reverts commit bfc539cfb4f040fcffac740b36791c26c2a74119. --- app/javascript/styles/mastodon/accounts.scss | 9 ++++++++- app/javascript/styles/mastodon/forms.scss | 3 ++- app/models/account.rb | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index 54b65bfc8..c007eb4b5 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -202,7 +202,8 @@ } .account-role, -.simple_form .recommended { +.simple_form .recommended, +.simple_form .not_recommended { display: inline-block; padding: 4px 6px; cursor: default; @@ -227,6 +228,12 @@ } } +.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 4c731be43..a3ddc7636 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -103,7 +103,8 @@ code { } } - .recommended { + .recommended, + .not_recommended { position: absolute; margin: 0 4px; margin-top: -2px; diff --git a/app/models/account.rb b/app/models/account.rb index 7059c555f..ab8a65720 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -260,6 +260,10 @@ class Account < ApplicationRecord update!(memorial: true) end + def trendable + boolean_with_default('trendable', Setting.trendable_by_default) + end + def sign? true end -- cgit From 1ce29aeabfed586868cd32a1dfd480bdd5efa3d2 Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 12 Nov 2022 10:17:22 +0100 Subject: Change "Allow trends without prior review' setting to include statuses Port SCSS changes from 546672e292dc3218e996048464c4c52e5d00f766 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/accounts.scss | 9 ++++++++- app/javascript/flavours/glitch/styles/forms.scss | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index 3d8b761e6..ffe5de262 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -204,7 +204,8 @@ } .account-role, -.simple_form .recommended { +.simple_form .recommended, +.simple_form .not_recommended { display: inline-block; padding: 4px 6px; cursor: default; @@ -229,6 +230,12 @@ } } +.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/flavours/glitch/styles/forms.scss b/app/javascript/flavours/glitch/styles/forms.scss index ef0ca1fcd..cddf42dac 100644 --- a/app/javascript/flavours/glitch/styles/forms.scss +++ b/app/javascript/flavours/glitch/styles/forms.scss @@ -103,7 +103,8 @@ code { } } - .recommended { + .recommended, + .not_recommended { position: absolute; margin: 0 4px; margin-top: -2px; -- cgit From 0d43d9926a811dbc14dd5526b179558847640218 Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 12 Nov 2022 10:47:36 +0100 Subject: Make trendable_by_default not apply to posts --- app/models/account.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app') diff --git a/app/models/account.rb b/app/models/account.rb index ab8a65720..7059c555f 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -260,10 +260,6 @@ class Account < ApplicationRecord update!(memorial: true) end - def trendable - boolean_with_default('trendable', Setting.trendable_by_default) - end - def sign? true end -- cgit