Layout changes finally work from backend commands

This commit is contained in:
Gabor PEK
2018-04-20 09:26:36 +02:00
committed by Kristóf Tóth
parent a0d5dfdddc
commit f0717eb235
7 changed files with 17 additions and 9 deletions

View File

@ -1,4 +1,4 @@
<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 class="active" src="images/{{layoutIter}}_active.svg"></div>
<div *ngIf="layout !== layoutIter"><img src="images/{{layoutIter}}.svg"></div>
</div>

View File

@ -8,7 +8,9 @@ img {
}
.tfw-ide-pin {
cursor: pointer;
& .active {
box-shadow: 0 4px 8px 0 rgba($tao-blue-500, 0.1), 0 4px 10px 0 rgba($tao-blue-500, 0.09);
}
}

View File

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { config } from '../config';
@Component({
@ -8,9 +8,10 @@ import { config } from '../config';
})
export class SidebarComponent implements OnInit {
layout: string = config.dashboard.currentLayout;
@Input() layout: string;
enabledLayouts: Set<string> = config.dashboard.enabledLayouts;
constructor() {}
ngOnInit() {
}
}