mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 12:22:54 +00:00 
			
		
		
		
	Fix config variable not being JSON
This commit is contained in:
		@@ -2,7 +2,7 @@ export const config = {
 | 
				
			|||||||
  dashboard: {
 | 
					  dashboard: {
 | 
				
			||||||
    route: 'dashboard',
 | 
					    route: 'dashboard',
 | 
				
			||||||
    currentLayout: 'terminal-ide-web',
 | 
					    currentLayout: 'terminal-ide-web',
 | 
				
			||||||
    enabledLayouts:  new Set([
 | 
					    enabledLayouts: [
 | 
				
			||||||
      'terminal-ide-web',
 | 
					      'terminal-ide-web',
 | 
				
			||||||
      'terminal-ide-vertical',
 | 
					      'terminal-ide-vertical',
 | 
				
			||||||
      'terminal-ide-horizontal',
 | 
					      'terminal-ide-horizontal',
 | 
				
			||||||
@@ -11,8 +11,8 @@ export const config = {
 | 
				
			|||||||
      'ide-web-vertical',
 | 
					      'ide-web-vertical',
 | 
				
			||||||
      'ide-only',
 | 
					      'ide-only',
 | 
				
			||||||
      'web-only'
 | 
					      'web-only'
 | 
				
			||||||
      ]),
 | 
					      ],
 | 
				
			||||||
    allLayouts:  new Set([
 | 
					    allLayouts: [
 | 
				
			||||||
      'terminal-ide-web',
 | 
					      'terminal-ide-web',
 | 
				
			||||||
      'terminal-ide-vertical',
 | 
					      'terminal-ide-vertical',
 | 
				
			||||||
      'terminal-ide-horizontal',
 | 
					      'terminal-ide-horizontal',
 | 
				
			||||||
@@ -21,7 +21,7 @@ export const config = {
 | 
				
			|||||||
      'ide-web-vertical',
 | 
					      'ide-web-vertical',
 | 
				
			||||||
      'ide-only',
 | 
					      'ide-only',
 | 
				
			||||||
      'web-only'
 | 
					      'web-only'
 | 
				
			||||||
    ]),
 | 
					    ],
 | 
				
			||||||
    hide_messages: false
 | 
					    hide_messages: false
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  ide: {
 | 
					  ide: {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,6 @@ import { SidebarComponent } from '../sidebar/sidebar.component';
 | 
				
			|||||||
export class DashboardComponent implements OnInit, OnDestroy {
 | 
					export class DashboardComponent implements OnInit, OnDestroy {
 | 
				
			||||||
  deploying = false;
 | 
					  deploying = false;
 | 
				
			||||||
  deploymentNotificationSubscription: Subscription;
 | 
					  deploymentNotificationSubscription: Subscription;
 | 
				
			||||||
  enabledLayouts: Set<string> = config.dashboard.enabledLayouts;
 | 
					 | 
				
			||||||
  layout: string = config.dashboard.currentLayout;
 | 
					  layout: string = config.dashboard.currentLayout;
 | 
				
			||||||
  hide_messages: boolean = config.dashboard.hide_messages;
 | 
					  hide_messages: boolean = config.dashboard.hide_messages;
 | 
				
			||||||
  command_handlers = {'layout': this.layoutHandler.bind(this)};
 | 
					  command_handlers = {'layout': this.layoutHandler.bind(this)};
 | 
				
			||||||
@@ -35,7 +34,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  layoutHandler(data: LayoutCommand) {
 | 
					  layoutHandler(data: LayoutCommand) {
 | 
				
			||||||
    if (this.enabledLayouts.has(data.layout)) {
 | 
					    if (config.dashboard.enabledLayouts.includes(data.layout)) {
 | 
				
			||||||
      this.setLayout(data.layout);
 | 
					      this.setLayout(data.layout);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else {
 | 
					    else {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user