commit
22c06c73a3
21 changed files with 73 additions and 115 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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: '<ion-nav-view name="onboarding"></ion-nav-view>',
|
||||
params: {
|
||||
walletId: null,
|
||||
fromOnboarding: null,
|
||||
},
|
||||
template: '<ion-nav-view name="onboarding"></ion-nav-view>'
|
||||
})
|
||||
.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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue