Make whole frontend dynamically configurable to avoid rebuilds

This commit is contained in:
Kristóf Tóth
2019-08-28 10:19:14 +02:00
parent 41eebc60f6
commit a88415bad1
17 changed files with 187 additions and 207 deletions

View File

@ -1,18 +1,17 @@
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { config } from '../config';
import { DashboardConfigService } from '../services/config.service';
@Component({
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.scss']
})
export class SidebarComponent {
@Input() layout: string;
@Output() layoutChanged = new EventEmitter<string>();
enabledLayouts: string[] = config.dashboard.enabledLayouts;
enabledLayouts = this.configService.enabledLayouts;
constructor() {}
constructor(private configService: DashboardConfigService) {}
setLayout(layout: string) {
this.layout = layout;