mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 10:16:22 +00:00
All the enabled layouts are now enlisted on the sidebar in accordance with config.ts
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user