mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Add barebones console option
This commit is contained in:
parent
58cc7d1889
commit
8fb0fc7cfc
@ -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,
|
||||
|
@ -5,6 +5,7 @@ export const config = {
|
||||
documentTitle: 'Avatao Tutorials',
|
||||
dashboard: {
|
||||
route: 'dashboard',
|
||||
terminalOrConsole: 'terminal',
|
||||
currentLayout: 'terminal-ide-web',
|
||||
enabledLayouts: [
|
||||
'terminal-ide-web',
|
||||
|
1
src/app/console/console.component.html
Normal file
1
src/app/console/console.component.html
Normal file
@ -0,0 +1 @@
|
||||
<textarea class="tfw-console"></textarea>
|
9
src/app/console/console.component.scss
Normal file
9
src/app/console/console.component.scss
Normal file
@ -0,0 +1,9 @@
|
||||
.tfw-console {
|
||||
resize: none;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
border: 1px solid black;
|
||||
color: white;
|
||||
padding: 8px;
|
||||
}
|
14
src/app/console/console.component.ts
Normal file
14
src/app/console/console.component.ts
Normal 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() {}
|
||||
|
||||
}
|
@ -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>
|
||||
|
@ -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)};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user