diff --git a/src/app/app-root/login/login.component.html b/src/app/app-root/login/login.component.html index 33fbf0b85e0f477a6596cb78e857fac203a658c2..e691a33153a1601b2f22063e5bfa9a84e9a17318 100644 --- a/src/app/app-root/login/login.component.html +++ b/src/app/app-root/login/login.component.html @@ -16,6 +16,7 @@ </form> <p style="color: chocolate"><b>{{ problemText }}</b></p> <p style="color: chocolate" *ngIf="!mds.isApiValid"><b>Die Verbindung mit dem Server ist nicht möglich.</b></p> + <alert *ngIf="systemAnnouncement !== '-'" level="warning" [text]="systemAnnouncement"></alert> </mat-card> <mat-card fxFlex="0 0 400px" class="mat-card-gray"> diff --git a/src/app/app-root/login/login.component.ts b/src/app/app-root/login/login.component.ts index ed97e07b273d68163a4feecb1d9276673f8599e6..254ff3afe649f20ecf39da701c847266576ab792 100644 --- a/src/app/app-root/login/login.component.ts +++ b/src/app/app-root/login/login.component.ts @@ -26,6 +26,8 @@ export class LoginComponent implements OnInit, OnDestroy { pw: new FormControl('') }); + systemAnnouncement: string; + constructor( public mds: MainDataService, public cts: CustomtextService, @@ -39,6 +41,9 @@ export class LoginComponent implements OnInit, OnDestroy { this.routingSubscription = this.route.params.subscribe(params => { this.returnTo = params.returnTo; }); + setTimeout(() => { // the timeout is avery temporary fix.- after upgrading to iqb-components 3, it can be removed + this.systemAnnouncement = this.cts.getCustomText('system_announcement', '-'); + }, 500); } login(): void { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7ded18c45bc7f1d040c8d2b4c745e88993baa22b..33454caa87f076042c9b075d33dc3b79e047690e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -37,6 +37,7 @@ import { StatusCardComponent } from './app-root/status-card/status-card.componen import { TestStarterComponent } from './app-root/test-starter/test-starter.component'; import { MonitorStarterComponent } from './app-root/monitor-starter/monitor-starter.component'; import { PrivacyComponent } from './app-root/privacy/privacy.component'; +import { AlertModule } from './shared/alert/alert.module'; @NgModule({ declarations: [ @@ -76,7 +77,8 @@ import { PrivacyComponent } from './app-root/privacy/privacy.component'; HttpClientModule, RouterModule, AppRoutingModule, - IqbComponentsModule.forRoot() + IqbComponentsModule.forRoot(), + AlertModule ], providers: [ BackendService,