diff --git a/Gruntfile.js b/Gruntfile.js index ad4a457a5..1ef8ef2cf 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -69,7 +69,7 @@ module.exports = function(grunt) { tasks: ['concat:css'] }, sass: { - files: ['src/sass/**/*.scss'], + files: ['src/sass/**/**/*.scss'], tasks: ['sass', 'concat:css'] }, main: { 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/includes/backupWarningPopup.html b/public/views/includes/backupWarningPopup.html index fbe1b79fd..b5cfecee9 100644 --- a/public/views/includes/backupWarningPopup.html +++ b/public/views/includes/backupWarningPopup.html @@ -1,7 +1,7 @@

Screenshots are not secure

if you take a screenshot, your backup may be viewed by others apps. You can make a safe backup with paper and a pen. -
diff --git a/public/views/onboarding/backupRequest.html b/public/views/onboarding/backupRequest.html index 3802772fd..f7099033f 100644 --- a/public/views/onboarding/backupRequest.html +++ b/public/views/onboarding/backupRequest.html @@ -1,7 +1,7 @@
- +

@@ -17,7 +17,8 @@

- +
diff --git a/public/views/onboarding/backupWarning.html b/public/views/onboarding/backupWarning.html index 7b5e173af..d3406fb13 100644 --- a/public/views/onboarding/backupWarning.html +++ b/public/views/onboarding/backupWarning.html @@ -1,12 +1,12 @@ - - + + - - +

Are you being watched? @@ -18,7 +18,7 @@

- +

diff --git a/public/views/onboarding/collectEmail.html b/public/views/onboarding/collectEmail.html index ca3afbd94..5145b53e7 100644 --- a/public/views/onboarding/collectEmail.html +++ b/public/views/onboarding/collectEmail.html @@ -1,29 +1,27 @@ - - - - -

- +

Wallet Created

- -
-
-

Where would you like to receive email notifications about payments

+
+
+

Where would you like to receive email notifications about payments

+
+
+ +
+
+ +
-
- -
-
-
+
+ diff --git a/public/views/onboarding/notifications.html b/public/views/onboarding/notifications.html index 555a06d08..d086b1355 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/backupRequest.js b/src/js/controllers/onboarding/backupRequest.js index 60ae381f2..8284baafb 100644 --- a/src/js/controllers/onboarding/backupRequest.js +++ b/src/js/controllers/onboarding/backupRequest.js @@ -1,7 +1,8 @@ 'use strict'; -angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $ionicPopup) { +angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, $ionicPopup) { + $scope.walletId = $stateParams.walletId; $scope.openPopup = function() { var backupLaterPopup = $ionicPopup.show({ templateUrl: "views/includes/backupLaterPopup.html", diff --git a/src/js/controllers/onboarding/backupWarning.js b/src/js/controllers/onboarding/backupWarning.js index cb4aa4934..b7099ed8a 100644 --- a/src/js/controllers/onboarding/backupWarning.js +++ b/src/js/controllers/onboarding/backupWarning.js @@ -1,7 +1,8 @@ 'use strict'; -angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $ionicPopup, $stateParams, profileService) { +angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $stateParams, $ionicPopup, profileService) { + $scope.walletId = $stateParams.walletId; $scope.openPopup = function() { var backupWarningPopup = $ionicPopup.show({ templateUrl: "views/includes/backupWarningPopup.html", @@ -10,7 +11,7 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun $scope.close = function() { backupWarningPopup.close(); - $state.go('onboarding.backup'); + $state.go('onboarding.backup', {walletId: $stateParams.walletId, fromOnboarding: true}); }; } }); diff --git a/src/js/controllers/onboarding/collectEmail.js b/src/js/controllers/onboarding/collectEmail.js index b5dbfc739..8fcda40f5 100644 --- a/src/js/controllers/onboarding/collectEmail.js +++ b/src/js/controllers/onboarding/collectEmail.js @@ -25,9 +25,13 @@ angular.module('copayApp.controllers').controller('collectEmailController', func if (err) $log.warn(err); configService.set(opts, function(err) { if (err) $log.warn(err); - if (!usePushNotifications) $state.go('onboarding.backupRequest'); - else $state.go('onboarding.notifications'); + if (!usePushNotifications) $state.go('onboarding.backupRequest', {walletId: walletId}); + else $state.go('onboarding.notifications', {walletId: walletId}); }); }); }; + + $scope.onboardingMailSkip = function() { + $state.go('onboarding.backupRequest', {walletId: walletId}); + }; }); diff --git a/src/js/controllers/onboarding/notifications.js b/src/js/controllers/onboarding/notifications.js index 2b40cd65a..7f22581fd 100644 --- a/src/js/controllers/onboarding/notifications.js +++ b/src/js/controllers/onboarding/notifications.js @@ -1,7 +1,8 @@ 'use strict'; -angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, profileService) { +angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $stateParams, profileService) { + $scope.walletId = $stateParams.walletId; $scope.allowNotif = function() { profileService.pushNotificationsInit(); $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..7660ebf31 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' } } }) @@ -565,11 +560,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr .state('onboarding', { url: '/onboarding', abstract: true, - template: '', - params: { - walletId: null, - fromOnboarding: null, - }, + template: '' }) .state('onboarding.welcome', { url: '/welcome', @@ -588,7 +579,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.collectEmail', { - url: '/collectEmail', + url: '/collectEmail/:walletId', views: { 'onboarding': { templateUrl: 'views/onboarding/collectEmail.html' @@ -596,7 +587,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.notifications', { - url: '/notifications', + url: '/notifications/:walletId', views: { 'onboarding': { templateUrl: 'views/onboarding/notifications.html' @@ -604,7 +595,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.backupRequest', { - url: '/backupRequest', + url: '/backupRequest/:walletId', views: { 'onboarding': { templateUrl: 'views/onboarding/backupRequest.html' @@ -612,7 +603,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.backupWarning', { - url: '/backupWarning', + url: '/backupWarning/:walletId', views: { 'onboarding': { templateUrl: 'views/onboarding/backupWarning.html' @@ -620,7 +611,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('onboarding.backup', { - url: '/backup', + url: '/backup/:walletId/:fromOnboarding', views: { 'onboarding': { templateUrl: 'views/backup.html' @@ -652,7 +643,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, }, params: { - code: null + code: null, + fromOnboarding: null }, }) .state('onboarding.import.phrase', { @@ -807,54 +799,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 +827,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }, 5000); } e.preventDefault(); - }, - 101); + }, 101); $ionicPlatform.on('pause', function() { // Nothing to do @@ -890,7 +843,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr setTimeout(function() { navigator.splashscreen.hide(); - }, 1000); + }, 500); } diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 388d652ca..73e093336 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, bitcore) { +angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, bitcore) { var root = {}; @@ -63,10 +63,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni return $state.go('send.amount', {toAddress: data}) - // copay: protocol - } else if (data.indexOf('copay://glidera')==0) { + // Protocol + } else if (data.indexOf($window.appConfig.name + '://glidera')==0) { return $state.go('uriglidera', {url: data}) - } else if (data.indexOf('copay://coinbase')==0) { + } else if (data.indexOf($window.appConfig.name + '://coinbase')==0) { return $state.go('uricoinbase', {url: data}) // Join diff --git a/src/sass/views/onboarding/onboard-collect-email.scss b/src/sass/views/onboarding/onboard-collect-email.scss index 427ab466f..ea71241ee 100644 --- a/src/sass/views/onboarding/onboard-collect-email.scss +++ b/src/sass/views/onboarding/onboard-collect-email.scss @@ -1,5 +1,8 @@ #onboarding-collect-email { background: rgb(17, 209, 166); + .scroll { + height: 100%; + } #success-image { margin-top: 4rem; } @@ -11,17 +14,18 @@ opacity: 1; background: #fff; color: rgb(108, 108, 108); - height: 11rem; + height: 13rem; animation-name: topBottom; animation-iteration-count: 1; animation-timing-function: ease-in; animation-duration: 1s; animation-delay: 2s; position: absolute; - bottom: -100%; + bottom: -13rem; animation-fill-mode: forwards; z-index: 5; margin-top: 0; + width: 100%; label { background: rgba(200, 200, 200, 0.20); height: 3rem; 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); diff --git a/src/sass/views/onboarding/onboarding.scss b/src/sass/views/onboarding/onboarding.scss index ac2d1d698..55846f08d 100644 --- a/src/sass/views/onboarding/onboarding.scss +++ b/src/sass/views/onboarding/onboarding.scss @@ -34,7 +34,7 @@ background-size: contain; width: 100%; clear: both; - height: 20rem; + height: 23rem; margin-bottom: -3rem; background-position: center; background-repeat: no-repeat; diff --git a/src/sass/views/onboarding/terms-of-use.scss b/src/sass/views/onboarding/terms-of-use.scss index 981408c7d..39dc3371d 100644 --- a/src/sass/views/onboarding/terms-of-use.scss +++ b/src/sass/views/onboarding/terms-of-use.scss @@ -4,7 +4,7 @@ box-shadow: 0px 3px 3px 0px rgba(50, 50, 50, 0.2); } ion-content{ - margin-top:1.5rem; + padding-top: 1.5rem; color: rgba(86, 86, 86, 0.77); p{ padding:0 2.5%; @@ -14,4 +14,4 @@ } } } -} \ No newline at end of file +}