mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-10-31 04:42:55 +00:00 
			
		
		
		
	Use iframe webcomponent to allow more flexibility in terms of languages
This commit is contained in:
		| @@ -9,7 +9,7 @@ import {AceEditorModule} from 'ng2-ace-editor'; | |||||||
| import {AppComponent} from './app.component'; | import {AppComponent} from './app.component'; | ||||||
| import {DashboardComponent} from './dashboard/dashboard.component'; | import {DashboardComponent} from './dashboard/dashboard.component'; | ||||||
| import {HeaderComponent} from './header/header.component'; | import {HeaderComponent} from './header/header.component'; | ||||||
| import {LoginComponent} from './login/login.component'; | import {LoginComponent} from './web/web.component'; | ||||||
| import {MarkdownService} from './services/markdown.service'; | import {MarkdownService} from './services/markdown.service'; | ||||||
| import {TerminadoService} from './services/terminado.service'; | import {TerminadoService} from './services/terminado.service'; | ||||||
| import {WebideComponent} from './webide/webide.component'; | import {WebideComponent} from './webide/webide.component'; | ||||||
|   | |||||||
| @@ -2,7 +2,11 @@ | |||||||
|   <div class="tfw-header"><app-header></app-header></div> |   <div class="tfw-header"><app-header></app-header></div> | ||||||
|   <div class="tfw-messages"><app-messages></app-messages></div> |   <div class="tfw-messages"><app-messages></app-messages></div> | ||||||
|   <div class="tfw-web tao-grid-top-left" [ngClass]="{ 'deploy-blur': deploying }"> |   <div class="tfw-web tao-grid-top-left" [ngClass]="{ 'deploy-blur': deploying }"> | ||||||
|     <app-login></app-login> |     <div class="row-container"> | ||||||
|  |       <iframe class="iframe-row" | ||||||
|  |               scrolling="yes" frameborder="0" | ||||||
|  |               src="http://localhost:9999"></iframe> | ||||||
|  |     </div> | ||||||
|   </div> |   </div> | ||||||
|   <div class="tfw-webide"><app-webide></app-webide></div> |   <div class="tfw-webide"><app-webide></app-webide></div> | ||||||
|   <div class="tfw-terminal"><app-terminal></app-terminal></div> |   <div class="tfw-terminal"><app-terminal></app-terminal></div> | ||||||
|   | |||||||
| @@ -86,7 +86,24 @@ $layout: ( | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   .tfw-web { |   .tfw-web { | ||||||
|     padding: $space; |  | ||||||
|  |     .row-container { | ||||||
|  |       display: flex; | ||||||
|  |       width: 100%; | ||||||
|  |       height: 100%; | ||||||
|  |       flex-direction: column; | ||||||
|  |       min-height: 65vmin; | ||||||
|  |       min-width: 65vmin; | ||||||
|  |       overflow: hidden; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     .iframe-row { | ||||||
|  |       flex-grow: 1; | ||||||
|  |       border: none; | ||||||
|  |       margin: 0; | ||||||
|  |       padding: 0; | ||||||
|  |     } | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   .tfw-webide { |   .tfw-webide { | ||||||
|   | |||||||
| @@ -1,3 +1,4 @@ | |||||||
|  | <!-- | ||||||
| <div> | <div> | ||||||
|   <h1>Login page</h1> |   <h1>Login page</h1> | ||||||
|   <form #loginForm="ngForm" (submit)="onSubmit()" [hidden]="submitted"> |   <form #loginForm="ngForm" (submit)="onSubmit()" [hidden]="submitted"> | ||||||
| @@ -32,3 +33,7 @@ | |||||||
|     </p> |     </p> | ||||||
|   </div> |   </div> | ||||||
| </div> | </div> | ||||||
|  | --> | ||||||
|  | <div class="row-container"> | ||||||
|  | 
 | ||||||
|  | </div> | ||||||
| @@ -1,14 +1,14 @@ | |||||||
| import { HttpClient } from '@angular/common/http'; | import { HttpClient } from '@angular/common/http'; | ||||||
| import {Component, OnDestroy, OnInit} from '@angular/core'; | import {Component, OnDestroy, OnInit} from '@angular/core'; | ||||||
| import { Observable } from 'rxjs/Observable'; | import { Observable } from 'rxjs/Observable'; | ||||||
| import { Login } from './login'; | import { Login } from './web'; | ||||||
| import {DeploymentNotificationService} from '../services/deployment-notification.service'; | import {DeploymentNotificationService} from '../services/deployment-notification.service'; | ||||||
| import {Subscription} from 'rxjs/Subscription'; | import {Subscription} from 'rxjs/Subscription'; | ||||||
| 
 | 
 | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-login', |   selector: 'app-web', | ||||||
|   templateUrl: './login.component.html', |   templateUrl: './web.component.html', | ||||||
|   styleUrls: ['./login.component.scss'] |   styleUrls: ['./web.component.scss'] | ||||||
| }) | }) | ||||||
| export class LoginComponent { | export class LoginComponent { | ||||||
|   model = new Login('', ''); |   model = new Login('', ''); | ||||||
| @@ -31,6 +31,6 @@ export class LoginComponent { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   postLogin(login: Login): Observable<any> { |   postLogin(login: Login): Observable<any> { | ||||||
|     return this.http.post<Login>('/login', login); |     return this.http.post<Login>('/web', login); | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user