do not show the menu in disclaimer view

This commit is contained in:
Javier 2016-07-04 10:42:36 -03:00
commit 260c5d9b67
3 changed files with 15 additions and 3 deletions

View file

@ -19,12 +19,11 @@
<ion-side-menus class="page" ng-controller="indexController as index"> <ion-side-menus class="page" ng-controller="indexController as index">
<!-- Left menu --> <!-- 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> <div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
</ion-side-menu> </ion-side-menu>
<!-- Main content --> <!-- Main content -->
<ion-side-menu-content drag-content="index.isCordova && index.allowSideBar"> <ion-side-menu-content drag-content="index.isCordova && index.allowSideBar">
<div notifications="right top"></div> <div notifications="right top"></div>
<div id="sectionContainer"> <div id="sectionContainer">

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('disclaimerController', 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; var self = this;
self.tries = 0; self.tries = 0;
var isCordova = platformInfo.isCordova; var isCordova = platformInfo.isCordova;
@ -62,6 +62,7 @@ angular.module('copayApp.controllers').controller('disclaimerController',
if (err) $log.error(err); if (err) $log.error(err);
else { else {
$ionicSideMenuDelegate.canDragContent(true); $ionicSideMenuDelegate.canDragContent(true);
$rootScope.$emit('disclaimerAccepted');
go.walletHome(); go.walletHome();
} }
}); });

View file

@ -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) { function strip(number) {
return (parseFloat(number.toPrecision(12))); return (parseFloat(number.toPrecision(12)));
}; };
@ -1410,6 +1416,12 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.tab = 'walletHome'; self.tab = 'walletHome';
}); });
$rootScope.$on('disclaimerAccepted', function(event) {
profileService.isDisclaimerAccepted(function(val) {
$scope.isDisclaimerAccepted = val;
});
});
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) { $rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
if (self.isInFocus(walletId)) { if (self.isInFocus(walletId)) {