8 changed files with 102 additions and 2 deletions
@ -0,0 +1,26 @@ |
|||||
|
<div style="min-width: 800px;"> |
||||
|
<mat-toolbar color="primary"> |
||||
|
<h2><mat-icon>info_outline</mat-icon> |
||||
|
{{ 'edge.install-connect-instructions' | translate }}</h2> |
||||
|
<span fxFlex></span> |
||||
|
<button mat-button mat-icon-button |
||||
|
(click)="cancel()" |
||||
|
type="button"> |
||||
|
<mat-icon class="material-icons">close</mat-icon> |
||||
|
</button> |
||||
|
</mat-toolbar> |
||||
|
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> |
||||
|
</mat-progress-bar> |
||||
|
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> |
||||
|
<div mat-dialog-content> |
||||
|
<tb-markdown [data]="instructions" lineNumbers fallbackToPlainMarkdown></tb-markdown> |
||||
|
</div> |
||||
|
<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> |
||||
|
<button mat-button color="primary" |
||||
|
type="button" |
||||
|
[disabled]="(isLoading$ | async)" |
||||
|
(click)="cancel()" cdkFocusInitial> |
||||
|
{{ 'action.close' | translate }} |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
@ -0,0 +1,3 @@ |
|||||
|
:host { |
||||
|
} |
||||
|
|
||||
@ -0,0 +1,31 @@ |
|||||
|
import { Component, Inject } from '@angular/core'; |
||||
|
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; |
||||
|
import { DialogComponent } from "@shared/components/dialog.component"; |
||||
|
import { Store } from "@ngrx/store"; |
||||
|
import { AppState } from "@core/core.state"; |
||||
|
import { Router } from "@angular/router"; |
||||
|
|
||||
|
export interface EdgeInstructionsData { |
||||
|
instructions: string; |
||||
|
} |
||||
|
|
||||
|
@Component({ |
||||
|
selector: 'tb-edge-instructions', |
||||
|
templateUrl: './edge-instructions-dialog.component.html', |
||||
|
styleUrls: ['./edge-instructions-dialog.component.scss'] |
||||
|
}) |
||||
|
export class EdgeInstructionsDialogComponent extends DialogComponent<EdgeInstructionsDialogComponent, EdgeInstructionsData> { |
||||
|
|
||||
|
instructions: string = this.data.instructions; |
||||
|
|
||||
|
constructor(protected store: Store<AppState>, |
||||
|
protected router: Router, |
||||
|
public dialogRef: MatDialogRef<EdgeInstructionsDialogComponent, EdgeInstructionsData>, |
||||
|
@Inject(MAT_DIALOG_DATA) public data: EdgeInstructionsData) { |
||||
|
super(store, router, dialogRef); |
||||
|
} |
||||
|
|
||||
|
cancel(): void { |
||||
|
this.dialogRef.close(null); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue