diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/settings/keyword_mutes_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/statuses_helper.rb | 16 |
3 files changed, 15 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9d113263d..7ae1e5d0b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -95,7 +95,8 @@ module ApplicationHelper def body_classes output = (@body_classes || '').split(' ') - output << "theme-#{current_theme.parameterize}" + output << "flavour-#{current_flavour.parameterize}" + output << "skin-#{current_skin.parameterize}" output << 'system-font' if current_account&.user&.setting_system_font_ui output << (current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion') output << 'rtl' if locale_direction == 'rtl' diff --git a/app/helpers/settings/keyword_mutes_helper.rb b/app/helpers/settings/keyword_mutes_helper.rb new file mode 100644 index 000000000..7b98cd59e --- /dev/null +++ b/app/helpers/settings/keyword_mutes_helper.rb @@ -0,0 +1,2 @@ +module Settings::KeywordMutesHelper +end diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb index e067380f6..2996631a3 100644 --- a/app/helpers/statuses_helper.rb +++ b/app/helpers/statuses_helper.rb @@ -68,8 +68,12 @@ module StatusesHelper end end + def hide_followers_count?(account) + Setting.hide_followers_count || account.user&.setting_hide_followers_count + end + def account_description(account) - prepend_str = [ + prepend_stats = [ [ number_to_human(account.statuses_count, strip_insignificant_zeros: true), I18n.t('accounts.posts', count: account.statuses_count), @@ -79,14 +83,16 @@ module StatusesHelper number_to_human(account.following_count, strip_insignificant_zeros: true), I18n.t('accounts.following', count: account.following_count), ].join(' '), + ] - [ + unless hide_followers_count?(account) + prepend_stats << [ number_to_human(account.followers_count, strip_insignificant_zeros: true), I18n.t('accounts.followers', count: account.followers_count), - ].join(' '), - ].join(', ') + ].join(' ') + end - [prepend_str, account.note].join(' · ') + [prepend_stats.join(', '), account.note].join(' · ') end def media_summary(status) |