fix menu and sidebar
This commit is contained in:
parent
9abccdba41
commit
23f096844f
6 changed files with 23 additions and 21 deletions
|
|
@ -7,23 +7,21 @@
|
||||||
<li ng-show="sidebar.wallets[0]"
|
<li ng-show="sidebar.wallets[0]"
|
||||||
ng-repeat="item in sidebar.wallets track by $index"
|
ng-repeat="item in sidebar.wallets track by $index"
|
||||||
ng-class="{'selected': item.id == index.walletId}"
|
ng-class="{'selected': item.id == index.walletId}"
|
||||||
class="nav-item">
|
class="nav-item"
|
||||||
<a ng-click="sidebar.switchWallet(item.id)">
|
ng-click="sidebar.switchWallet(item.id)"
|
||||||
|
>
|
||||||
<div class="avatar-wallet"
|
<div class="avatar-wallet"
|
||||||
ng-style="{'background-color':item.color}">{{(item.name || item.id) | limitTo: 1}}</div>
|
ng-style="{'background-color':item.color}">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||||
<div class="ellipsis name-wallet">{{item.name || item.id}}</div>
|
<div class="ellipsis name-wallet">{{item.name || item.id}}</div>
|
||||||
<div class="size-12">{{item.m}} <span translate>of</span> {{item.n}}</div>
|
<div class="size-12">{{item.m}} <span translate>of</span> {{item.n}}</div>
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li ng-click="$root.go('add')">
|
||||||
<a ng-click="$root.go('add')">
|
|
||||||
<i class="icon-arrow-right3 size-18 right m10t"></i>
|
<i class="icon-arrow-right3 size-18 right m10t"></i>
|
||||||
<i class="fi-plus size-24 db left m10r"></i>
|
<i class="fi-plus size-24 db left m10r"></i>
|
||||||
<div class="tu text-bold">
|
<div class="tu text-bold">
|
||||||
<span class="size-12" translate>Add wallet</span>
|
<span class="size-12" translate>Add wallet</span>
|
||||||
</div>
|
</div>
|
||||||
<div translate>Create, join or import</div>
|
<div translate>Create, join or import</div>
|
||||||
</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -322,20 +322,16 @@ a.missing-copayers {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar ul.off-canvas-list li a {
|
.sidebar ul.off-canvas-list li{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
border-bottom: transparent;
|
border-bottom: transparent;
|
||||||
padding: 0;
|
|
||||||
color: #A5B2BF;
|
color: #A5B2BF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar ul.off-canvas-list li a i {
|
.sidebar ul.off-canvas-list li i {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar ul.off-canvas-list li a i {
|
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.isComplete = fc.isComplete();
|
self.isComplete = fc.isComplete();
|
||||||
self.txps = [];
|
self.txps = [];
|
||||||
self.copayers = [];
|
self.copayers = [];
|
||||||
|
self.updateColor();
|
||||||
|
self.setTab('walletHome', true);
|
||||||
|
|
||||||
storageService.getBackupFlag(self.walletId, function(err, val) {
|
storageService.getBackupFlag(self.walletId, function(err, val) {
|
||||||
self.needsBackup = self.network == 'testnet' ? false : !val;
|
self.needsBackup = self.network == 'testnet' ? false : !val;
|
||||||
|
|
@ -103,10 +105,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.setTab = function(tab) {
|
self.setTab = function(tab, reset, tries) {
|
||||||
if (self.tab === tab)
|
tries = tries || 0;
|
||||||
|
if (self.tab === tab && !reset)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (! document.getElementById('menu-' + tab) && ++tries<5) {
|
||||||
|
return $timeout(function() {
|
||||||
|
self.setTab(tab,reset);
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
|
||||||
if (!self.tab)
|
if (!self.tab)
|
||||||
self.tab = 'walletHome';
|
self.tab = 'walletHome';
|
||||||
|
|
||||||
|
|
@ -257,7 +266,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
};
|
};
|
||||||
self.openWallet = function() {
|
self.openWallet = function() {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
self.updateColor();
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
self.setOngoingProcess('openingWallet', true);
|
self.setOngoingProcess('openingWallet', true);
|
||||||
|
|
@ -696,8 +704,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.updateTxHistory();
|
self.updateTxHistory();
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/SetTab', function(event, tab) {
|
$rootScope.$on('Local/SetTab', function(event, tab, reset) {
|
||||||
self.setTab(tab);
|
self.setTab(tab, reset);
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/NeedsPassword', function(event, isSetup, cb) {
|
$rootScope.$on('Local/NeedsPassword', function(event, isSetup, cb) {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ angular.module('copayApp.controllers').controller('sidebarController',
|
||||||
|
|
||||||
self.switchWallet = function(wid) {
|
self.switchWallet = function(wid) {
|
||||||
self.walletSelection = false;
|
self.walletSelection = false;
|
||||||
profileService.setAndStoreFocus(wid, function() {});
|
profileService.setAndStoreFocus(wid, function() {
|
||||||
go.walletHome();
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.toggleWalletSelection = function() {
|
self.toggleWalletSelection = function() {
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
tries = tries || 0;
|
tries = tries || 0;
|
||||||
if (tries > 5) return;
|
if (tries > 5) return;
|
||||||
var e = document.getElementById('menu-walletHome');
|
var e = document.getElementById('menu-walletHome');
|
||||||
if (!e) $timeout(function() {
|
if (!e) return $timeout(function() {
|
||||||
self.bindTouchDown(++tries);
|
self.bindTouchDown(++tries);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
||||||
root.path('copayers');
|
root.path('copayers');
|
||||||
} else {
|
} else {
|
||||||
root.path('walletHome', function() {
|
root.path('walletHome', function() {
|
||||||
$rootScope.$emit('Local/SetTab', 'walletHome');
|
$rootScope.$emit('Local/SetTab', 'walletHome', true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue