add profile pgp generation
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user