mirror of
https://github.com/moparisthebest/mail
synced 2024-12-02 05:42:20 -05:00
remove key export dialog after keygen
This commit is contained in:
parent
4b5d367fdb
commit
6ca1ae6507
@ -101,42 +101,12 @@ define(function(require) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.setState(states.DONE);
|
$location.path('/desktop');
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 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.setState = function(state) {
|
||||||
$scope.state.ui = state;
|
$scope.state.ui = state;
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="content" ng-switch on="state.ui">
|
<div class="content" ng-switch on="state.ui">
|
||||||
|
|
||||||
<div ng-switch-when="1">
|
<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>
|
<form>
|
||||||
<div>
|
<div>
|
||||||
<label class="input-error-message" ng-class="{'passphrase-label-ok': passphraseRating >= 2}">{{passphraseMsg}}</label><br>
|
<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>
|
<p><b>Generating key.</b> Please stand by. This can take a while...</p>
|
||||||
</div>
|
</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><!--/content-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user