Added user name on navigation bar after login, removed default lower

tab.
This commit is contained in:
Maria Teresa Paratore 2024-01-11 09:44:23 +01:00
parent cf60efd67d
commit 93d9751c42
4 changed files with 13 additions and 17 deletions

View File

@ -1,10 +1,6 @@
<div class="row" id="generalContainer">
<div [ngSwitch]="account !== null">
<div *ngSwitchCase="true">
<div class="alert alert-success">
<h3 id="home-logged-message" *ngIf="account">You are logged in as user "{{account.login}}"</h3>
</div>
<div *ngIf="isLoading" class="loader-container">
<mat-spinner mode="indeterminate" style="top: 50%; left: 50%;"></mat-spinner>
</div>
@ -33,7 +29,7 @@
<mat-form-field id="pathfield" [style.width.px]="400" class="form-field">
<mat-select placeholder="Available Contexts" formControlName="pathfield" (valueChange)="setNewContext($event)">
<mat-select placeholder="Available Contexts" formControlName="pathfield" (valueChange)="setNewContext($event)">
<mat-select-filter [placeholder]="'filter by name'" [displayMember]="'path'" [array]="allCtxs" (filteredReturn)="filteredContexts =$event"></mat-select-filter>
<mat-option *ngFor="let item of filteredContexts" [value]="item">
{{item.path}}

View File

@ -140,16 +140,13 @@
[routerLinkActiveOptions]="{ exact: true }">
<a class="nav-link dropdown-toggle" ngbDropdownToggle href="javascript:void(0);" id="account-menu"
data-cy="accountMenu">
<span *ngIf="!account?.imageUrl">
<span [ngSwitch]="account !== null">
<fa-icon icon="user"></fa-icon>
<span>Account bla</span>
</span>
<!--
<div [ngSwitch]="account !== null">
<div *ngSwitchCase="true">
-->
<span *ngIf="account?.imageUrl">
<img [src]="account!.imageUrl" class="profile-image rounded-circle" alt="Avatar" />
<span *ngSwitchCase="false">Account</span>
<span *ngSwitchCase="true">
<span *ngIf="account">{{account.login}}</span>
</span>
</span>
</a>
<ul class="dropdown-menu" ngbDropdownMenu aria-labelledby="account-menu">

View File

@ -85,11 +85,10 @@
</button>
</ng-template>
<!-- tab close-->
<div *ngIf="tab.title !== 'JSON View'; else mainTabMsg">
<div *ngIf="tab.title !== 'JSON View'; else defaultTab">
<jhi-rawjson-pane [chosenId]="tab.id" [resourceType]="resourceType" ></jhi-rawjson-pane>
</div>
<ng-template #mainTabMsg>
<h2>JSON raw data will show here</h2>
<ng-template #defaultTab>
</ng-template>
</mat-tab>
</ng-container>

View File

@ -45,3 +45,7 @@ td.mat-row {
font-weight: bold;
}
::ng-deep .mat-tab-labels > .mat-tab-label:first-child {
display: none;
}