diff --git a/packages/fiori/src/UserMenu.hbs b/packages/fiori/src/UserMenu.hbs index 36864f7ebd2f..ee06a75d7514 100644 --- a/packages/fiori/src/UserMenu.hbs +++ b/packages/fiori/src/UserMenu.hbs @@ -21,14 +21,14 @@ - {{#if _selectedAccount.text}} - {{_selectedAccount.text}} + {{#if _selectedAccount.titleText}} + {{_selectedAccount.titleText}} {{/if}} - {{#if _selectedAccount.subtitle1}} - {{_selectedAccount.subtitle1}} + {{#if _selectedAccount.additionalText}} + {{_selectedAccount.additionalText}} {{/if}} - {{#if _selectedAccount.subtitle2}} - {{_selectedAccount.subtitle2}} + {{#if _selectedAccount.description}} + {{_selectedAccount.description}} {{/if}} {{#if showManageAccount}} @@ -54,14 +54,14 @@ {{/if}}
- {{#if text}} - {{text}} + {{#if titleText}} + {{titleText}} {{/if}} - {{#if subtitle1}} - {{subtitle1}} + {{#if additionalText}} + {{additionalText}} {{/if}} - {{#if subtitle2}} - {{subtitle2}} + {{#if description}} + {{description}} {{/if}}
diff --git a/packages/fiori/src/UserMenu.ts b/packages/fiori/src/UserMenu.ts index 64d957f56d61..ad94bf35c4c4 100644 --- a/packages/fiori/src/UserMenu.ts +++ b/packages/fiori/src/UserMenu.ts @@ -334,7 +334,10 @@ class UserMenu extends UI5Element { } get accessibleNameText() { - return `${UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_NAME)} ${this._selectedAccount?.text}`; + if (!this._selectedAccount) { + return ""; + } + return `${UserMenu.i18nBundle.getText(USER_MENU_POPOVER_ACCESSIBLE_NAME)} ${this._selectedAccount.titleText}`; } } diff --git a/packages/fiori/src/UserMenuAccount.ts b/packages/fiori/src/UserMenuAccount.ts index 02425653a136..7b314844c54c 100644 --- a/packages/fiori/src/UserMenuAccount.ts +++ b/packages/fiori/src/UserMenuAccount.ts @@ -45,25 +45,25 @@ class UserMenuAccount extends UI5Element { * @public */ @property({ type: String }) - text = ""; + titleText = ""; /** - * Defines subtitle 1 of the user. + * Defines additional text of the user. * * @default "" * @public */ @property({ type: String }) - subtitle1 = ""; + additionalText = ""; /** - * Defines subtitle 2 of the user. + * Defines description of the user. * * @default "" * @public */ @property({ type: String }) - subtitle2 = ""; + description = ""; /** * Defines if the user is selected. diff --git a/packages/fiori/test/pages/UserMenu.html b/packages/fiori/test/pages/UserMenu.html index a4b7e3fdaa28..9230a0d87ab0 100644 --- a/packages/fiori/test/pages/UserMenu.html +++ b/packages/fiori/test/pages/UserMenu.html @@ -23,22 +23,21 @@ User menu + avatar="./img/man_avatar_1.png" + title-text="Alain Chevalier 1" + additional-text="alian.chevalier@sap.com" + description="Delivery Manager, SAP SE" + selected> + initials="AC" + title-text="Alain Chevalier 2" + additional-text="test.alian.chevalier@sap.com"> + title-text="Alain Chevalier 3" + additional-text="alian.chevalier@ariba.com" + description="Account Manager"> diff --git a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html index c5e6d6801d96..ce5b8ba03d87 100644 --- a/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html +++ b/packages/website/docs/_samples/fiori/UserMenu/Basic/sample.html @@ -29,21 +29,21 @@ User menu + avatar="../assets/images/avatars/Lamp_avatar_01.jpg" + title-text="Alain Chevalier 1" + additional-text="alian.chevalier@sap.com" + description="Delivery Manager, SAP SE" + selected> + initials="AC" + title-text="Alain Chevalier 2" + additional-text="test.alian.chevalier@sap.com"> + title-text="Alain Chevalier 3" + additional-text="alian.chevalier@ariba.com" + description="Account Manager">