Add ThemeImages API

- Add ThemeImages Entity
- Add ThemeImages DataProvider
- Add ThemeImage Service
-- Retrieves the list of images for a given theme
- Add ThemeImagesFinder
-- looks up for images inside a given path
-- Add configuration to specify theme image paths
-- Add configuration to specify supported image types
- Add unit tests
- Add theme-images angular facade
- Update base metadata resolver to load theme images
-- Move UserPreferences loading ot base metadata resolver
-- Loaded theme images after user preference and config loading
--- uses default_theme, if user preferences weren't loaded
-- Add jasmine tests
- Add scrm-image component
-- Add jasmine tests
- Replace usages of svg-icon with image component
-- Fix jasmine tests
- Adjust UserPreference interface to match the current data
This commit is contained in:
Clemente Raposo 2020-04-03 15:23:54 +01:00 committed by Dillon-Brown
parent 3f133b64db
commit 895ec5b4f7
77 changed files with 2651 additions and 1496 deletions

View file

@ -28,6 +28,8 @@ services:
$menuItemMap: '%legacy.menu_item_map%'
$legacyAssetPaths: '%legacy.asset_paths%'
$exposedUserPreferences: '%legacy.exposed_user_preferences%'
$themeImagePaths: '%themes.image_paths%'
$themeImageSupportedTypes: '%themes.image_supported_types%'
_instanceof:
App\Service\ProcessHandlerInterface:
tags: ['app.process.handler']

View file

@ -5,3 +5,4 @@ parameters:
forgotpasswordON: true
languages: true
default_module: true
default_theme: true

View file

@ -0,0 +1,9 @@
parameters:
themes.image_paths:
# Order matters, lower ones will override the above ones
- 'legacy/themes/default/images'
- 'legacy/custom/themes/default/images'
- 'core/app/themes/default/images'
- 'legacy/themes/<theme>/images'
- 'legacy/custom/themes/<theme>/images'
- 'core/app/themes/<theme>/images'

View file

@ -0,0 +1,8 @@
parameters:
themes.image_supported_types:
# Order matters, top most ones will have priority over the lower ones
- 'svg'
- 'png'
- 'jpg'
- 'jpeg'
- 'gif'