From 05cf49b5832c059aa84d0486eb4e95545dcfe23a Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 18 Jul 2022 15:41:08 +0900 Subject: [PATCH 1/3] 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 521834832e..9cd38fb371 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 6de2ae7d1e07856eccdd47bc8fcffd13e483700a Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Mon, 18 Jul 2022 06:41:50 +0000 Subject: [PATCH 2/3] 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 0a952add07..cc157bf479 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 9a42ccca535ca7fae77b93dda481b9f19f93a30b Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 19 Jul 2022 08:06:11 +0900 Subject: [PATCH 3/3] 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 215774a192..54b65bfc8c 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 9cd38fb371..bcbe819621 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 %>