From ad489f865a38e54a0f05598fa3f0638d3808214d Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 18 Jul 2022 15:41:08 +0900 Subject: [PATCH 1/4] Fix custom.css html escaped (#18824) --- app/views/custom_css/show.css.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/custom_css/show.css.erb b/app/views/custom_css/show.css.erb index 521834832..9cd38fb37 100644 --- a/app/views/custom_css/show.css.erb +++ b/app/views/custom_css/show.css.erb @@ -1,5 +1,5 @@ <%- if Setting.custom_css.present? %> -<%= Setting.custom_css %> +<%= raw Setting.custom_css %> <%- end %> <%- UserRole.where(highlighted: true).select { |role| role.color.present? }.each do |role| %> From ec83e2a35ee5f3a68ec0f8f5285e45d24d4d1da6 Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Mon, 18 Jul 2022 06:41:50 +0000 Subject: [PATCH 2/4] Fix missing scope for current_user in _sidebar.html.haml (#18822) Fixes https://github.com/mastodon/mastodon/issues/18821 Fix suggested by https://miaow.gay/@meganeko/108665430982072358 --- app/views/application/_sidebar.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/application/_sidebar.html.haml b/app/views/application/_sidebar.html.haml index 0a952add0..cc157bf47 100644 --- a/app/views/application/_sidebar.html.haml +++ b/app/views/application/_sidebar.html.haml @@ -13,4 +13,4 @@ %h4.emojify= t('footer.trending_now') - trends.each do |tag| - = react_component :hashtag, hashtag: ActiveModelSerializers::SerializableResource.new(tag, serializer: REST::TagSerializer).as_json + = react_component :hashtag, hashtag: ActiveModelSerializers::SerializableResource.new(tag, serializer: REST::TagSerializer, scope: current_user, scope_name: :current_user).as_json From f248d95be26ceca3c2d717fa71557a56e975fece Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 19 Jul 2022 08:06:11 +0900 Subject: [PATCH 3/4] Fix badge color not affected (#18826) * Fix badge color not affected * Generate user role css --- app/javascript/styles/mastodon/accounts.scss | 6 +++--- app/views/custom_css/show.css.erb | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss index 215774a19..54b65bfc8 100644 --- a/app/javascript/styles/mastodon/accounts.scss +++ b/app/javascript/styles/mastodon/accounts.scss @@ -210,9 +210,9 @@ font-size: 12px; line-height: 12px; font-weight: 500; - color: $ui-secondary-color; - background-color: rgba($ui-secondary-color, 0.1); - border: 1px solid rgba($ui-secondary-color, 0.5); + color: var(--user-role-accent, $ui-secondary-color); + background-color: var(--user-role-background, rgba($ui-secondary-color, 0.1)); + border: 1px solid var(--user-role-border, rgba($ui-secondary-color, 0.5)); &.moderator { color: $success-green; diff --git a/app/views/custom_css/show.css.erb b/app/views/custom_css/show.css.erb index 9cd38fb37..bcbe81962 100644 --- a/app/views/custom_css/show.css.erb +++ b/app/views/custom_css/show.css.erb @@ -5,6 +5,8 @@ <%- UserRole.where(highlighted: true).select { |role| role.color.present? }.each do |role| %> .user-role-<%= role.id %> { --user-role-accent: <%= role.color %>; + --user-role-background: <%= role.color + '19' %>; + --user-role-border: <%= role.color + '80' %>; } <%- end %> From 7205098ccf6573c1bd05da9c7a23a9b17d3fca8a Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 19 Jul 2022 08:06:11 +0900 Subject: [PATCH 4/4] [Glitch] Fix badge color not affected Port f248d95be26ceca3c2d717fa71557a56e975fece to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/accounts.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/styles/accounts.scss b/app/javascript/flavours/glitch/styles/accounts.scss index a3bfb0507..3d8b761e6 100644 --- a/app/javascript/flavours/glitch/styles/accounts.scss +++ b/app/javascript/flavours/glitch/styles/accounts.scss @@ -212,9 +212,9 @@ font-size: 12px; line-height: 12px; font-weight: 500; - color: $ui-secondary-color; - background-color: rgba($ui-secondary-color, 0.1); - border: 1px solid rgba($ui-secondary-color, 0.5); + color: var(--user-role-accent, $ui-secondary-color); + background-color: var(--user-role-background, rgba($ui-secondary-color, 0.1)); + border: 1px solid var(--user-role-border, rgba($ui-secondary-color, 0.5)); &.moderator { color: $success-green;