wallet-bar for small devices
This commit is contained in:
parent
5be9fbc47c
commit
244ea456c6
7 changed files with 39 additions and 36 deletions
|
|
@ -1,9 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, rateService, notification) {
|
||||
angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $location, rateService, notification, identityService) {
|
||||
$scope.init = function() {
|
||||
$rootScope.title = 'Home';
|
||||
|
||||
// fix for Safari and mobile devices
|
||||
var walletId = $location.hash();
|
||||
if (walletId) {
|
||||
$location.hash('');
|
||||
identityService.setFocusedWallet(walletId);
|
||||
}
|
||||
|
||||
$scope.rateService = rateService;
|
||||
$scope.isRateAvailable = false;
|
||||
|
||||
|
|
@ -100,8 +107,6 @@ angular.module('copayApp.controllers').controller('HomeWalletController', functi
|
|||
},1)
|
||||
}, 100);
|
||||
|
||||
|
||||
|
||||
$scope.sign = function(ntxid) {
|
||||
var w = $rootScope.wallet;
|
||||
$scope.loading = true;
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue