From 77e18f43e3378928e430ed6e7b4e0856b906ea74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Apr 2018 14:10:57 +0200 Subject: [PATCH] Fix config variable not being JSON --- src/app/config.ts | 8 ++++---- src/app/dashboard/dashboard.component.ts | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/config.ts b/src/app/config.ts index d641d53..45b6179 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -2,7 +2,7 @@ export const config = { dashboard: { route: 'dashboard', currentLayout: 'terminal-ide-web', - enabledLayouts: new Set([ + enabledLayouts: [ 'terminal-ide-web', 'terminal-ide-vertical', 'terminal-ide-horizontal', @@ -11,8 +11,8 @@ export const config = { 'ide-web-vertical', 'ide-only', 'web-only' - ]), - allLayouts: new Set([ + ], + allLayouts: [ 'terminal-ide-web', 'terminal-ide-vertical', 'terminal-ide-horizontal', @@ -21,7 +21,7 @@ export const config = { 'ide-web-vertical', 'ide-only', 'web-only' - ]), + ], hide_messages: false }, ide: { diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index d96e6da..d8c11ab 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -14,7 +14,6 @@ import { SidebarComponent } from '../sidebar/sidebar.component'; export class DashboardComponent implements OnInit, OnDestroy { deploying = false; deploymentNotificationSubscription: Subscription; - enabledLayouts: Set = config.dashboard.enabledLayouts; layout: string = config.dashboard.currentLayout; hide_messages: boolean = config.dashboard.hide_messages; command_handlers = {'layout': this.layoutHandler.bind(this)}; @@ -35,7 +34,7 @@ export class DashboardComponent implements OnInit, OnDestroy { } layoutHandler(data: LayoutCommand) { - if (this.enabledLayouts.has(data.layout)) { + if (config.dashboard.enabledLayouts.includes(data.layout)) { this.setLayout(data.layout); } else {