This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 5ce68120 authored by Michael Breu's avatar Michael Breu
Browse files

Reviving Messages

parent d37fc78c
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -17,6 +17,9 @@
</div>
<div class="pagewrapper"></div>
<div *ngFor="let m of getActiveMessages()">
<div class="alert alert-warning">{{m.message}}</div>
</div>
<!-- Main content -->
<router-outlet></router-outlet>
......
......@@ -7,6 +7,7 @@ import dayjs from 'dayjs/esm';
import { AccountService } from 'app/core/auth/account.service';
import { AuthServerProvider } from 'app/core/auth/auth-jwt.service';
import { CookieService } from 'ngx-cookie-service';
import { MessageService, BroadCastMessage } from 'app/shared/service/message-service';
@Component({
selector: 'jhi-main',
......@@ -22,6 +23,7 @@ export class MainComponent implements OnInit {
private translateService: TranslateService,
private cookieService: CookieService,
private authServerProvider: AuthServerProvider,
private messageService: MessageService,
rootRenderer: RendererFactory2
) {
this.renderer = rootRenderer.createRenderer(document.querySelector('html'), null);
......@@ -60,6 +62,11 @@ export class MainComponent implements OnInit {
);
}
}
public getActiveMessages(): Array<BroadCastMessage> {
return this.messageService.getActiveMessages(); //
}
private getPageTitle(routeSnapshot: ActivatedRouteSnapshot): string {
const title: string = routeSnapshot.data['pageTitle'] ?? '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment