mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 00:32:52 +08:00
FEATURE: Calculate sprite-sheet based on currently active themes (#6973)
Previously there was only one sprite sheet, which always included icons from all themes even if they were disabled
This commit is contained in:
@ -382,7 +382,7 @@ module ApplicationHelper
|
||||
|
||||
def theme_ids
|
||||
if customization_disabled?
|
||||
nil
|
||||
[nil]
|
||||
else
|
||||
request.env[:resolved_theme_ids]
|
||||
end
|
||||
@ -454,11 +454,11 @@ module ApplicationHelper
|
||||
asset_version: Discourse.assets_digest,
|
||||
disable_custom_css: loading_admin?,
|
||||
highlight_js_path: HighlightJs.path,
|
||||
svg_sprite_path: SvgSprite.path,
|
||||
svg_sprite_path: SvgSprite.path(theme_ids),
|
||||
}
|
||||
|
||||
if Rails.env.development?
|
||||
setup_data[:svg_icon_list] = SvgSprite.all_icons
|
||||
setup_data[:svg_icon_list] = SvgSprite.all_icons(theme_ids)
|
||||
end
|
||||
|
||||
if guardian.can_enable_safe_mode? && params["safe_mode"]
|
||||
|
Reference in New Issue
Block a user