mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:11:12 +08:00
FIX: properly load desktop and mobile only plugin css assets.
5bd6b70d985e2736f56d2bec6cce56bee0227b1f
This commit is contained in:
@ -183,8 +183,15 @@ class DiscoursePluginRegistry
|
||||
end
|
||||
end
|
||||
|
||||
def self.stylesheets_exists?(plugin_directory_name)
|
||||
self.stylesheets[plugin_directory_name].present? || self.mobile_stylesheets[plugin_directory_name].present? || self.desktop_stylesheets[plugin_directory_name].present?
|
||||
def self.stylesheets_exists?(plugin_directory_name, target = nil)
|
||||
case target
|
||||
when :desktop
|
||||
self.desktop_stylesheets[plugin_directory_name].present?
|
||||
when :mobile
|
||||
self.mobile_stylesheets[plugin_directory_name].present?
|
||||
else
|
||||
self.stylesheets[plugin_directory_name].present?
|
||||
end
|
||||
end
|
||||
|
||||
def self.register_seed_data(key, value)
|
||||
|
Reference in New Issue
Block a user