mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:31:33 +00:00
Make iframe toggleable
This commit is contained in:
parent
48a8facd50
commit
c07538dc13
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="tfw-web tao-grid-top-left"
|
||||
[ngClass]="{'deploy-blur': deploying || polling}">
|
||||
<div class="iframe-container">
|
||||
<div *ngIf="iframeUrl | async" class="iframe-container">
|
||||
<div *ngIf="showUrlBar | async" class="urlbar-container">
|
||||
<button class="refresh btn btn-sm rounded-circle" (click)="reloadIframe()">↻</button>
|
||||
<input type="text"
|
||||
|
@ -115,15 +115,15 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.terminalMenuItem.next(item);
|
||||
}
|
||||
|
||||
scrollMessagesToBottom(): void {
|
||||
scrollMessagesToBottom() {
|
||||
const element = this.messages.nativeElement;
|
||||
// This must be done in the Angular event loop to avoid messing up
|
||||
// change detection (not in the template like ConsoleComponent does)
|
||||
element.scrollTop = element.scrollHeight;
|
||||
}
|
||||
|
||||
iframeLoad(): void {
|
||||
if (this.webiframe) {
|
||||
iframeLoad() {
|
||||
if (this.webiframe && this.iframeUrl.value) {
|
||||
const href = this.webiframe.nativeElement.contentWindow.frames.location.href;
|
||||
const niceURL = href.match(/.*?\/\/.*?(\/.*)/)[1];
|
||||
this.actualIframeUrl = niceURL;
|
||||
|
Loading…
Reference in New Issue
Block a user