Add a new mode to AuthorityConfidenceStateDirective to configure use fontawesome icons instead of class defined in style property

This commit is contained in:
Toni Prieto
2024-02-12 22:57:28 +01:00
parent f3a64bcadc
commit b4a9a0dd1e
7 changed files with 143 additions and 20 deletions

View File

@@ -164,7 +164,7 @@ export class DefaultAppConfig implements AppConfig {
* {
* // NOTE: metadata name
* name: 'dc.author',
* // NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
* // NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
* style: 'fa-user'
* }
*/
@@ -184,27 +184,59 @@ export class DefaultAppConfig implements AppConfig {
* NOTE: example of configuration
* {
* // NOTE: confidence value
* value: 'dc.author',
* // NOTE: fontawesome (v4.x) icon classes and bootstrap utility classes can be used
* style: 'fa-user'
* value: 100,
* // NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
* style: 'text-success',
* icon: 'fa-circle-check'
* // NOTE: the class configured in property style is used by default, the icon property could be used in component
* // configured to use a 'icon mode' display (mainly in edit-item page)
* }
*/
{
value: 600,
style: 'text-success'
style: 'text-success',
icon: 'fa-circle-check'
},
{
value: 500,
style: 'text-info'
style: 'text-info',
icon: 'fa-gear'
},
{
value: 400,
style: 'text-warning'
style: 'text-warning',
icon: 'fa-circle-question'
},
{
value: 300,
style: 'text-muted',
icon: 'fa-circle-question'
},
{
value: 200,
style: 'text-muted',
icon: 'fa-circle-exclamation'
},
{
value: 100,
style: 'text-muted',
icon: 'fa-circle-stop'
},
{
value: 0,
style: 'text-muted',
icon: 'fa-ban'
},
{
value: -1,
style: 'text-muted',
icon: 'fa-circle-xmark'
},
// default configuration
{
value: 'default',
style: 'text-muted'
style: 'text-muted',
icon: 'fa-circle-xmark'
}
]