about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-10 05:55:03 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:23 -0500
commit47a251048c7b236a667195591a0db02b9e0f6745 (patch)
treefdaf8aa8de65a3b92d1bf3eb589b26e44a7f5dda /app/views
parent8d122422167784883a87a0461d098d885dd3599d (diff)
Expose user settings to `Account` model and update code referencing those settings.
Diffstat (limited to 'app/views')
-rwxr-xr-xapp/views/layouts/application.html.haml14
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml4
2 files changed, 9 insertions, 9 deletions
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')