Add barebones console option

This commit is contained in:
Kristóf Tóth 2018-05-25 13:33:37 +02:00
parent 58cc7d1889
commit 8fb0fc7cfc
7 changed files with 32 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import { AppRoutingModule } from './app-routing.module';
import { TestmessengerComponent } from './testmessenger/testmessenger.component';
import { DeploymentNotificationService } from './services/deployment-notification.service';
import { SafePipe } from './pipes/safe.pipe';
import { ConsoleComponent } from './console/console.component';
@NgModule({
@ -39,7 +40,8 @@ import { SafePipe } from './pipes/safe.pipe';
TerminalComponent,
DashboardComponent,
TestmessengerComponent,
SafePipe
SafePipe,
ConsoleComponent
],
imports: [
BrowserModule,

View File

@ -5,6 +5,7 @@ export const config = {
documentTitle: 'Avatao Tutorials',
dashboard: {
route: 'dashboard',
terminalOrConsole: 'terminal',
currentLayout: 'terminal-ide-web',
enabledLayouts: [
'terminal-ide-web',

View File

@ -0,0 +1 @@
<textarea class="tfw-console"></textarea>

View File

@ -0,0 +1,9 @@
.tfw-console {
resize: none;
height: 100%;
width: 100%;
background-color: black;
border: 1px solid black;
color: white;
padding: 8px;
}

View File

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-console',
templateUrl: './console.component.html',
styleUrls: ['./console.component.scss']
})
export class ConsoleComponent implements OnInit {
constructor() {}
ngOnInit() {}
}

View File

@ -21,7 +21,8 @@
<app-ide></app-ide>
</div>
<div class="tfw-terminal">
<app-terminal></app-terminal>
<app-terminal *ngIf="terminalOrConsole === 'terminal'"></app-terminal>
<app-console *ngIf="terminalOrConsole === 'console'"></app-console>
</div>
<div class="tfw-sidebar">
<app-sidebar (layoutChanged)="setLayout($event)" [layout]="layout"></app-sidebar>

View File

@ -20,6 +20,8 @@ export class DashboardComponent implements OnInit, OnDestroy {
hide_messages: boolean = config.dashboard.hide_messages;
iframeUrl: string = config.dashboard.iframeUrl;
@ViewChild('webiframe') webiframe: ElementRef;
terminalOrConsole = config.dashboard.terminalOrConsole;
command_handlers = {'layout': this.layoutHandler.bind(this),
'reload_frontend': this.reloadFrontendHandlder.bind(this)};