mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-2064] support custom icons for extensions (#864)
* icon component, custom svg * split components, fix modules * simplify code * universal icon component * support custom icon registration * update docs * test fixes
This commit is contained in:
@@ -24,6 +24,7 @@ You can create plugins that change, toggle, or extend the following areas:
|
||||
- buttons
|
||||
- "More actions" buttons
|
||||
- Content metadata presets (used on `Properties` tab)
|
||||
- Custom icons
|
||||
|
||||
Extensions can also:
|
||||
|
||||
|
42
docs/extending/icons.md
Normal file
42
docs/extending/icons.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Custom Icons
|
||||
|
||||
You can register and use custom `.svg` icons with toolbars, context menus, etc.
|
||||
|
||||
The icons are declared in the `features.icons` section, for example:
|
||||
|
||||
```json
|
||||
{
|
||||
"features": {
|
||||
"icons": [
|
||||
{
|
||||
"id": "adf:join_library",
|
||||
"value": "./assets/images/join-library.svg"
|
||||
},
|
||||
{
|
||||
"id": "adf:move_file",
|
||||
"value": "./assets/images/adf-move-file-24px.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `id` value must conform to the format `[namespace]:[name]`,
|
||||
similar to that of the [Material Icon](https://material.angular.io/components/icon/api) component.
|
||||
The icon file path should be relative to the deployed application root (or `index.html` file);
|
||||
|
||||
After that, you can use the icon id with other elements, for example:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "app.toolbar.move",
|
||||
"order": 500,
|
||||
"title": "APP.ACTIONS.MOVE",
|
||||
"icon": "adf:move_file",
|
||||
"actions": {
|
||||
"click": "MOVE_NODES"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
It is also possible to override the icon value or disable the entry from within external extensions.
|
65
docs/toc.md
65
docs/toc.md
@@ -1,38 +1,39 @@
|
||||
- [Home](/)
|
||||
- [Documentation](/#documentation)
|
||||
- [How to contribute](/#how-to-contribute)
|
||||
- [Documentation](/#documentation)
|
||||
- [How to contribute](/#how-to-contribute)
|
||||
- [App features](/features/)
|
||||
- [User interface layout](/features/user-interface-layout)
|
||||
- [Header](/features/header)
|
||||
- [Side navigation](/features/side-navigation)
|
||||
- [Document List Layout](/features/document-list-layout)
|
||||
- [File Viewer](/features/file-viewer)
|
||||
- [Info Drawer](/features/info-drawer)
|
||||
- [Version Manager](/features/version-manager)
|
||||
- [Search results](/features/search-results)
|
||||
- [User interface layout](/features/user-interface-layout)
|
||||
- [Header](/features/header)
|
||||
- [Side navigation](/features/side-navigation)
|
||||
- [Document List Layout](/features/document-list-layout)
|
||||
- [File Viewer](/features/file-viewer)
|
||||
- [Info Drawer](/features/info-drawer)
|
||||
- [Version Manager](/features/version-manager)
|
||||
- [Search results](/features/search-results)
|
||||
- [Getting started](/getting-started/)
|
||||
- [Prerequisites](/getting-started/prerequisites)
|
||||
- [Building from source](/getting-started/building-from-source)
|
||||
- [Internationalization (i18n)](/getting-started/internationalization)
|
||||
- [CORS](/getting-started/cors)
|
||||
- [Configuration](/getting-started/configuration)
|
||||
- [Navigation](/getting-started/navigation)
|
||||
- [Docker](/getting-started/docker)
|
||||
- [Prerequisites](/getting-started/prerequisites)
|
||||
- [Building from source](/getting-started/building-from-source)
|
||||
- [Internationalization (i18n)](/getting-started/internationalization)
|
||||
- [CORS](/getting-started/cors)
|
||||
- [Configuration](/getting-started/configuration)
|
||||
- [Navigation](/getting-started/navigation)
|
||||
- [Docker](/getting-started/docker)
|
||||
- [Extending](/extending/)
|
||||
- [Extensibility features](/extending/extensibility-features)
|
||||
- [Extension format](/extending/extension-format)
|
||||
- [Routes](/extending/routes)
|
||||
- [Components](/extending/components)
|
||||
- [Actions](/extending/actions)
|
||||
- [Application actions](/extending/application-actions)
|
||||
- [Rules](/extending/rules)
|
||||
- [Application features](/extending/application-features)
|
||||
- [Registration](/extending/registration)
|
||||
- [Creating custom evaluators](/extending/creating-custom-evaluators)
|
||||
- [Tutorials](/extending/tutorials)
|
||||
- [Redistributable libraries](/extending/redistributable-libraries)
|
||||
- [Extensibility features](/extending/extensibility-features)
|
||||
- [Extension format](/extending/extension-format)
|
||||
- [Routes](/extending/routes)
|
||||
- [Components](/extending/components)
|
||||
- [Actions](/extending/actions)
|
||||
- [Application actions](/extending/application-actions)
|
||||
- [Rules](/extending/rules)
|
||||
- [Application features](/extending/application-features)
|
||||
- [Custom icons](/extending/icons)
|
||||
- [Registration](/extending/registration)
|
||||
- [Creating custom evaluators](/extending/creating-custom-evaluators)
|
||||
- [Tutorials](/extending/tutorials)
|
||||
- [Redistributable libraries](/extending/redistributable-libraries)
|
||||
- [Tutorials](/tutorials/)
|
||||
- [Introduction to extending ACA](/tutorials/introduction-to-extending)
|
||||
- [Custom route with parameters](/tutorials/custom-route-with-parameters)
|
||||
- [Dialog actions](/tutorials/dialog-actions)
|
||||
- [Introduction to extending ACA](/tutorials/introduction-to-extending)
|
||||
- [Custom route with parameters](/tutorials/custom-route-with-parameters)
|
||||
- [Dialog actions](/tutorials/dialog-actions)
|
||||
- [Get help](/help)
|
||||
|
Reference in New Issue
Block a user