From 5c0b1dbd1bc5fc0f8d25eb9b31981e8b8dc01386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Apr 2018 14:36:06 +0200 Subject: [PATCH] Implement changing messaging visibility from API --- src/app/dashboard/dashboard.component.ts | 6 ++++-- src/app/dashboard/layout-command.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index d8c11ab..0533b46 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -36,10 +36,12 @@ export class DashboardComponent implements OnInit, OnDestroy { layoutHandler(data: LayoutCommand) { if (config.dashboard.enabledLayouts.includes(data.layout)) { this.setLayout(data.layout); - } - else { + } else { console.log('Invalid ide layout "' + data.layout + '" received!'); } + if (data.hide_messages != undefined) { + this.hide_messages = data.hide_messages; + } } setLayout(layout: string) { diff --git a/src/app/dashboard/layout-command.ts b/src/app/dashboard/layout-command.ts index 3d58db2..87aa41e 100644 --- a/src/app/dashboard/layout-command.ts +++ b/src/app/dashboard/layout-command.ts @@ -1,4 +1,5 @@ export class LayoutCommand { command: string; layout: string; + hide_messages?: boolean; }