From adff2c5e1be17c1f4c86b0f595eb5b3a1d926f91 Mon Sep 17 00:00:00 2001 From: Gabor PEK Date: Mon, 12 Mar 2018 16:48:15 +0100 Subject: [PATCH] Use iframe webcomponent to allow more flexibility in terms of languages --- src/app/app.module.ts | 2 +- src/app/dashboard/dashboard.component.html | 6 +++++- src/app/dashboard/dashboard.component.scss | 19 ++++++++++++++++++- .../web.component.html} | 5 +++++ .../web.component.scss} | 0 .../web.component.ts} | 10 +++++----- src/app/{login/login.ts => web/web.ts} | 0 7 files changed, 34 insertions(+), 8 deletions(-) rename src/app/{login/login.component.html => web/web.component.html} (95%) rename src/app/{login/login.component.scss => web/web.component.scss} (100%) rename src/app/{login/login.component.ts => web/web.component.ts} (79%) rename src/app/{login/login.ts => web/web.ts} (100%) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d5d3e98..8b54ed8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -9,7 +9,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 {LoginComponent} from './web/web.component'; import {MarkdownService} from './services/markdown.service'; import {TerminadoService} from './services/terminado.service'; import {WebideComponent} from './webide/webide.component'; diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index 56499d4..a20d14b 100755 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -2,7 +2,11 @@
- +
+ +
diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss index 5e6dee3..a70ba70 100755 --- a/src/app/dashboard/dashboard.component.scss +++ b/src/app/dashboard/dashboard.component.scss @@ -86,7 +86,24 @@ $layout: ( } .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 { diff --git a/src/app/login/login.component.html b/src/app/web/web.component.html similarity index 95% rename from src/app/login/login.component.html rename to src/app/web/web.component.html index 75f908c..35be767 100644 --- a/src/app/login/login.component.html +++ b/src/app/web/web.component.html @@ -1,3 +1,4 @@ + +
+ +
diff --git a/src/app/login/login.component.scss b/src/app/web/web.component.scss similarity index 100% rename from src/app/login/login.component.scss rename to src/app/web/web.component.scss diff --git a/src/app/login/login.component.ts b/src/app/web/web.component.ts similarity index 79% rename from src/app/login/login.component.ts rename to src/app/web/web.component.ts index c50b681..393904c 100644 --- a/src/app/login/login.component.ts +++ b/src/app/web/web.component.ts @@ -1,14 +1,14 @@ import { HttpClient } from '@angular/common/http'; import {Component, OnDestroy, OnInit} from '@angular/core'; import { Observable } from 'rxjs/Observable'; -import { Login } from './login'; +import { Login } from './web'; import {DeploymentNotificationService} from '../services/deployment-notification.service'; import {Subscription} from 'rxjs/Subscription'; @Component({ - selector: 'app-login', - templateUrl: './login.component.html', - styleUrls: ['./login.component.scss'] + selector: 'app-web', + templateUrl: './web.component.html', + styleUrls: ['./web.component.scss'] }) export class LoginComponent { model = new Login('', ''); @@ -31,6 +31,6 @@ export class LoginComponent { } postLogin(login: Login): Observable { - return this.http.post('/login', login); + return this.http.post('/web', login); } } diff --git a/src/app/login/login.ts b/src/app/web/web.ts similarity index 100% rename from src/app/login/login.ts rename to src/app/web/web.ts