feat: Informationskomponente initialisiert und als Dialog zum Navigations-Button hinzugefügt

- Die Informationskomponente wurde initialisiert.
- Die Informationskomponente wurde dem Navigations-Button für Informationen als Dialog hinzugefügt.
This commit is contained in:
Developer 02 2024-08-12 13:58:34 +02:00
parent 4644407ca3
commit d26fd87367
6 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InfoComponent } from './info.component';
describe('InfoComponent', () => {
let component: InfoComponent;
let fixture: ComponentFixture<InfoComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [InfoComponent]
})
.compileComponents();
fixture = TestBed.createComponent(InfoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,12 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-info',
standalone: true,
imports: [],
templateUrl: './info.component.html',
styleUrl: './info.component.scss'
})
export class InfoComponent {
}

View File

@ -43,7 +43,7 @@
<button *ngIf="isLogedIn()" class="btn" (click)="refreshService.executeAll()" [ngStyle]="{ 'visibility': refreshService.isVisible ? 'visible' : 'hidden' }">
<mat-icon class="turn-360">sync</mat-icon>
</button>
<button *ngIf="isLogedIn()" class="btn">
<button *ngIf="isLogedIn()" class="btn" (click)="showInfo()">
<mat-icon class="scale-pulse">contact_support</mat-icon>
</button>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse"

View File

@ -11,10 +11,9 @@ import { CreationService } from '../../services/button/creation.service';
import { UpdateService, UpdateEvent } from '../../services/button/update.service';
import { TransferService } from '../../services/button/transfer.service';
import { MatBadgeModule } from '@angular/material/badge';
import {
MatSlideToggleModule,
} from '@angular/material/slide-toggle';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { FormsModule } from '@angular/forms';
import { InfoComponent } from '../info/info.component'
@Component({
standalone: true,
@ -68,4 +67,8 @@ export class NavMenuComponent {
});
}
}
showInfo() {
this.dialog.open(InfoComponent)
}
}