Be responsive when generating private key
This commit is contained in:
parent
4609cc114f
commit
7c3ba9ecaa
@ -112,6 +112,9 @@ function signMessage(text, key, callback) {
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function generatePrivateKey(userid, passphrase, callback) {
|
||||
var statustextEl = $("#statustext");
|
||||
statustextEl.html("<i class='fas fa-spin fa-spinner'></i> Generating cryptographic key...");
|
||||
setTimeout(function () {
|
||||
var F = kbpgp["const"].openpgp;
|
||||
|
||||
var opts = {
|
||||
@ -130,11 +133,16 @@ function generatePrivateKey(userid, passphrase, callback) {
|
||||
alice.export_pgp_private({
|
||||
passphrase: passphrase
|
||||
}, function (err, pgp_private) {
|
||||
statustextEl.html("<i class='fas fa-check'></i> Key generated!");
|
||||
setTimeout(function () {
|
||||
statustextEl.html("");
|
||||
}, 5000);
|
||||
callback(alice);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function exportPublicKey() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user