term of use page fixes

This commit is contained in:
Gabriel Bazán 2015-11-30 17:33:39 -03:00
commit 17003bc1c1
3 changed files with 17 additions and 14 deletions

View file

@ -18,7 +18,7 @@
ng-controller="indexController as index" ng-controller="indexController as index"
ng-swipe-disable-mouse ng-swipe-disable-mouse
ng-swipe-left="index.closeMenu()" ng-swipe-left="index.closeMenu()"
ng-swipe-right="index.agreeDisclaimer ? index.openMenu() : null"> ng-swipe-right="index.agreeDisclaimer() ? index.openMenu() : null">
<div class="off-canvas-wrap" id="off-canvas-wrap"> <div class="off-canvas-wrap" id="off-canvas-wrap">
<div class="inner-wrap"> <div class="inner-wrap">

View file

@ -1,18 +1,16 @@
<div class="splash content text-center">
<div <div
class="topbar-container" class="topbar-container"
ng-include="'views/includes/topbar.html'" ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Terms of use'; goBackToState = 'about'; noColor = true"> ng-init="titleSection='Terms of use'; goBackToState = 'about'; noColor = true">
</div> </div>
<div class="scrollArea" style="height: 80vh;"> <div class="content">
<p class="enable_text_select m0"> <p class="enable_text_select m0">
<div ng-include="'views/includes/terms.html'"></div> <div ng-include="'views/includes/terms.html'"></div>
</p> </p>
</div> <div class="row text-center">
<div class="row"> <p ng-show="lang != 'en'">
<p ng-show="lang != 'en'"> <a class="center" ng-click="$root.openExternalLink('https://copay.io/disclaimer')" translate>Official English Disclaimer</a>
<a class="center" ng-click="$root.openExternalLink('https://copay.io/disclaimer')" translate>Official English Disclaimer</a> </p>
</p> </div>
</div> </div>
<div class="extra-margin-bottom"></div> <div class="extra-margin-bottom"></div>
</div>

View file

@ -135,9 +135,14 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.openWallet(); self.openWallet();
}); });
} }
storageService.getProfile(function(err, profile) { });
self.agreeDisclaimer = profile.agreeDisclaimer; };
});
self.agreeDisclaimer = function() {
storageService.getProfile(function(err, profile) {
if (profile && profile.agreeDisclaimer)
return profile.agreeDisclaimer;
return null;
}); });
}; };
@ -1328,8 +1333,8 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Local/NewFocusedWallet', function() { $rootScope.$on('Local/NewFocusedWallet', function() {
self.setFocusedWallet(); self.setFocusedWallet();
self.updateTxHistory(); self.updateTxHistory();
storageService.getProfile(function(err, val) { storageService.getProfile(function(err, profile) {
if (val.agreeDisclaimer) go.walletHome(); if (profile && profile.agreeDisclaimer) go.walletHome();
storageService.getCleanAndScanAddresses(function(err, walletId) { storageService.getCleanAndScanAddresses(function(err, walletId) {
if (walletId && profileService.walletClients[walletId]) { if (walletId && profileService.walletClients[walletId]) {
$log.debug('Clear last address cache and Scan ', walletId); $log.debug('Clear last address cache and Scan ', walletId);