mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 12:12:55 +00:00 
			
		
		
		
	Make iframe toggleable
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user