add profile pgp generation

This commit is contained in:
_Bastler
2021-05-30 17:02:07 +02:00
parent 9ab0b9553c
commit 5ee8da9501
7 changed files with 139 additions and 10 deletions
@@ -0,0 +1,28 @@
<h1 mat-dialog-title>{{'profileField.blob.pgp' | i18n}}</h1>
<mat-dialog-content>
<h3>{{'pgp.privateKey' | i18n}}</h3>
<mat-form-field>
<qrcode [qrdata]="data.privateKey" [width]="400" [errorCorrectionLevel]="'M'"></qrcode>
<mat-label>{{'pgp.privateKey' | i18n}}</mat-label>
<textarea matInput readonly [(ngModel)]="data.privateKey" #privkey></textarea>
</mat-form-field>
</mat-dialog-content>
<mat-dialog-actions>
<a mat-raised-button color="primary" #downloadKey (click)="setDownloaded()">{{'pgp.privateKey.downloadKey' |
i18n}}</a>
<a mat-raised-button (click)="copyKey(privkey)">{{'pgp.privateKey.copyKey' |
i18n}}</a>
<button mat-icon-button #privateKeyHelp="matTooltip" (click)="privateKeyHelp.toggle()" [matTooltip]="'pgp.privateKey.help' | i18n" matTooltipPosition="after">
<mat-icon>help</mat-icon>
</button>
</mat-dialog-actions>
<br />
<mat-dialog-actions>
<a mat-icon-button (click)="downloaded=true" [matTooltip]="'pgp.privateKey.downloaded' | i18n"><mat-icon>announcement</mat-icon></a>
<mat-slide-toggle [(ngModel)]="data.confirmClose" [disabled]="!downloaded">
{{'pgp.privateKey.confirmStore' | i18n}}
</mat-slide-toggle>
<button mat-button [mat-dialog-close]="false">{{'cancel' | i18n}}</button>
<button mat-button color="accent" [disabled]="!data.confirmClose" [mat-dialog-close]="data.publicKey">{{'ok' | i18n}}</button>
</mat-dialog-actions>