diff --git a/src/core/features/mainmenu/components/user-menu/user-menu.html b/src/core/features/mainmenu/components/user-menu/user-menu.html index c36894446..34a9184f7 100644 --- a/src/core/features/mainmenu/components/user-menu/user-menu.html +++ b/src/core/features/mainmenu/components/user-menu/user-menu.html @@ -45,6 +45,14 @@

{{ handler.title | translate }}

+ + + {{ handler.badgeA11yText | translate: {$a : handler.badge } }} + + +

{{ user.fullname }}

-

{{ user.address }}

+

+ {{ user.address }} +

{{ 'core.user.roles' | translate}}{{'core.labelsep' | translate}} {{ rolesFormatted }} @@ -51,7 +53,9 @@ - + + +

{{ handler.title | translate }}

+ + + {{ handler.badgeA11yText | translate: {$a : handler.badge } }} + + +
@@ -76,8 +88,7 @@ - + diff --git a/src/core/features/user/services/user-delegate.ts b/src/core/features/user/services/user-delegate.ts index 5901fa17d..b16a36787 100644 --- a/src/core/features/user/services/user-delegate.ts +++ b/src/core/features/user/services/user-delegate.ts @@ -111,6 +111,26 @@ export interface CoreUserProfileHandlerData { */ spinner?: boolean; + /** + * If the handler has badge to show or not. Only for TYPE_NEW_PAGE. + */ + showBadge?: boolean; + + /** + * Text to display on the badge. Only used if showBadge is true and only for TYPE_NEW_PAGE. + */ + badge?: string; + + /** + * Accessibility text to add on the badge. Only used if showBadge is true and only for TYPE_NEW_PAGE. + */ + badgeA11yText?: string; + + /** + * If true, the badge number is being loaded. Only used if showBadge is true and only for TYPE_NEW_PAGE. + */ + loading?: boolean; + /** * Action to do when clicked. *