|
16 | 16 | <ng-template #loadedConfig>
|
17 | 17 | <mat-toolbar color="primary">
|
18 | 18 | <mat-icon>library_books</mat-icon>
|
19 |
| - <span style="margin-left: 1rem">Pattern Atlas</span> |
| 19 | + <span style="margin-left: 1rem">PatternAtlas</span> |
| 20 | + |
20 | 21 | <span class="spacer"></span>
|
21 |
| - {{welcomeText}} |
22 |
| - <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Button with a menu"> |
23 |
| - <mat-icon>more_vert</mat-icon> |
24 |
| - </button> |
25 |
| - <mat-menu #menu="matMenu"> |
26 |
| - <button mat-menu-item (click)="openFeatureToggleDialog()"> |
27 |
| - <span>Feature Toggles</span> |
| 22 | + <div *patternAtlasUiShowOnFeature="!(UiFeatures.PATTERNCANDIDATE || UiFeatures.ISSUE)"> |
| 23 | + <button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Button with a menu"> |
| 24 | + <mat-icon>more_vert</mat-icon> |
28 | 25 | </button>
|
29 |
| - </mat-menu> |
30 |
| - <div class="log-button"> |
31 |
| - <button mat-stroked-button |
32 |
| - (click)="loginOAuth()" |
33 |
| - *patternAtlasUiShowOnFeature="[UiFeatures.ISSUE,UiFeatures.PATTERNCANDIDATE]"> {{ loginButton }}</button> |
34 |
| - |
| 26 | + <mat-menu #menu="matMenu"> |
| 27 | + <button mat-menu-item (click)="openFeatureToggleDialog()"> |
| 28 | + <span>Feature Toggles</span> |
| 29 | + </button> |
| 30 | + </mat-menu> |
| 31 | + </div> |
| 32 | + <div class="log-button" *patternAtlasUiShowOnFeature="UiFeatures.PATTERNCANDIDATE || UiFeatures.ISSUE"> |
| 33 | + <button *ngIf="!loggedIn" mat-button (click)="login()"> Login </button> |
| 34 | + <button *ngIf="loggedIn" mat-button [matMenuTriggerFor]="menu">Hello {{userName}} <mat-icon>more_vert</mat-icon></button> |
| 35 | + <mat-menu #menu="matMenu"> |
| 36 | + <button mat-menu-item routerLink="/user-info"> UserInfo </button> |
| 37 | + <button *ngIf="p.hidden('USER_READ_ALL') | async" mat-menu-item routerLink="/admin"> Admin </button> |
| 38 | + <!-- <button mat-menu-item routerLink="/developer"> Developer </button> --> |
| 39 | + <button mat-menu-item (click)="openFeatureToggleDialog()"> |
| 40 | + <span>Feature Toggles</span> |
| 41 | + </button> |
| 42 | + <button mat-menu-item color="warn" (click)="logout()"> Logout </button> |
| 43 | + </mat-menu> |
35 | 44 | </div>
|
36 | 45 | </mat-toolbar>
|
37 | 46 | <nav mat-tab-nav-bar>
|
|
57 | 66 | routerLinkActive #rla5="routerLinkActive" [active]="rla5.isActive">
|
58 | 67 | Issue
|
59 | 68 | </a>
|
60 |
| - <a mat-tab-link [routerLink]="'/user'" *ngIf="(auth.hasRole('MEMBER') | async)" |
61 |
| - routerLinkActive #rla6="routerLinkActive" [active]="rla6.isActive"> |
62 |
| - Personal |
63 |
| - </a> |
64 |
| - <a mat-tab-link [routerLink]="'/admin'" *ngIf="(auth.hasRole('ADMIN') | async)" |
65 |
| - routerLinkActive #rla7="routerLinkActive" [active]="rla7.isActive"> |
66 |
| - Admin |
67 |
| - </a> |
68 |
| - <a mat-tab-link [routerLink]="'/developer'" *ngIf="(auth.hasRole('ADMIN') | async)" |
69 |
| - routerLinkActive #rla8="routerLinkActive" [active]="rla8.isActive"> |
70 |
| - Developer |
71 |
| - </a> |
72 | 69 | </nav>
|
73 | 70 | <router-outlet></router-outlet>
|
74 | 71 | </ng-template>
|
|
0 commit comments