ionic side menu
This commit is contained in:
parent
a54df263e2
commit
d468c28cd0
7 changed files with 105 additions and 161 deletions
|
|
@ -1155,18 +1155,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
};
|
||||
|
||||
self.openMenu = function() {
|
||||
self.toggleLeftMenu = function() {
|
||||
profileService.isDisclaimerAccepted(function(val) {
|
||||
if (val) go.swipe(true);
|
||||
if (val) go.toggleLeftMenu();
|
||||
else
|
||||
$log.debug('Disclaimer not accepted, cannot open menu');
|
||||
});
|
||||
};
|
||||
|
||||
self.closeMenu = function() {
|
||||
go.swipe();
|
||||
};
|
||||
|
||||
self.retryScan = function() {
|
||||
var self = this;
|
||||
self.startScan(self.walletId);
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ angular.module('copayApp.controllers').controller('sidebarController',
|
|||
self.setWallets();
|
||||
});
|
||||
|
||||
|
||||
self.closeMenu = function() {
|
||||
go.swipe();
|
||||
};
|
||||
|
||||
self.signout = function() {
|
||||
profileService.signout();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,36 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('go', function($window, $rootScope, $location, $state, $timeout, $log, profileService, platformInfo, nodeWebkit) {
|
||||
angular.module('copayApp.services').factory('go', function($window, $ionicSideMenuDelegate, $rootScope, $location, $state, $timeout, $log, profileService, platformInfo, nodeWebkit) {
|
||||
var root = {};
|
||||
|
||||
var hideSidebars = function() {
|
||||
if (typeof document === 'undefined')
|
||||
return;
|
||||
|
||||
var elem = document.getElementById('off-canvas-wrap');
|
||||
elem.className = 'off-canvas-wrap';
|
||||
};
|
||||
|
||||
var toggleSidebar = function(invert) {
|
||||
if (typeof document === 'undefined')
|
||||
return;
|
||||
|
||||
var elem = document.getElementById('off-canvas-wrap');
|
||||
var leftbarActive = elem.className.indexOf('move-right') >= 0;
|
||||
|
||||
if (invert) {
|
||||
if (profileService.profile && !$rootScope.hideNavigation) {
|
||||
elem.className = 'off-canvas-wrap move-right';
|
||||
}
|
||||
} else {
|
||||
if (leftbarActive) {
|
||||
hideSidebars();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
root.openExternalLink = function(url, target) {
|
||||
if ( platformInfo.isNW) {
|
||||
if (platformInfo.isNW) {
|
||||
nodeWebkit.openExternalLink(url);
|
||||
} else {
|
||||
target = target || '_blank';
|
||||
|
|
@ -49,11 +23,10 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
|||
}, function() {
|
||||
if (cb) return cb('animation in progress');
|
||||
});
|
||||
hideSidebars();
|
||||
};
|
||||
|
||||
root.swipe = function(invert) {
|
||||
toggleSidebar(invert);
|
||||
root.toggleLeftMenu = function() {
|
||||
$ionicSideMenuDelegate.toggleLeft()
|
||||
};
|
||||
|
||||
root.walletHome = function() {
|
||||
|
|
|
|||
|
|
@ -833,10 +833,6 @@ ul.manage li {
|
|||
}
|
||||
}
|
||||
|
||||
.sidebar li.nav-item.selected .name-wallet {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.locked {
|
||||
font-size: 11px;
|
||||
color: #7A8C9E;
|
||||
|
|
@ -1606,14 +1602,6 @@ input.ng-invalid-match {
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.right-off-canvas-menu {
|
||||
background-color: #213140;
|
||||
}
|
||||
|
||||
.off-canvas-wrap, .inner-wrap {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.walletHome {
|
||||
.avatar-wallet {
|
||||
padding: 0.5rem;
|
||||
|
|
@ -1687,6 +1675,11 @@ a.missing-copayers {
|
|||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.sidebar ion-content {
|
||||
background: #2C3E50;
|
||||
top: 115px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background: #2C3E50;
|
||||
.icon {
|
||||
|
|
@ -1757,16 +1750,24 @@ a.missing-copayers {
|
|||
color: #fff;
|
||||
}
|
||||
}
|
||||
ul.off-canvas-list {
|
||||
margin-bottom: 30px;
|
||||
li a {
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
border-bottom: transparent;
|
||||
color: #A5B2BF;
|
||||
padding: 1rem 0.7rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar li {
|
||||
overflow: hidden;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
|
||||
padding: 1rem 0.7rem;
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.sidebar ul {
|
||||
margin: 0 0 30px 0;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: #A5B2BF;
|
||||
}
|
||||
|
||||
.modal-content ul li a {
|
||||
|
|
@ -1790,11 +1791,6 @@ a.missing-copayers {
|
|||
}
|
||||
}
|
||||
|
||||
.sidebar .left-off-canvas-menu {
|
||||
background: #E4E8EC;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove all vendors hover / shadow / fade
|
||||
*/
|
||||
|
|
@ -1807,23 +1803,6 @@ a.missing-copayers {
|
|||
box-shadow: none;
|
||||
}
|
||||
|
||||
ul.off-canvas-list li a:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.move-right .close-menu {
|
||||
cursor: pointer;
|
||||
box-shadow: none;
|
||||
display: block;
|
||||
position: absolute;
|
||||
background: none;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1002;
|
||||
}
|
||||
|
||||
/* === */
|
||||
|
||||
/* Have to set height explicity on ui-view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue