All the enabled layouts are now enlisted on the sidebar in accordance with config.ts

This commit is contained in:
Gabor PEK
2018-04-20 09:22:23 +02:00
committed by Kristóf Tóth
parent 959a0df3d6
commit a0d5dfdddc
22 changed files with 48 additions and 23 deletions

View File

@ -1,4 +1,4 @@
<div class="tfw-ide-pin">
<img src="images/IDE.svg">
<img class="active" src="images/IDE_active.svg">
<div class="tfw-ide-pin" *ngFor="let layoutIter of enabledLayouts">
<div *ngIf="layout === layoutIter"><img src="images/{{layoutIter}}_active.svg"></div>
<div *ngIf="layout !== layoutIter"><img src="images/{{layoutIter}}.svg"></div>
</div>

View File

@ -4,13 +4,11 @@
img {
width: 50px;
height: auto;
padding-top: 75px;
}
.tfw-ide-pin {
cursor: pointer;
& .active {
display: none;
}
}

View File

@ -1,15 +1,16 @@
import { Component, OnInit } from '@angular/core';
import { config } from '../config';
@Component({
selector: 'app-sidebar',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.scss']
})
export class SidebarComponent implements OnInit {
constructor() { }
layout: string = config.dashboard.currentLayout;
enabledLayouts: Set<string> = config.dashboard.enabledLayouts;
constructor() {}
ngOnInit() {
}
}