Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: app/views/layouts/application.html.haml Edited: app/helpers/application_helper.rb app/views/admin/domain_blocks/new.html.haml Conflict wasn't really one, just two changes too close to one another. Edition was to adapt the class names for themes to class names for skins and flavours. Also edited app/views/admin/domain_blocks/new.html.haml to strip the duplicate admin pack inclusion thing.
This commit is contained in:
@ -27,11 +27,6 @@ module ApplicationHelper
|
||||
Setting.open_deletion
|
||||
end
|
||||
|
||||
def add_rtl_body_class(other_classes)
|
||||
other_classes = "#{other_classes} rtl" if locale_direction == 'rtl'
|
||||
other_classes
|
||||
end
|
||||
|
||||
def locale_direction
|
||||
if [:ar, :fa, :he].include?(I18n.locale)
|
||||
'rtl'
|
||||
@ -77,4 +72,14 @@ module ApplicationHelper
|
||||
def react_component(name, props = {})
|
||||
content_tag(:div, nil, data: { component: name.to_s.camelcase, props: Oj.dump(props) })
|
||||
end
|
||||
|
||||
def body_classes
|
||||
output = (@body_classes || '').split(' ')
|
||||
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'
|
||||
output.reject(&:blank?).join(' ')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user