From 47a251048c7b236a667195591a0db02b9e0f6745 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 10 May 2019 05:55:03 -0500 Subject: Expose user settings to `Account` model and update code referencing those settings. --- app/views/layouts/application.html.haml | 14 +++++++------- app/views/stream_entries/_detailed_status.html.haml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 6bd9a00ab..f01329914 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -37,7 +37,7 @@ - if Setting.custom_css.present? = stylesheet_link_tag custom_css_path, media: 'all' - - if current_account&.user&.setting_disable_color + - if current_account.user_hides_color_formatting? :css .status__content p > span, .reply-indicator__content p > span, @@ -46,20 +46,20 @@ .account__header__fields p > span { color: inherit !important } - - if current_account&.user&.setting_hide_captions + - if current_account.user_hides_captions? :css div .media-caption, span .caption { display: none } - - if current_account&.user&.setting_larger_menus + - if current_account.user_wants_larger_menus? :css .dropdown-menu__item a { padding: 14px 14px !important; font-size: 14px !important } .dropdown--active .dropdown__content > ul > li > a { padding: 14px 0 !important; font-size: 14px !important } - - if current_account&.user&.setting_larger_buttons + - if current_account.user_wants_larger_buttons? :css .drawer { min-width: 350px !important } .status__action-bar .icon-button, @@ -73,15 +73,15 @@ margin-right: 24px; } - - if current_account&.user&.setting_larger_drawer + - if current_account.user_wants_larger_drawer? :css .drawer { min-width: 400px !important } - - if current_account&.user&.setting_remove_filtered + - if current_account.user_hides_filtered_gap? :css .status__wrapper--filtered { display: none !important; } - - if current_account&.user&.setting_hide_mascot + - if current_account.user_hides_mascot? :css .drawer__inner__mastodon>img { display: none !important } diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 372d29b7c..b7015e356 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -65,13 +65,13 @@ · %span.detailed-status__link< = fa_icon('lock') - - elsif user_signed_in? && !@account.user&.setting_hide_stats + - elsif user_signed_in? && !@account.user_hides_stats? · = link_to remote_interaction_path(status, type: :reblog), class: 'modal-button detailed-status__link', title: number_to_human(status.reblogs_count, strip_insignificant_zeros: true) do = fa_icon('repeat') = " " - - if user_signed_in? && !@account.user&.setting_hide_stats + - if user_signed_in? && !@account.user_hides_stats? · = link_to remote_interaction_path(status, type: :favourite), class: 'modal-button detailed-status__link', title: number_to_human(status.favourites_count, strip_insignificant_zeros: true) do = fa_icon('star') -- cgit