Added version and networkName label bellow Copay logo

This commit is contained in:
Gustavo Maximiliano Cortez 2014-08-05 11:52:51 -03:00
commit 0a388c73ca
13 changed files with 16 additions and 27 deletions

View file

@ -3,8 +3,6 @@
angular.module('copayApp.controllers').controller('SidebarController',
function($scope, $rootScope, $sce, $location, $http, notification, controllerUtils) {
$scope.version = copay.version;
$scope.networkName = config.networkName;
$scope.menu = [{
'title': 'Addresses',
'icon': 'fi-address-book',
@ -62,23 +60,6 @@ angular.module('copayApp.controllers').controller('SidebarController',
return new Array(num);
}
$http.get('https://api.github.com/repos/bitpay/copay/tags').success(function(data) {
var toInt = function(s) {
return parseInt(s);
};
var latestVersion = data[0].name.replace('v', '').split('.').map(toInt);
var currentVersion = copay.version.split('.').map(toInt);
var title = 'Copay ' + data[0].name + ' available.';
var content;
if (currentVersion[0] < latestVersion[0]) {
content = 'It\'s important that you update your wallet at https://copay.io';
notification.version(title, content, true);
} else if (currentVersion[0] == latestVersion[0] && currentVersion[1] < latestVersion[1]) {
var content = 'Please update your wallet at https://copay.io';
notification.version(title, content, false);
}
});
// Init socket handlers (with no wallet yet)
controllerUtils.setSocketHandlers();