|
21 | 21 | </div>
|
22 | 22 | </div>
|
23 | 23 |
|
24 |
| - <div *ngIf="authUser$ | async as user; else login"> |
25 |
| - <tui-hosted-dropdown tuiDropdownAlign="left" [content]="userDropdown"> |
26 |
| - <tui-avatar |
27 |
| - [text]="user.firstName + ' ' + user.lastName" |
28 |
| - class="aa--cursor-pointer" |
29 |
| - ></tui-avatar> |
30 |
| - </tui-hosted-dropdown> |
31 |
| - <ng-template #userDropdown> |
32 |
| - <tui-data-list role="menu"> |
33 |
| - <tui-opt-group [label]="user.firstName + ' ' + user.lastName"> |
34 |
| - <button tuiOption (click)="logout()"> |
35 |
| - <span> |
36 |
| - <tui-svg class="aa--mr-2" src="tuiIconLogoutLarge"></tui-svg> |
37 |
| - Logout |
38 |
| - </span> |
39 |
| - </button> |
40 |
| - </tui-opt-group> |
41 |
| - </tui-data-list> |
| 24 | + <div class="aa--flex aa--items-center"> |
| 25 | + <div *ngIf="authUser$ | async as user; else login"> |
| 26 | + <tui-hosted-dropdown tuiDropdownAlign="left" [content]="userDropdown"> |
| 27 | + <tui-avatar |
| 28 | + [text]="user.firstName + ' ' + user.lastName" |
| 29 | + class="aa--cursor-pointer" |
| 30 | + ></tui-avatar> |
| 31 | + </tui-hosted-dropdown> |
| 32 | + <ng-template #userDropdown> |
| 33 | + <tui-data-list role="menu"> |
| 34 | + <tui-opt-group [label]="user.firstName + ' ' + user.lastName"> |
| 35 | + <button tuiOption (click)="logout()"> |
| 36 | + <span> |
| 37 | + <tui-svg class="aa--mr-2" src="tuiIconLogoutLarge"></tui-svg> |
| 38 | + Logout |
| 39 | + </span> |
| 40 | + </button> |
| 41 | + </tui-opt-group> |
| 42 | + </tui-data-list> |
| 43 | + </ng-template> |
| 44 | + </div> |
| 45 | + |
| 46 | + <ng-template #login> |
| 47 | + <a |
| 48 | + tuiButton |
| 49 | + size="m" |
| 50 | + routerLink="/login" |
| 51 | + [appearance]="'outline'" |
| 52 | + icon="tuiIconUser" |
| 53 | + > |
| 54 | + Login |
| 55 | + </a> |
42 | 56 | </ng-template>
|
43 |
| - </div> |
44 | 57 |
|
45 |
| - <ng-template #login> |
46 |
| - <a tuiButton size="m" routerLink="/login" [appearance]="'outline'" icon="tuiIconUser"> |
47 |
| - Login |
| 58 | + <a |
| 59 | + href="https://github.com/nikosanif/angular-authentication" |
| 60 | + target="_blank" |
| 61 | + rel="noopener noreferrer" |
| 62 | + class="aa--ml-4 aa--text-2xl" |
| 63 | + [tuiHint]="'Source code'" |
| 64 | + > |
| 65 | + <fa-icon [icon]="['fab', 'github']"></fa-icon> |
48 | 66 | </a>
|
49 |
| - </ng-template> |
| 67 | + </div> |
50 | 68 | </header>
|
0 commit comments