About¶
About:
The About Page provides detailed information about the product.
Usage¶
The About Page is a part of an overarching concept to fulfil legal guidelines beside of providing additional information about the product (e.g. version).
Code¶
The component has 3 modes which can be selected using the licenseInfo parameter.
api(preferred): License texts are lazy loaded separately for each component. Requires a service to provide license data. With the parameterlicenseInfo.iconyou can set a custom license file icon.text: Plain text input to dump all license textsiframe(avoid): Embedded page to display the licenses from another source.
Usage¶
import { SiAboutComponent } from '@siemens/element-ng/about';
@Component({
imports: [SiAboutComponent,...]
})
Please use the appropriate input properties for the legal artifact links like Corporate Information or Acceptable Use Policy. This ensures the same order in all applications.
License via API¶
The API variant allows fast and neat navigation through the different license files. By clicking on the subsystems and components, the license details are loaded lazily via API and revealed when loaded.
Just set the licenseInfo.api parameter to the API endpoint which provides the license data.
License data format¶
The JSON based API supported by the about dialog is structured into three levels of endpoints:
- Endpoint:
/api/licenses/ - MIME Type:
application/json - Description: Top-level index listing all subsystems
-
Result:
[ { "name": "OS", "href": "/api/licenses/os/" }, { "name": "Dummy", "href": "/api/licenses/Dummy/" } ] -
Endpoint:
/api/licenses/<subsystem> - MIME Type:
application/json - Description: Subsystem-level index listing all components
-
Result:
[{ "name": "boost 1.66", "href": "/api/licenses/os/boost_1.66.copyright" }] -
Endpoint:
/api/licenses/<subsystem>/<component> - MIME Type:
text/plain - Description: Literal content of the component’s copyright or acknowledgement file
- Result:
Boost copyright text
License Text¶
Use the licenseInfo.text parameter to display the provided license text as plain text.
License introduction text and API¶
If your application requires showing a disclaimer in addition to the component licenses provided via API, you can combine the parameters licenseInfo.text and licenseInfo.api.
License Iframe¶
You can also use a URL in the licenseInfo.iframe parameter to show an embedded page containing license information.
Security considerations¶
The licenseInfo.iframe URL is marked as a trusted resource URL and is not sanitized by Angular. Only pass URLs from trusted sources.
import { SiAboutComponent } from '@siemens/element-ng/about'; Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| aboutTitlerequired ¶ | string | Title shown above the about information. | |
| acceptableUsePolicyLink ¶ | Link | undefined | Link to | |
| appNamerequired ¶ | string | Title of this application. | |
| cookieNoticeLink ¶ | Link | undefined | Link to | |
| copyrightDetails ¶ | CopyrightDetails | undefined | Copyright information to be displayed. Alternatively, you can use the SI_COPYRIGHT_DETAILS global inject. | |
| icon ¶ | string | undefined | Path to the application logo. Use for image | |
| iconName ¶ | string | undefined | Name of element icon. Use as alternative to image | |
| imprintLink ¶ | Link | undefined | Link to | |
| licenseInforequired ¶ | LicenseInfo | Define mode to display the licenses. See LicenseInfo | |
| links ¶ | Link[] | [] | Additional links listed in the about section. |
| logoAlt ¶ | TranslatableString | $localize`:@@SI_ABOUT.LOGO_ALT:{{appName}} logo` | Alt text for the application logo. Supports |
| privacyLink ¶ | Link | undefined | Link to | |
| subheading ¶ | string[] | undefined | Sub titles of the application. Shown as a list below the application name. (Optional) | |
| termsLink ¶ | Link | undefined | Link to |
Types Documentation¶
-
URL to license REST end point. License texts are lazy loaded separately for each component. Requires a service to provide license data.
-
In API View, custom license file icon.
-
URL to license file to be shown in iFrame.
-
License to be shown as plain text in
<pre>element. -
Title of the License Info.
-
A function that will be invoked when clicking on the menu item. When passed as a string, use together with SiLinkActionService to receive events. This is meant for repetitive things in lists/tables/etc.
-
A boolean that lets the link know whether it is disabled or not.
-
Defines a href URI that the menu item will be linked to. Will be used to set the href attribute of the a element. Will only be used if link and function is not set.
-
A boolean that lets the link know whether it is active or not. It is useful when action() is executed instead of link route.
-
Defines the link of the menu item within the application using the angular router link concept. Accepts an array of
anyas per [routerLink API definition]https://angular.dev/api/router/RouterLink. -
The target attribute specifies where to open the linked document. If no target is specified, the link will open in the current tab.
-
The title of the menu item. Can be either the title to be displayed or the translation key.
-
The optional tooltip of the link. Can be either the text to be displayed or the translation key.
Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
Except where otherwise noted, content on this site is licensed under MIT License.