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

@ -51,10 +51,10 @@
padding-top: $hair;
background-color: $tao-gray-50;
overflow-y: scroll;
max-height: 55vmin;
max-height: 95vmin;
div[class*="web"] & {
max-height: 95vmin;
div[class="terminal-ide-web"] & {
max-height: 55vmin;
}
}
@ -63,13 +63,14 @@
}
.tfw-sidebar {
background-color: $tao-turqoise-300;
background-color: $tao-gray-100;
display: flex;
flex-direction: column;
justify-content: space-between;
column-gap: 15px;
align-items: center;
padding-top: 75px;
border-left: 1px solid $tao-plum-500;
box-shadow: -15px -5px 19px -11px rgba(0,0,0,0.75);
z-index: 999;
}

View File

@ -13,7 +13,8 @@ import { config } from '../config';
export class DashboardComponent implements OnInit, OnDestroy {
deploying = false;
deploymentNotificationSubscription: Subscription;
layout: string = config.dashboard.defaultLayout ;
enabledLayouts: Set<string> = config.dashboard.enabledLayouts;
layout: string = config.dashboard.currentLayout ;
command_handlers = {'layout': this.layoutHandler.bind(this)};
constructor(private deploymentNotificationService: DeploymentNotificationService,
@ -32,7 +33,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
}
layoutHandler(data: LayoutCommand) {
if (data.layout.match('terminal-ide-vertical|terminal-only|hraw|default-open|default-closed')) {
if (data.layout in (this.enabledLayouts)) {
this.layout = data.layout;
}
else {