fix: behebe ExpressionChangedAfterItHasBeenCheckedError bei Nav-Bar-Buttons
- Ersetze dynamisches `[matTooltipClass]="tooltipClass"` durch statisches `matTooltipClass="pt-3"`, um den Fehler `ExpressionChangedAfterItHasBeenCheckedError` zu beheben.
This commit is contained in:
parent
3f7a60f04d
commit
c8ca3abebe
@ -30,19 +30,19 @@
|
||||
<!-- Right menu -->
|
||||
<div class="navbar-collapse justify-content-end me-5">
|
||||
<a class="navbar-brand" [routerLink]="['/']">User Manager Portal</a>
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="this.updateService.toggleEditability()" [ngStyle]="{ 'visibility': updateService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + L" matTooltipPosition="below" [matTooltipClass]="tooltipClass" [matTooltipDisabled]="!updateService.isVisible">
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="this.updateService.toggleEditability()" [ngStyle]="{ 'visibility': updateService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + L" matTooltipPosition="below" [matTooltipDisabled]="!updateService.isVisible">
|
||||
<mat-icon class="scale-pulse">{{ updateService.isEditable ? 'lock_open' : 'lock' }}</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="updateService.executeAll()" [ngStyle]="{ 'visibility': updateService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + S" matTooltipPosition="below" [matTooltipClass]="tooltipClass" [matTooltipDisabled]="!updateService.isVisible">
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="updateService.executeAll()" [ngStyle]="{ 'visibility': updateService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + S" matTooltipPosition="below" matTooltipClass="pt-3" [matTooltipDisabled]="!updateService.isVisible">
|
||||
<mat-icon class="scale-pulse" [matBadge]="updateActCount === 0 ? '' : updateActCount">save</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="creationService.openDialog()" [ngStyle]="{ 'visibility': creationService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + C" matTooltipPosition="below" [matTooltipClass]="tooltipClass" [matTooltipDisabled]="!creationService.isVisible">
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="creationService.openDialog()" [ngStyle]="{ 'visibility': creationService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + C" matTooltipPosition="below" [matTooltipDisabled]="!creationService.isVisible">
|
||||
<mat-icon class="scale-pulse">add_to_photos</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="transferService.executeAll()" [ngStyle]="{ 'visibility': transferService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + ␣" matTooltipPosition="below" [matTooltipClass]="tooltipClass" [matTooltipDisabled]="!transferService.isVisible">
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="transferService.executeAll()" [ngStyle]="{ 'visibility': transferService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + ␣" matTooltipPosition="below" matTooltipClass="pt-3" [matTooltipDisabled]="!transferService.isVisible">
|
||||
<mat-icon class="move-left-right">swap_horiz</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="refreshService.executeAll()" [ngStyle]="{ 'visibility': refreshService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + R" matTooltipPosition="below" [matTooltipClass]="tooltipClass" [matTooltipDisabled]="!refreshService.isVisible">
|
||||
<button *ngIf="isLogedIn()" class="btn" (click)="refreshService.executeAll()" [ngStyle]="{ 'visibility': refreshService.isVisible ? 'visible' : 'hidden' }" matTooltip="strg + R" matTooltipPosition="below" [matTooltipDisabled]="!refreshService.isVisible">
|
||||
<mat-icon class="turn-360">sync</mat-icon>
|
||||
</button>
|
||||
<button *ngIf="isLogedIn()" [ngStyle]="{ 'visibility': buttonVisibilityService.anyVisible ? 'visible' : 'hidden' }" class="btn" (click)="showInfo()">
|
||||
|
||||
@ -74,11 +74,6 @@ export class NavMenuComponent {
|
||||
@ViewChildren(MatTooltip) tooltips: QueryList<MatTooltip> | undefined;
|
||||
|
||||
private __tooltip_timeout_set = false;
|
||||
private __shift_tooltip: boolean = true;
|
||||
get tooltipClass() {
|
||||
this.__shift_tooltip = !this.__shift_tooltip;
|
||||
return this.__shift_tooltip ? "pt-3" : "";
|
||||
}
|
||||
|
||||
showInfo() {
|
||||
this.tooltips?.forEach(t => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user