delete popup rate card from settings
This commit is contained in:
parent
511730ecd3
commit
8e7e950eb2
10 changed files with 92 additions and 69 deletions
|
|
@ -6,10 +6,6 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
$scope.score = 0;
|
||||
|
||||
$scope.goFeedbackFlow = function() {
|
||||
if ($scope.isModal) {
|
||||
$scope.rateModal.hide();
|
||||
$scope.rateModal.remove();
|
||||
}
|
||||
if ($scope.isCordova && $scope.score == 5) {
|
||||
$state.go('feedback.rateApp', {
|
||||
score: $scope.score
|
||||
|
|
@ -46,21 +42,16 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
|||
};
|
||||
|
||||
$scope.hideCard = function() {
|
||||
if ($scope.isModal) {
|
||||
$scope.rateModal.hide();
|
||||
$scope.rateModal.remove();
|
||||
} else {
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = JSON.parse(info);
|
||||
feedbackInfo.sent = true;
|
||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
||||
$scope.showRateCard.value = false;
|
||||
});
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = JSON.parse(info);
|
||||
feedbackInfo.sent = true;
|
||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
||||
$scope.showRateCard.value = false;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,29 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $stateParams, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 2:
|
||||
$scope.reaction = gettextCatalog.getString("Oh no!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 3:
|
||||
$scope.reaction = gettextCatalog.getString("Hmm...");
|
||||
$scope.comment = gettextCatalog.getString("We'd love to do better.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 4:
|
||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you – how could we improve your experience?");
|
||||
break;
|
||||
case 5:
|
||||
$scope.reaction = gettextCatalog.getString("Thank you!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.") + ' ' + gettextCatalog.getString("Is there anything we could do better?");
|
||||
break;
|
||||
}
|
||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||
|
||||
$scope.sendFeedback = function(feedback, skip) {
|
||||
|
||||
|
|
@ -32,7 +9,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
var dataSrc = {
|
||||
"Email": lodash.values(config.emailFor)[0] || ' ',
|
||||
"Feedback": skip ? ' ' : feedback,
|
||||
"Score": $stateParams.score
|
||||
"Score": $stateParams.score || ' '
|
||||
};
|
||||
|
||||
ongoingProcess.set('sendingFeedback', true);
|
||||
|
|
@ -42,6 +19,14 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback'));
|
||||
return;
|
||||
}
|
||||
if (!$stateParams.score) {
|
||||
popupService.showAlert(gettextCatalog.getString('Thank you!'), gettextCatalog.getString('A member of the team will review your feedback as soon as possible.'));
|
||||
$scope.feedback.value = '';
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
return;
|
||||
}
|
||||
$state.go('feedback.complete', {
|
||||
score: $stateParams.score,
|
||||
skipped: skip
|
||||
|
|
@ -49,4 +34,36 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
|||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.score = parseInt($stateParams.score);
|
||||
$scope.feedback = {};
|
||||
|
||||
switch ($scope.score) {
|
||||
case 1:
|
||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 2:
|
||||
$scope.reaction = gettextCatalog.getString("Oh no!");
|
||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 3:
|
||||
$scope.reaction = gettextCatalog.getString("Hmm...");
|
||||
$scope.comment = gettextCatalog.getString("We'd love to do better.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||
break;
|
||||
case 4:
|
||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you – how could we improve your experience?");
|
||||
break;
|
||||
case 5:
|
||||
$scope.reaction = gettextCatalog.getString("Thank you!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.") + ' ' + gettextCatalog.getString("Is there anything we could do better?");
|
||||
break;
|
||||
default:
|
||||
$scope.reaction = gettextCatalog.getString("Feedback!");
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet. How could we improve your experience?");
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
|
|||
|
|
@ -32,15 +32,4 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
updateConfig();
|
||||
});
|
||||
|
||||
$scope.openRateModal = function() {
|
||||
$scope.isModal = true;
|
||||
$ionicModal.fromTemplateUrl('views/feedback/rateCard.html', {
|
||||
scope: $scope,
|
||||
backdropClickToClose: false,
|
||||
hardwareBackButtonClose: false
|
||||
}).then(function(modal) {
|
||||
$scope.rateModal = modal;
|
||||
$scope.rateModal.show();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue