@ -15,35 +15,28 @@
limitations under the License.
limitations under the License.
-->
-->
< section class = "flex flex-row" >
< button mat-button class = "tb-user-menu" [ matMenuTriggerFor ] = " userMenu " >
@if (displayUserInfo) {
< tb-icon class = "material-icons tb-mini-avatar" > mdi:account-circle-outline< / tb-icon >
< div class = "tb-user-info flex flex-row lt-lg:!hidden" >
< div class = "flex flex-col items-stretch justify-center" >
< mat-icon class = "material-icons tb-mini-avatar" > account_circle< / mat-icon >
@if (userDisplayName$ | async; as userDisplayName) {
< div class = "flex flex-col items-stretch justify-center" >
< span class = "tb-user-display-name" > {{ userDisplayName }}< / span >
@if (userDisplayName$ | async; as userDisplayName) {
}
< span class = "tb-user-display-name" > {{ userDisplayName }}< / span >
@if (authorityName$ | async; as authorityName) {
}
< span class = "tb-user-authority" > {{ authorityName | translate }}< / span >
@if (authorityName$ | async; as authorityName) {
}
< span class = "tb-user-authority" > {{ authorityName | translate }}< / span >
< / div >
}
< / button >
< / div >
< mat-menu # userMenu = "matMenu" xPosition = "before" yPosition = "above" >
@if (authority$ | async; as authority) {
< div class = "tb-user-menu-items" >
< button mat-menu-item ( click ) = " openAccount ( ) " >
< mat-icon class = "material-icons" > account_circle< / mat-icon >
< span translate > account.account< / span >
< / button >
< button mat-menu-item ( click ) = " logout ( ) " >
< mat-icon class = "material-icons" > exit_to_app< / mat-icon >
< span translate > home.logout< / span >
< / button >
< / div >
< / div >
}
}
< button mat-icon-button [ matMenuTriggerFor ] = " userMenu " >
< / mat-menu >
< mat-icon class = "material-icons" > more_vert< / mat-icon >
< / button >
< mat-menu # userMenu = "matMenu" xPosition = "before" >
@if (authority$ | async; as authority) {
< div class = "tb-user-menu-items" >
< button mat-menu-item ( click ) = " openAccount ( ) " >
< mat-icon class = "material-icons" > account_circle< / mat-icon >
< span translate > account.account< / span >
< / button >
< button mat-menu-item ( click ) = " logout ( ) " >
< mat-icon class = "material-icons" > exit_to_app< / mat-icon >
< span translate > home.logout< / span >
< / button >
< / div >
}
< / mat-menu >
< / section >