diff --git a/www/js/app.js b/www/js/app.js index 1c85fa22f39a99dd78232d287540c69f2646e3b2..27c490db9c61bbda6e122d581900453f791f6382 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -261,6 +261,7 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht .config(function($httpProvider, csConfig) { 'ngInject'; + // Set default timeout $httpProvider.defaults.timeout = !!csConfig.TIMEOUT ? csConfig.TIMEOUT : 4000 /* default timeout */; @@ -269,6 +270,11 @@ angular.module('cesium', ['ionic', 'ionic-material', 'ngMessages', 'pascalprecht //Remove the header used to identify ajax call that would prevent CORS from working delete $httpProvider.defaults.headers.common['X-Requested-With']; + + // removeIf(no-device) + // Group http request response processing (better performance when many request) + $httpProvider.useApplyAsync(true); + // endRemoveIf(no-device) }) .config(function($compileProvider, csConfig) { diff --git a/www/js/services/http-services.js b/www/js/services/http-services.js index 1edcf835b8c9d8ab9bd91a8e2da792850f92fa5c..2332aac7874b82838ed547e9349b419c941c0263 100644 --- a/www/js/services/http-services.js +++ b/www/js/services/http-services.js @@ -67,7 +67,8 @@ angular.module('cesium.http.services', ['ngResource', 'cesium.cache.services']) return function(params) { return $q(function(resolve, reject) { var config = { - timeout: timeout + timeout: timeout, + responseType: 'json' }; prepare(url, params, config, function(url, config) { diff --git a/www/plugins/es/js/controllers/subscription-controllers.js b/www/plugins/es/js/controllers/subscription-controllers.js index 49a00fc11ee9d12b8550f0cb3458aecb20593211..72a93fe7e68220817536add2f8ff731500609c5e 100644 --- a/www/plugins/es/js/controllers/subscription-controllers.js +++ b/www/plugins/es/js/controllers/subscription-controllers.js @@ -21,7 +21,7 @@ angular.module('cesium.es.subscription.controllers', ['cesium.es.services']) ; -function ViewSubscriptionsController($scope, $rootScope, csWot, UIUtils, ModalUtils, esSubscription) { +function ViewSubscriptionsController($scope, $rootScope, $q, csWot, UIUtils, ModalUtils, esSubscription) { 'ngInject'; $scope.popupData = {}; // need for the node popup diff --git a/www/plugins/es/templates/subscription/modal_email.html b/www/plugins/es/templates/subscription/modal_email.html index b674ac04a9fd980e42d18a5b55891ac94ffd412c..1f942a54fd0089d351eebd5b16fa80508e8b239a 100644 --- a/www/plugins/es/templates/subscription/modal_email.html +++ b/www/plugins/es/templates/subscription/modal_email.html @@ -64,8 +64,8 @@ ng-click="showNetworkLookup()" style="height: 67px;"> <span class="input-label" translate>SUBSCRIPTION.MODAL_EMAIL.PROVIDER</span> - <span class="badge badge-positive animate-fade-in animate-show-hide ng-hide" ng-show="recipient && (recipient.name||recipient.uid)"> - {{recipient.name||recipient.uid}} + <span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="recipient && recipient.uid"> + <i class="ion-person"></i> {{recipient.name||recipient.uid}} </span> <span class="badge badge-secondary animate-fade-in animate-show-hide ng-hide" ng-show="formData.recipient"> <i class="ion-key"></i> {{formData.recipient | formatPubkey}} diff --git a/www/templates/wallet/transfer_form.html b/www/templates/wallet/transfer_form.html index f6f2705200d6002e72950ddc6ef49de9daf39cef..8d000c25c3d45e4614b1d0a4ee83ae5e060f7bb8 100644 --- a/www/templates/wallet/transfer_form.html +++ b/www/templates/wallet/transfer_form.html @@ -7,8 +7,13 @@ ng-class="{'item-input-error': form.$submitted && !formData.destPub}" ng-click="showWotLookupModal()"> <span class="gray" translate>TRANSFER.TO</span> - <span class="badge badge-royal">{{destUid}}{{destPub | formatPubkey}}</span> - <i class="gray icon ion-ios-arrow-right"></i> + <span class="badge badge-royal animate-fade-in animate-show-hide ng-hide" ng-show="destUid" > + <i class="ion-person"></i> {{destUid}} + </span> + <span class="badge badge-royal " ng-show="!destUid && formData.destPub"> + <i class="ion-key"></i> {{formData.destPub | formatPubkey}} + </span> + <i class="gray icon ion-ios-arrow-right"></i> </a> <div class="form-errors" ng-if="form.$submitted && !formData.destPub"> @@ -23,10 +28,10 @@ ng-class="{'badge-assertive': (convertedBalance <= 0 || (formData.amount && convertedBalance < formData.amount)), 'badge-balanced': (convertedBalance > 0 && (!formData.amount || convertedBalance >= formData.amount)) }"> <ion-spinner icon="android" ng-if="!$root.walletData.pubkey"></ion-spinner> <span ng-if="$root.walletData.pubkey && !$root.walletData.isMember"> - {{$root.walletData.pubkey| formatPubkey}} + <i class="ion-key"></i> {{$root.walletData.pubkey| formatPubkey}} </span> <span ng-if="$root.walletData.isMember"> - {{$root.walletData.name||$root.walletData.uid}} + <i class="ion-person"></i> {{$root.walletData.name||$root.walletData.uid}} </span> <span ng-bind-html="$root.walletData.balance|formatAmount:{useRelative: formData.useRelative, currency:currency}"></span> </span>