diff --git a/www/img/marker-icon-2x.png b/www/img/marker-icon-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0015b6495fa458ad39d51cb4b913430016f48d33 Binary files /dev/null and b/www/img/marker-icon-2x.png differ diff --git a/www/img/marker-icon.png b/www/img/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e2e9f757f515ded172e6f72c3ce55bbe15579649 Binary files /dev/null and b/www/img/marker-icon.png differ diff --git a/www/img/marker-shadow.png b/www/img/marker-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..d1e773c715a9b508ebea055c4bb4b0a2ad7f6e52 Binary files /dev/null and b/www/img/marker-shadow.png differ diff --git a/www/img/markers-matte.png b/www/img/markers-matte.png new file mode 100644 index 0000000000000000000000000000000000000000..178258665dd06a9e387d85d48553beef8161650c Binary files /dev/null and b/www/img/markers-matte.png differ diff --git a/www/img/markers-matte@2x.png b/www/img/markers-matte@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c981244dd3bba2fa7eb186253fdad64d8a2fdc06 Binary files /dev/null and b/www/img/markers-matte@2x.png differ diff --git a/www/img/markers-plain.png b/www/img/markers-plain.png new file mode 100644 index 0000000000000000000000000000000000000000..763f358932496cf5f83cb092156e8653113d339e Binary files /dev/null and b/www/img/markers-plain.png differ diff --git a/www/img/markers-soft.png b/www/img/markers-soft.png new file mode 100644 index 0000000000000000000000000000000000000000..9ee4c348dde1a740fd946c4212b0642ed5ab137c Binary files /dev/null and b/www/img/markers-soft.png differ diff --git a/www/img/markers-soft@2x.png b/www/img/markers-soft@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..540ce63759f8a8c7c46d136c14a4392c5802d635 Binary files /dev/null and b/www/img/markers-soft@2x.png differ diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 5b6e0b82a2abe8355166ef56191ce3f8105f8998..2f6115fabc71e96ce96d29acfa34e83df8fb6a61 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -1041,7 +1041,6 @@ function WotIdentityViewController($scope, $rootScope, $controller, $timeout, $s $scope.qrcodeId = 'qrcode-wot-' + $scope.$id; $scope.$on('$ionicView.enter', function(e, state) { - var onLoadSuccess = function() { $scope.doMotion(); if (state.stateParams && state.stateParams.action) { @@ -1078,15 +1077,6 @@ function WotIdentityViewController($scope, $rootScope, $controller, $timeout, $s } } - // Load from wallet pubkey - else if (csWallet.isLogin()){ - - if ($scope.loading) { - return $scope.load(csWallet.data.pubkey, csWallet.data.uid, options) - .then(onLoadSuccess); - } - } - // Redirect to home else { $scope.showHome(); diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js index 7b9f2cf259bc5d24691d778083293f2fac205d1f..f57661ff11527536b3a95f625416c0662caf721f 100644 --- a/www/js/services/bma-services.js +++ b/www/js/services/bma-services.js @@ -428,10 +428,10 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. revoke: post('/wot/revoke') }, blockchain: { - parameters: get('/blockchain/parameters', csHttp.cache.MONTH), + parameters: get('/blockchain/parameters', csHttp.cache.LONG), block: get('/blockchain/block/:block', csHttp.cache.SHORT), blocksSlice: get('/blockchain/blocks/:count/:from'), - current: get('/blockchain/current'), + current: get('/blockchain/current', csHttp.cache.SHORT), membership: post('/blockchain/membership'), stats: { ud: get('/blockchain/with/ud', csHttp.cache.MEDIUM), @@ -442,7 +442,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium. } }, tx: { - sources: get('/tx/sources/:pubkey'), + sources: get('/tx/sources/:pubkey', csHttp.cache.SHORT), process: post('/tx/process'), history: { all: get('/tx/history/:pubkey'), diff --git a/www/js/services/cache-services.js b/www/js/services/cache-services.js index c84a8812e7d29d3db84edb9e309193f2a6e52956..b96f15cf0a3927a58c5914d50631a3396c820a16 100644 --- a/www/js/services/cache-services.js +++ b/www/js/services/cache-services.js @@ -1,13 +1,13 @@ angular.module('cesium.cache.services', ['angular-cache']) -.factory('csCache', function($http, csSettings, CacheFactory) { +.factory('csCache', function($http, $window, csSettings, CacheFactory) { 'ngInject'; var constants = { LONG: 1 * 60 * 60 * 1000 /*1 hour*/, MEDIUM: 5 * 60 * 1000 /*5 min*/, - SHORT: csSettings.defaultSettings.cacheTimeMs + SHORT: csSettings.defaultSettings.cacheTimeMs // around 1min }, cacheNames = [] ; @@ -16,19 +16,22 @@ angular.module('cesium.cache.services', ['angular-cache']) prefix = prefix || 'csCache-'; maxAge = maxAge || constants.SHORT; var cacheName = prefix + maxAge; + + // FIXME : enable this when cache is cleaning on rollback + var storageMode = csSettings.data.useLocalStorage && $window.localStorage ? 'localStorage' : 'memory'; + if (!onExpire) { if (!cacheNames[cacheName]) { cacheNames[cacheName] = true; + console.debug("[cache] Creating cache {0}...".format(cacheName)); } return CacheFactory.get(cacheName) || CacheFactory.createCache(cacheName, { maxAge: maxAge, - deleteOnExpire: 'aggressive', + deleteOnExpire: 'passive', //cacheFlushInterval: 60 * 60 * 1000, // clear itself every hour recycleFreq: Math.max(maxAge - 1000, 5 * 60 * 1000 /*5min*/), - storageMode: 'memory' - // FIXME : enable this when cache is cleaning on rollback - //csSettings.data.useLocalStorage ? 'localStorage' : 'memory' + storageMode: storageMode }); } else { @@ -40,15 +43,14 @@ angular.module('cesium.cache.services', ['angular-cache']) if (!cacheNames[cacheName]) { cacheNames[cacheName] = true; } + console.debug("[cache] Creating cache {0} with 'onExpire' option...".format(cacheName)); return CacheFactory.createCache(cacheName, { maxAge: maxAge, deleteOnExpire: 'aggressive', //cacheFlushInterval: 60 * 60 * 1000, // This cache will clear itself every hour recycleFreq: maxAge, onExpire: onExpire, - storageMode: 'memory' - // FIXME : enable this when cache is cleaning on rollback - //csSettings.data.useLocalStorage ? 'localStorage' : 'memory' + storageMode: storageMode }); } } diff --git a/www/js/services/http-services.js b/www/js/services/http-services.js index 25974e689047533df16f26a601a8240b2e01511a..fecede4c9e963ae973fc9e54f668d88b8aa8d60f 100644 --- a/www/js/services/http-services.js +++ b/www/js/services/http-services.js @@ -101,11 +101,12 @@ angular.module('cesium.http.services', ['cesium.cache.services']) responseType: 'json' }; if (autoRefresh) { // redo the request if need - config.cache = csCache.get(cachePrefix, maxAge, function (key, value) { + config.cache = csCache.get(cachePrefix, maxAge, function (key, value, done) { console.debug('[http] Refreshing cache for ['+key+'] '); $http.get(key, config) .success(function (data) { config.cache.put(key, data); + if (done) done(key, data); }); }); }