do not show the menu in disclaimer view
This commit is contained in:
parent
63e0fd1774
commit
260c5d9b67
3 changed files with 15 additions and 3 deletions
|
|
@ -19,12 +19,11 @@
|
|||
<ion-side-menus class="page" ng-controller="indexController as index">
|
||||
|
||||
<!-- Left menu -->
|
||||
<ion-side-menu side="left" expose-aside-when="large">
|
||||
<ion-side-menu side="left" expose-aside-when="large" ng-if="isDisclaimerAccepted">
|
||||
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
|
||||
</ion-side-menu>
|
||||
|
||||
<!-- Main content -->
|
||||
|
||||
<ion-side-menu-content drag-content="index.isCordova && index.allowSideBar">
|
||||
<div notifications="right top"></div>
|
||||
<div id="sectionContainer">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('disclaimerController',
|
||||
function($scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) {
|
||||
function($rootScope, $scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) {
|
||||
var self = this;
|
||||
self.tries = 0;
|
||||
var isCordova = platformInfo.isCordova;
|
||||
|
|
@ -62,6 +62,7 @@ angular.module('copayApp.controllers').controller('disclaimerController',
|
|||
if (err) $log.error(err);
|
||||
else {
|
||||
$ionicSideMenuDelegate.canDragContent(true);
|
||||
$rootScope.$emit('disclaimerAccepted');
|
||||
go.walletHome();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
});
|
||||
}
|
||||
|
||||
$timeout(function() {
|
||||
profileService.isDisclaimerAccepted(function(val) {
|
||||
$scope.isDisclaimerAccepted = val;
|
||||
});
|
||||
}, 1);
|
||||
|
||||
function strip(number) {
|
||||
return (parseFloat(number.toPrecision(12)));
|
||||
};
|
||||
|
|
@ -1410,6 +1416,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.tab = 'walletHome';
|
||||
});
|
||||
|
||||
$rootScope.$on('disclaimerAccepted', function(event) {
|
||||
profileService.isDisclaimerAccepted(function(val) {
|
||||
$scope.isDisclaimerAccepted = val;
|
||||
});
|
||||
});
|
||||
|
||||
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
|
||||
|
||||
if (self.isInFocus(walletId)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue