Skip to content

Commit 58f011d

Browse files
sarkapalkovicovaxkostka2
authored andcommitted
fix(admin): logout button with icon
Logout button was moved out of drop-down menu.
1 parent 00b9eef commit 58f011d

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

libs/perun/components/src/lib/header-menu/header-menu.component.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,11 @@
1212
</button>
1313
</mat-menu>
1414

15-
<button mat-button [matMenuTriggerFor]="menu">
16-
<mat-icon class="mb-1 me-3" [ngStyle]="{'color': iconColor, 'font-size': '24px'}">
17-
person
18-
</mat-icon>
19-
<span *ngIf="user !== null" [ngStyle]="{'color': textColor}" class="d-none d-lg-inline">
20-
{{user | userFullName}}
21-
</span>
15+
<button
16+
mat-icon-button
17+
*ngIf="logoutEnabled"
18+
(click)="onLogOut()"
19+
[matTooltip]="'NAV.LOGOUT'|translate">
20+
<mat-icon>logout</mat-icon>
2221
</button>
23-
<mat-menu #menu="matMenu">
24-
<button mat-menu-item *ngIf="logoutEnabled" (click)="onLogOut()">
25-
{{'NAV.LOGOUT' | translate}}
26-
</button>
27-
</mat-menu>
2822
</div>

libs/perun/components/src/lib/perun-header/perun-header.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
</mat-menu>
3636
</div>
3737

38+
<span
39+
*ngIf="principal.user !== null"
40+
[ngStyle]="{'color': textColor}"
41+
class="d-none d-lg-inline displayed-name me-1">
42+
{{principal.user | userFullName}}
43+
</span>
44+
3845
<button
3946
*ngIf="showNotifications"
4047
[matTooltip]="'NAV.NOTIFICATIONS_TOOLTIP'|translate"

libs/perun/components/src/lib/perun-header/perun-header.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@
5050
align-items: center;
5151
padding-right: 16px;
5252
}
53+
54+
.displayed-name {
55+
font-family: Roboto, 'Helvetica Neue', sans-serif;
56+
font-size: 80%;
57+
}

0 commit comments

Comments
 (0)