wallet-bar for small devices

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-04 20:43:27 -03:00
commit 244ea456c6
7 changed files with 39 additions and 36 deletions

View file

@ -1,6 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('SidebarController', function($scope, $rootScope, $location, $timeout, identityService) {
angular.module('copayApp.controllers').controller('SidebarController', function($scope, $rootScope, $location, $timeout, identityService, isMobile) {
$scope.isMobile = isMobile.any()
$scope.menu = [{
'title': 'Home',
@ -49,7 +51,6 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
$scope.setWallets();
};
$scope.init = function() {
// This should be called only once.
@ -90,8 +91,8 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
$scope.setWallets = function() {
if (!$rootScope.iden) return;
var ret = _.filter($rootScope.iden.listWallets(), function(w) {
return !identityService.isFocused(w.getId());
return w;
});
$scope.wallets = ret;
$scope.wallets = _.sortBy(ret, 'name');
};
});