45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import { Component } from '@angular/core';
|
|
import {properties} from "../environments/environment";
|
|
import {ActivatedRoute, Router} from "@angular/router";
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
template: `
|
|
<div *ngIf="loading">
|
|
<loading [full]="true"></loading>
|
|
</div>
|
|
<div *ngIf="!loading">
|
|
<div>
|
|
<div id="modal-container"></div>
|
|
<navbar *ngIf="hasHeader" portal="irish_monitor"></navbar>
|
|
<div>
|
|
<main>
|
|
<router-outlet></router-outlet>
|
|
</main>
|
|
<bottom id="bottom" [centered]="true" [properties]="properties" [showMenuItems]="true"></bottom>
|
|
</div>
|
|
<div *ngIf="view" class="preview uk-text-small uk-flex uk-flex-middle">
|
|
<span>You are currently in a <span class="uk-text-bold">"Preview"</span> mode. <span class="uk-visible@m"><a (click)="removeView()">The current view</a> of this dashboard may differ.</span></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`,
|
|
styles: []
|
|
})
|
|
export class AppComponent {
|
|
title = 'irish-monitor';
|
|
loading: boolean = false;
|
|
isFrontPage: boolean = false;
|
|
view: boolean = false;
|
|
hasHeader: boolean = false;
|
|
properties = properties;
|
|
|
|
constructor(private route: ActivatedRoute,
|
|
private router: Router,) {
|
|
}
|
|
|
|
public removeView() {
|
|
this.router.navigate([], {relativeTo: this.route});
|
|
}
|
|
}
|