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
+6 -1
View File
@@ -2,7 +2,7 @@ import {Component, OnInit, Inject, ViewChild, ElementRef} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {Router} from '@angular/router';
import {MatSnackBar} from '@angular/material/snack-bar';
import {UserService} from './../../services/user.service';
import {ItemService} from './../../services/item.service';
@@ -167,6 +167,8 @@ export class RegisterDialog {
@ViewChild("downloadKey", {read: ElementRef}) downloadKey: ElementRef;
constructor(private router: Router,
private i18n : I18nService,
private snackBar: MatSnackBar,
public dialogRef: MatDialogRef<RegisterDialog>,
@Inject(MAT_DIALOG_DATA) public data: any) {
}
@@ -185,6 +187,9 @@ export class RegisterDialog {
document.execCommand('copy');
inputElement.setSelectionRange(0, 0);
this.downloaded = true;
this.snackBar.open(this.i18n.get("pgp.privateKey.copied", []), this.i18n.get("close", []), {
duration: 3000
});
}
}