error notifications
This commit is contained in:
parent
2782baadb6
commit
30eb9bf0c5
6 changed files with 22 additions and 28 deletions
|
|
@ -27,8 +27,6 @@
|
|||
|
||||
<div notifications="right top"></div>
|
||||
<div ng-include="'views/includes/offline.html'" ng-if="index.isOffline"></div>
|
||||
<div ng-include="'views/includes/clientError.html'" ng-if="index.clientError"></div>
|
||||
|
||||
<div ng-include="'views/includes/password.html'" ng-if="index.askPassword"
|
||||
></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<div class="extra-margin-bottom"></div>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<div class="client-error dr-notification-wrapper">
|
||||
<div class="dr-notification">
|
||||
<div class="dr-notification-image">
|
||||
<i class="fi-alert"></i>
|
||||
</div>
|
||||
<div class="dr-notification-content">
|
||||
<h3 class="dr-notification-title">Wallet Service Error</h3>
|
||||
<div class="dr-notification-text ellipsis">{{index.clientError.message || index.clientError}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -58,10 +58,11 @@
|
|||
<div class="rect4"></div>
|
||||
<div class="rect5"></div>
|
||||
</div>
|
||||
<span translate ng-show="index.onGoingProcessName == 'openingWallet'"> Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingStatus'"> Updating Status...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingBalance'">Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'updatingPendingTxps'">Updating Wallet...</span>
|
||||
<span translate ng-show="
|
||||
index.onGoingProcessName == 'openingWallet'
|
||||
|| index.onGoingProcessName == 'updatingStatus'
|
||||
|| index.onGoingProcessName == 'updatingBalance'
|
||||
"> Updating Wallet... </span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
|
||||
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
|
||||
</div>
|
||||
|
|
@ -343,7 +344,7 @@ history
|
|||
<span ng-if="!index.updatingTxHistory">
|
||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.openWallet()'>
|
||||
<span translate>Could not fetch transaction history</span>
|
||||
<br> [<span translate>Tap to retry</span>]
|
||||
<br> <span translate>Tap to retry</span>
|
||||
</span>
|
||||
<span ng-if="!index.txHistoryError" translate>
|
||||
No transactions yet
|
||||
|
|
|
|||
|
|
@ -1115,7 +1115,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
top:auto;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:90px;
|
||||
bottom:200px;
|
||||
margin: auto;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.alternativeBalanceAvailable = false;
|
||||
self.totalBalanceAlternative = null;
|
||||
self.notAuthorized = false;
|
||||
self.clientError = null;
|
||||
self.txHistory = [];
|
||||
self.txHistoryPaging = false;
|
||||
|
||||
|
|
@ -411,17 +410,27 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
};
|
||||
|
||||
|
||||
self.clientError = function (err) {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
err,
|
||||
function() {},
|
||||
'Wallet Server Error', ['OK']
|
||||
);
|
||||
} else {
|
||||
alert(err);
|
||||
}
|
||||
};
|
||||
|
||||
self.recreate = function(cb) {
|
||||
var fc = profileService.focusedClient;
|
||||
self.setOngoingProcess('recreating', true);
|
||||
self.clientError = null;
|
||||
fc.recreateWallet(function(err) {
|
||||
self.notAuthorized = false;
|
||||
self.setOngoingProcess('recreating', false);
|
||||
|
||||
if (err) {
|
||||
self.clientError = 'Could not recreate wallet:' + err;
|
||||
self.clientError('Could not recreate wallet:' + err);
|
||||
$rootScope.$apply();
|
||||
return;
|
||||
}
|
||||
|
|
@ -458,7 +467,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
if (err) {
|
||||
if (self.walletId == walletId)
|
||||
self.setOngoingProcess('scanning', false);
|
||||
self.clientError = 'Could not scan wallet:' + err;
|
||||
self.clientError = ('Could not scan wallet:' + err);
|
||||
$rootScope.$apply();
|
||||
}
|
||||
});
|
||||
|
|
@ -522,7 +531,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$rootScope.$on(eventName, function(event) {
|
||||
$log.debug('### Online event');
|
||||
self.isOffline = false;
|
||||
self.clientError = null;
|
||||
self.updateAll();
|
||||
self.updateTxHistory();
|
||||
});
|
||||
|
|
@ -544,7 +552,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
|
||||
$rootScope.$on('Local/BWSNotFound', function(event) {
|
||||
self.clientError = 'Could not access to Bitcore Wallet Service: Service not found';
|
||||
self.clientError('Could not access to Bitcore Wallet Service: Service not found');
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
||||
|
|
@ -557,7 +565,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
} else if (err.code === 'ETIMEDOUT') {
|
||||
$log.debug('Time out:', err);
|
||||
} else {
|
||||
self.clientError = err;
|
||||
self.clientError(err && err.message ? 'Error at Bitcore Wallet Service:' + err.message : err);
|
||||
}
|
||||
$rootScope.$apply();
|
||||
});
|
||||
|
|
@ -627,7 +635,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
$timeout(function() {
|
||||
self.hasProfile = true;
|
||||
self.noFocusedWallet = true;
|
||||
self.clientError = null;
|
||||
self.isComplete = null;
|
||||
self.walletName = null;
|
||||
go.addWallet();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue