From f8fddd2431820a95cdc2b77aa165375cbe13697e Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Fri, 2 Sep 2016 13:00:38 -0300 Subject: [PATCH] Fix topbar for mobile --- app-template/config.xml | 5 +- public/index.html | 1 - public/views/onboarding/backupRequest.html | 2 +- public/views/onboarding/backupWarning.html | 2 +- public/views/onboarding/collectEmail.html | 2 +- public/views/onboarding/notifications.html | 2 +- public/views/onboarding/tour.html | 4 +- public/views/onboarding/welcome.html | 2 +- src/js/controllers/onboarding/collectEmail.js | 4 ++ src/js/controllers/tab-settings.js | 3 -- src/js/routes.js | 50 ++----------------- .../views/onboarding/onboard-welcome.scss | 4 +- 12 files changed, 18 insertions(+), 63 deletions(-) diff --git a/app-template/config.xml b/app-template/config.xml index 635456255..84952a749 100644 --- a/app-template/config.xml +++ b/app-template/config.xml @@ -21,9 +21,8 @@ - - - + + diff --git a/public/index.html b/public/index.html index cef1fb09e..fe0611bae 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,6 @@ - {{appConfig.nameCase}} - {{appConfig.description}} diff --git a/public/views/onboarding/backupRequest.html b/public/views/onboarding/backupRequest.html index 3802772fd..6044406d5 100644 --- a/public/views/onboarding/backupRequest.html +++ b/public/views/onboarding/backupRequest.html @@ -1,7 +1,7 @@
- +

diff --git a/public/views/onboarding/backupWarning.html b/public/views/onboarding/backupWarning.html index 7b5e173af..a6f0bafee 100644 --- a/public/views/onboarding/backupWarning.html +++ b/public/views/onboarding/backupWarning.html @@ -18,7 +18,7 @@

- +

diff --git a/public/views/onboarding/collectEmail.html b/public/views/onboarding/collectEmail.html index ca3afbd94..edcc2c96e 100644 --- a/public/views/onboarding/collectEmail.html +++ b/public/views/onboarding/collectEmail.html @@ -8,7 +8,7 @@

- +

Wallet Created

diff --git a/public/views/onboarding/notifications.html b/public/views/onboarding/notifications.html index 555a06d08..3d5b3f6f9 100644 --- a/public/views/onboarding/notifications.html +++ b/public/views/onboarding/notifications.html @@ -10,7 +10,7 @@ - +
diff --git a/public/views/onboarding/tour.html b/public/views/onboarding/tour.html index 3524f8231..8df77f256 100644 --- a/public/views/onboarding/tour.html +++ b/public/views/onboarding/tour.html @@ -2,12 +2,12 @@ - - diff --git a/public/views/onboarding/welcome.html b/public/views/onboarding/welcome.html index 05459b33d..1c97d5274 100644 --- a/public/views/onboarding/welcome.html +++ b/public/views/onboarding/welcome.html @@ -3,7 +3,7 @@
- +

diff --git a/src/js/controllers/onboarding/collectEmail.js b/src/js/controllers/onboarding/collectEmail.js index b5dbfc739..58122bd74 100644 --- a/src/js/controllers/onboarding/collectEmail.js +++ b/src/js/controllers/onboarding/collectEmail.js @@ -30,4 +30,8 @@ angular.module('copayApp.controllers').controller('collectEmailController', func }); }); }; + + $scope.onboardingMailSkip = function() { + $state.go('onboarding.backupRequest'); + }; }); diff --git a/src/js/controllers/tab-settings.js b/src/js/controllers/tab-settings.js index e4edb47d4..ca45e1411 100644 --- a/src/js/controllers/tab-settings.js +++ b/src/js/controllers/tab-settings.js @@ -30,9 +30,6 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct $scope.glideraEnabled = config.glidera.enabled; $scope.coinbaseEnabled = config.coinbase.enabled; $scope.pushNotifications = config.pushNotifications.enabled; - if (isCordova && StatusBar.isVisible) { - StatusBar.backgroundColorByHexString("#4B6178"); - } $scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) { return w.id != self.walletId; }); diff --git a/src/js/routes.js b/src/js/routes.js index 501d46f26..b3878fce1 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -254,12 +254,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr url: '/add', views: { 'tab-home': { - templateUrl: 'views/add.html', - controller: function(platformInfo) { - if (platformInfo.isCordova && StatusBar.isVisible) { - StatusBar.backgroundColorByHexString("#4B6178"); - } - } + templateUrl: 'views/add.html' } } }) @@ -807,54 +802,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }) .run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService) { - if (platformInfo.isCordova) { - if (screen.width < 768) { - screen.lockOrientation('portrait'); - } else { - window.addEventListener("orientationchange", function() { - var leftMenuWidth = document.querySelector("ion-side-menu[side='left']").clientWidth; - if (screen.orientation.includes('portrait')) { - // Portrait - document.querySelector("ion-side-menu-content").style.width = (screen.width - leftMenuWidth) + "px"; - } else { - // Landscape - document.querySelector("ion-side-menu-content").style.width = (screen.height - leftMenuWidth) + "px"; - } - }); - } - } else { - if (screen.width >= 768) { - window.addEventListener('resize', lodash.throttle(function() { - $rootScope.$emit('Local/WindowResize'); - }, 100)); - } - } - uxLanguage.init(); openURLService.init(); $ionicPlatform.ready(function() { if (platformInfo.isCordova) { - window.addEventListener('native.keyboardhide', function() { - $timeout(function() { - $rootScope.shouldHideMenuBar = false; //show menu bar when keyboard is hidden with back button action on send screen - }, 100); - }); - - window.addEventListener('native.keyboardshow', function() { - $timeout(function() { - $rootScope.shouldHideMenuBar = true; //hide menu bar when keyboard opens with back button action on send screen - }, 300); - }); - if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); cordova.plugins.Keyboard.disableScroll(true); } - if (window.StatusBar) { - StatusBar.styleLightContent(); - } $ionicPlatform.registerBackButtonAction(function(e) { @@ -873,8 +830,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, 5000); } e.preventDefault(); - }, - 101); + }, 101); $ionicPlatform.on('pause', function() { // Nothing to do @@ -890,7 +846,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr setTimeout(function() { navigator.splashscreen.hide(); - }, 1000); + }, 500); } diff --git a/src/sass/views/onboarding/onboard-welcome.scss b/src/sass/views/onboarding/onboard-welcome.scss index 8e40facd9..84d206d20 100644 --- a/src/sass/views/onboarding/onboard-welcome.scss +++ b/src/sass/views/onboarding/onboard-welcome.scss @@ -7,7 +7,7 @@ #shopping-24 { content: url("../img/onboarding-welcome-shopping24.png"); position: absolute; - top: 2%; + top: 5%; right: 5%; width: 35px; height: auto; @@ -17,7 +17,7 @@ @include center-block(); } .logo { - margin-top: 15rem; + margin-top: 13rem; } button { @include center-block(1rem);