mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #919 from maraoz/feature/delete-wallet-intermediate
Add delete wallet button at intermediate screen
This commit is contained in:
commit
c2dcd4f44b
|
@ -138,8 +138,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="large-12 medium-12 small-12 columns">
|
<div class="large-12 medium-12 small-12 columns">
|
||||||
<div class="line-dashed">
|
<div class="line-dashed">
|
||||||
<a ng-click="dowloadBackup()"
|
<span ng-show="!$root.wallet.publicKeyRing.isComplete()">
|
||||||
ng-show="!$root.wallet.publicKeyRing.isComplete()">Save seed backup</a>
|
<a ng-click="dowloadBackup()">Save seed backup</a>
|
||||||
|
|
|
||||||
|
</span>
|
||||||
|
<a ng-really-click="deleteWallet()"
|
||||||
|
ng-really-message="Are you sure to delete this wallet from this computer?">Delete wallet</a>
|
||||||
<button class="button primary radius right"
|
<button class="button primary radius right"
|
||||||
ng-click="backup()"
|
ng-click="backup()"
|
||||||
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
ng-show="!$root.wallet.publicKeyRing.isBackupReady()"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('HeaderController',
|
angular.module('copayApp.controllers').controller('HeaderController',
|
||||||
function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService) {
|
function($scope, $rootScope, $location, notification, $http, $sce, controllerUtils, backupService, walletFactory) {
|
||||||
$scope.menu = [{
|
$scope.menu = [{
|
||||||
'title': 'Addresses',
|
'title': 'Addresses',
|
||||||
'icon': 'fi-address-book',
|
'icon': 'fi-address-book',
|
||||||
|
@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
||||||
'icon': 'fi-arrow-right',
|
'icon': 'fi-arrow-right',
|
||||||
'link': '#/send'
|
'link': '#/send'
|
||||||
}, {
|
}, {
|
||||||
'title': 'More...',
|
'title': 'More',
|
||||||
'icon': 'fi-download',
|
'icon': 'fi-download',
|
||||||
'link': '#/backup'
|
'link': '#/backup'
|
||||||
}];
|
}];
|
||||||
|
@ -96,7 +96,15 @@ angular.module('copayApp.controllers').controller('HeaderController',
|
||||||
$scope.dowloadBackup = function() {
|
$scope.dowloadBackup = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
backupService.download(w);
|
backupService.download(w);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
$scope.deleteWallet = function() {
|
||||||
|
var w = $rootScope.wallet;
|
||||||
|
w.disconnect();
|
||||||
|
walletFactory.delete(w.id, function() {
|
||||||
|
controllerUtils.logout();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope.getVideoURL = function(copayer) {
|
$scope.getVideoURL = function(copayer) {
|
||||||
if (config.disableVideo) return;
|
if (config.disableVideo) return;
|
||||||
|
|
Loading…
Reference in New Issue