Merge pull request #3 from gabrielbazan7/ref/allowNotif
onboarding allow push notifications
This commit is contained in:
commit
d2b209c75a
8 changed files with 38 additions and 28 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupRequestController', function($rootScope, $scope, $state, $ionicPopup, $stateParams, profileService, walletService) {
|
||||
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $ionicPopup) {
|
||||
|
||||
$scope.openPopup = function() {
|
||||
var backupLaterPopup = $ionicPopup.show({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($rootScope, $scope, $state, $ionicPopup, $stateParams, profileService, walletService) {
|
||||
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $ionicPopup, profileService) {
|
||||
|
||||
$scope.openPopup = function() {
|
||||
var backupWarningPopup = $ionicPopup.show({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('collectEmailController', function($rootScope, $scope, $state, $stateParams, $timeout, $ionicModal, profileService, walletService) {
|
||||
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, profileService, walletService, platformInfo) {
|
||||
|
||||
var usePushNotifications = platformInfo.isCordova && !isWP;
|
||||
|
||||
$scope.skip = function() {
|
||||
if (!usePushNotifications) $state.go('onboarding.backupRequest');
|
||||
else $state.go('onboarding.notifications');
|
||||
}
|
||||
|
||||
$scope.save = function(form) {
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
|
|
@ -10,7 +17,8 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
|
|||
email: email,
|
||||
}, function(err) {
|
||||
if (err) $log.warn(err);
|
||||
$state.go('onboarding.notifications');
|
||||
if (!usePushNotifications) $state.go('onboarding.backupRequest');
|
||||
else $state.go('onboarding.notifications');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, platformInfo) {
|
||||
|
||||
if (!platformInfo.isCordova) $state.go('onboarding.backupRequest');
|
||||
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, profileService) {
|
||||
|
||||
$scope.allowNotif = function() {
|
||||
// T O D O
|
||||
profileService.pushNotificationsInit();
|
||||
$state.go('onboarding.backupRequest');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.controllers').controller('tourController',
|
||||
function($scope, $stateParams, $state, $log, $timeout, ongoingProcess, storageService, profileService) {
|
||||
function($scope, $state, $log, $timeout, ongoingProcess, profileService) {
|
||||
|
||||
$scope.init = function() {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue