Remove email backup feature
This commit is contained in:
parent
670560ea41
commit
7847bdcb2c
4 changed files with 2 additions and 63 deletions
|
|
@ -8,17 +8,6 @@ angular.module('copayApp.controllers').controller('BackupController',
|
|||
backupService.download($rootScope.wallet);
|
||||
};
|
||||
|
||||
$scope.openModal = function() {
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'backupModal.html',
|
||||
controller: ModalInstanceCtrl,
|
||||
});
|
||||
|
||||
modalInstance.result.then(function(email) {
|
||||
backupService.sendEmail(email, $rootScope.wallet);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.deleteWallet = function() {
|
||||
var w = $rootScope.wallet;
|
||||
w.disconnect();
|
||||
|
|
@ -28,14 +17,3 @@ angular.module('copayApp.controllers').controller('BackupController',
|
|||
};
|
||||
|
||||
});
|
||||
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
|
||||
$scope.submit = function(form) {
|
||||
$modalInstance.close($scope.email);
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,22 +29,4 @@ BackupService.prototype.download = function(wallet) {
|
|||
saveAs(blob, filename);
|
||||
};
|
||||
|
||||
BackupService.prototype.sendEmail = function(email, wallet) {
|
||||
var ew = wallet.toEncryptedObj();
|
||||
var body = ew;
|
||||
var subject = this.getName(wallet);
|
||||
var href = 'mailto:' + email + '?' + 'subject=[Copay Backup] ' + subject + '&' + 'body=' + body;
|
||||
|
||||
if (window.cshell) {
|
||||
return window.cshell.send('backup:email', href);
|
||||
}
|
||||
|
||||
var newWin = window.open(href, '_blank', 'scrollbars=yes,resizable=yes,width=10,height=10');
|
||||
if (newWin) {
|
||||
setTimeout(function() {
|
||||
newWin.close();
|
||||
}, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
angular.module('copayApp.services').service('backupService', BackupService);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue