diff --git a/src/app/app.component.html b/src/app/app.component.html index d6c7861..0680b43 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,11 +1 @@ - -
-
-
-
-
-
-
-
-
-
+ diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 9d68c22..e69de29 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -1,5 +0,0 @@ -.tfw-first-row { - height: 40vh; -} - -.tfw-second-row {} diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 420842d..761194e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,4 @@ import { Component, OnInit } from '@angular/core'; -import { WebSocketService } from './websocket.service'; -import { FSMUpdateService } from './fsmupdate.service'; @Component({ selector: 'app-root', @@ -8,11 +6,6 @@ import { FSMUpdateService } from './fsmupdate.service'; styleUrls: ['./app.component.scss'] }) export class AppComponent implements OnInit { - constructor(private webSocketService: WebSocketService, private fsmUpdateService: FSMUpdateService) {} - - ngOnInit() { - this.webSocketService.connect(); - this.webSocketService.send('reset', ''); - this.fsmUpdateService.init(); - } + constructor() {} + ngOnInit() {} } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d84778d..c66e85b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,6 +7,7 @@ import { AceEditorModule } from 'ng2-ace-editor'; import { AppComponent } from './app.component'; +import { DashboardComponent } from './dashboard/dashboard.component'; import { HeaderComponent } from './header/header.component'; import { LoginComponent } from './login/login.component'; import { MarkdownService } from './markdown.service'; @@ -16,6 +17,7 @@ import { MessagesComponent } from './messages/messages.component'; import { WebSocketService } from './websocket.service'; import { TerminalComponent } from './terminal/terminal.component'; import { FSMUpdateService } from './fsmupdate.service'; +import { AppRoutingModule } from './app-routing.module'; @NgModule({ @@ -25,7 +27,8 @@ import { FSMUpdateService } from './fsmupdate.service'; LoginComponent, WebideComponent, MessagesComponent, - TerminalComponent + TerminalComponent, + DashboardComponent ], imports: [ BrowserModule, @@ -33,6 +36,7 @@ import { FSMUpdateService } from './fsmupdate.service'; HttpClientModule, NgbModule.forRoot(), AceEditorModule, + AppRoutingModule, ], providers: [ MarkdownService, diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html new file mode 100644 index 0000000..d6c7861 --- /dev/null +++ b/src/app/dashboard/dashboard.component.html @@ -0,0 +1,11 @@ + +
+
+
+
+
+
+
+
+
+
diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss new file mode 100644 index 0000000..9d68c22 --- /dev/null +++ b/src/app/dashboard/dashboard.component.scss @@ -0,0 +1,5 @@ +.tfw-first-row { + height: 40vh; +} + +.tfw-second-row {} diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts new file mode 100644 index 0000000..389f8e1 --- /dev/null +++ b/src/app/dashboard/dashboard.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit } from '@angular/core'; +import { WebSocketService } from '../websocket.service'; +import { FSMUpdateService } from '../fsmupdate.service'; + +@Component({ + selector: 'app-dashboard', + templateUrl: './dashboard.component.html', + styleUrls: ['./dashboard.component.scss'] +}) +export class DashboardComponent implements OnInit { + constructor(private webSocketService: WebSocketService, private fsmUpdateService: FSMUpdateService) {} + + ngOnInit() { + this.webSocketService.connect(); + this.webSocketService.send('reset', ''); + this.fsmUpdateService.init(); + } +} diff --git a/src/app/webide/webide.component.ts b/src/app/webide/webide.component.ts index 07f7f6e..d0f8670 100644 --- a/src/app/webide/webide.component.ts +++ b/src/app/webide/webide.component.ts @@ -41,6 +41,8 @@ export class WebideComponent implements OnInit { private changeDetectorRef: ChangeDetectorRef) { } ngOnInit() { + this.webSocketService.connect(); + this.webSocketService.send('reset', ''); this.subscribeWS(); this.requestCode(); }