Merge remote-tracking branch 'parent/main' into upstream-20240821
This commit is contained in:
commit
af0f8f01e1
136 changed files with 693 additions and 756 deletions
|
@ -25,7 +25,7 @@ module Admin::FilterHelper
|
|||
end
|
||||
|
||||
def table_link_to(icon, text, path, **options)
|
||||
link_to safe_join([fa_icon(icon), text]), path, options.merge(class: 'table-action-link')
|
||||
link_to safe_join([material_symbol(icon), text]), path, options.merge(class: 'table-action-link')
|
||||
end
|
||||
|
||||
def selected?(more_params)
|
||||
|
|
|
@ -107,19 +107,12 @@ module ApplicationHelper
|
|||
policy(record).public_send(:"#{action}?")
|
||||
end
|
||||
|
||||
def fa_icon(icon, attributes = {})
|
||||
class_names = attributes[:class]&.split || []
|
||||
class_names << 'fa'
|
||||
class_names += icon.split.map { |cl| "fa-#{cl}" }
|
||||
|
||||
content_tag(:i, nil, attributes.merge(class: class_names.join(' ')))
|
||||
end
|
||||
|
||||
def material_symbol(icon, attributes = {})
|
||||
inline_svg_tag(
|
||||
"400-24px/#{icon}.svg",
|
||||
class: ['icon', "material-#{icon}"].concat(attributes[:class].to_s.split),
|
||||
role: :img
|
||||
role: :img,
|
||||
data: attributes[:data]
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ module SettingsHelper
|
|||
device = session.detection.device
|
||||
|
||||
if device.mobile?
|
||||
'mobile'
|
||||
'smartphone'
|
||||
elsif device.tablet?
|
||||
'tablet'
|
||||
else
|
||||
'desktop'
|
||||
'desktop_mac'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue