fix profile
This commit is contained in:
parent
1e013b1bb6
commit
436aeda1c3
3 changed files with 9 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, notification, identityService, Compatibility) {
|
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, $timeout, notification, identityService, Compatibility) {
|
||||||
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
||||||
if (getParam('confirmed')) {
|
if (getParam('confirmed')) {
|
||||||
var hashIndex = window.location.href.indexOf('/?');
|
var hashIndex = window.location.href.indexOf('/?');
|
||||||
|
|
@ -24,6 +24,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
||||||
}
|
}
|
||||||
$rootScope.starting = true;
|
$rootScope.starting = true;
|
||||||
identityService.open(form.email.$modelValue, form.password.$modelValue, function(err, iden) {
|
identityService.open(form.email.$modelValue, form.password.$modelValue, function(err, iden) {
|
||||||
|
$rootScope.starting = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
copay.logger.warn(err);
|
copay.logger.warn(err);
|
||||||
if ((err.toString() || '').match('PNOTFOUND')) {
|
if ((err.toString() || '').match('PNOTFOUND')) {
|
||||||
|
|
@ -31,7 +32,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
||||||
} else {
|
} else {
|
||||||
$scope.error = 'Unknown error';
|
$scope.error = 'Unknown error';
|
||||||
}
|
}
|
||||||
$rootScope.$digest()
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.setWallets = function() {
|
||||||
|
if (!$rootScope.iden) return;
|
||||||
|
$scope.wallets=$rootScope.iden.listWallets();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
$scope.downloadWalletBackup = function(w) {
|
$scope.downloadWalletBackup = function(w) {
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
backupService.walletDownload(w);
|
backupService.walletDownload(w);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="backup" ng-controller="ProfileController">
|
<div class="backup" ng-controller="ProfileController" ng-init="setWallets()">
|
||||||
<div class="row hide-for-large-up">
|
<div class="row hide-for-large-up">
|
||||||
<div class="large-12 medium-12 small-12 columns">
|
<div class="large-12 medium-12 small-12 columns">
|
||||||
<h1>{{$root.title}}</h1>
|
<h1>{{$root.title}}</h1>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue