remove key export dialog after keygen

This commit is contained in:
Tankred Hase 2014-03-29 01:13:32 +01:00
parent 4b5d367fdb
commit 6ca1ae6507
2 changed files with 2 additions and 38 deletions

View File

@ -101,42 +101,12 @@ define(function(require) {
return;
}
$scope.setState(states.DONE);
$location.path('/desktop');
$scope.$apply();
});
}, 500);
};
$scope.exportKeypair = function() {
// export keys from keychain
emailDao._crypto.exportKeys(function(err, keys) {
if (err) {
$scope.onError(err);
return;
}
var id = keys.keyId.substring(8, keys.keyId.length);
dl.createDownload({
content: keys.publicKeyArmored + keys.privateKeyArmored,
filename: 'whiteout_mail_' + emailDao._account.emailAddress + '_' + id + '.asc',
contentType: 'text/plain'
}, onSave);
});
function onSave(err) {
if (err) {
$scope.onError(err);
return;
}
$scope.proceed();
$scope.$apply();
}
};
$scope.proceed = function() {
$location.path('/desktop');
};
$scope.setState = function(state) {
$scope.state.ui = state;
};

View File

@ -6,7 +6,7 @@
<div class="content" ng-switch on="state.ui">
<div ng-switch-when="1">
<p><b>Generate PGP key.</b> You can set a passphrase to protect your key on disk. But you will have to enter it everytime you open the app. If not just press continue.</p><p>Alternatively you can also <a href="#" ng-click="$event.preventDefault(); importKey()">import an existing PGP key</a>.</p>
<p><b>Generate PGP key.</b> You can set a passphrase to protect your key on disk. This must be entered everytime you start the app. For no passphrase just press continue.</p><p>Alternatively you can also <a href="#" ng-click="$event.preventDefault(); importKey()">import an existing PGP key</a>.</p>
<form>
<div>
<label class="input-error-message" ng-class="{'passphrase-label-ok': passphraseRating >= 2}">{{passphraseMsg}}</label><br>
@ -24,12 +24,6 @@
<p><b>Generating key.</b> Please stand by. This can take a while...</p>
</div>
<div ng-switch-when="4">
<p><b>Keypair generated.</b> Your personal keypair has been generated. You can export it (e.g. to a USB flash drive) to setup Whiteout Mail on another computer or as a backup.</p>
<button ng-click="exportKeypair()" class="btn" tabindex="4">Export now</button>
<button ng-click="proceed()" class="btn btn-alt" tabindex="5">Do it later</button>
</div>
</div><!--/content-->
</div>