2017-10-04 10:30:15 +02:00
|
|
|
import { Component, Inject } from '@angular/core';
|
2017-10-16 17:16:14 +02:00
|
|
|
import { MatDialog, MAT_DIALOG_DATA, MatDialogConfig } from '@angular/material';
|
2017-10-04 10:30:15 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-extension-dialog',
|
|
|
|
template: `
|
|
|
|
<div *ngIf="installView">
|
2017-10-16 17:16:14 +02:00
|
|
|
<h2 mat-dialog-title>Install extension</h2>
|
|
|
|
<mat-dialog-content>An extension is needed to share your screen!</mat-dialog-content>
|
|
|
|
<mat-dialog-actions>
|
|
|
|
<button mat-button mat-dialog-close>CANCEL</button>
|
|
|
|
<button mat-button (click)="goToExtension()">INSTALL</button>
|
|
|
|
</mat-dialog-actions>
|
2017-10-04 10:30:15 +02:00
|
|
|
</div>
|
|
|
|
<div *ngIf="!installView" style="text-align: center">
|
2017-10-16 17:16:14 +02:00
|
|
|
<button mat-button (click)="reloadPage()">RELOAD PAGE<br>AFTER INSTALLED</button>
|
2017-10-04 10:30:15 +02:00
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
export class ExtensionDialogComponent {
|
|
|
|
|
|
|
|
installView = true;
|
|
|
|
|
2017-10-16 17:16:14 +02:00
|
|
|
constructor(public dialog: MatDialog, @Inject(MAT_DIALOG_DATA) public data: any) { }
|
2017-10-04 10:30:15 +02:00
|
|
|
|
|
|
|
goToExtension() {
|
|
|
|
window.open(this.data.url, '_blank');
|
|
|
|
this.installView = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
reloadPage() {
|
|
|
|
window.location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|