diff --git a/src/js/controllers/feedback/complete.js b/src/js/controllers/feedback/complete.js index 836142143..16b38028e 100644 --- a/src/js/controllers/feedback/complete.js +++ b/src/js/controllers/feedback/complete.js @@ -32,6 +32,7 @@ angular.module('copayApp.controllers').controller('completeController', function $scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null; $scope.skipped = (data.stateParams && data.stateParams.skipped) ? true : false; + $scope.rated = (data.stateParams && data.stateParams.rated) ? true : false; storageService.getFeedbackInfo(function(error, info) { var feedbackInfo = lodash.isString(info) ? JSON.parse(info) : null; @@ -40,6 +41,7 @@ angular.module('copayApp.controllers').controller('completeController', function }); if (!$scope.isCordova) return; + $scope.animate = true; window.plugins.socialsharing.available(function(isAvailable) { // the boolean is only false on iOS < 6 diff --git a/src/js/controllers/feedback/rateApp.js b/src/js/controllers/feedback/rateApp.js index b72b07433..573a2ca7b 100644 --- a/src/js/controllers/feedback/rateApp.js +++ b/src/js/controllers/feedback/rateApp.js @@ -8,24 +8,20 @@ angular.module('copayApp.controllers').controller('rateAppController', function( var config = configService.getSync(); $scope.skip = function() { - var dataSrc = { "Email": lodash.values(config.emailFor)[0] || ' ', "Feedback": ' ', "Score": $stateParams.score }; - - ongoingProcess.set('sendingFeedback', true); feedbackService.send(dataSrc, function(err) { - ongoingProcess.set('sendingFeedback', false); if (err) { - popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback')); - return; + // try to send, but not essential, since the user didn't add a message + $log.warn('Could not send feedback.'); } - $state.go('tabs.rate.complete', { - score: $stateParams.score, - skipped: true - }); + }); + $state.go('tabs.rate.complete', { + score: $stateParams.score, + skipped: true }); }; @@ -42,5 +38,9 @@ angular.module('copayApp.controllers').controller('rateAppController', function( if (isIOS) url = defaults.rateApp.ios; // if (isWP) url = defaults.rateApp.windows; // TODO externalLinkService.open(url); + $state.go('tabs.rate.complete', { + score: $stateParams.score, + rated: true + }); }; }); diff --git a/src/js/controllers/feedback/rateCard.js b/src/js/controllers/feedback/rateCard.js index d2c92053a..f08ab41c8 100644 --- a/src/js/controllers/feedback/rateCard.js +++ b/src/js/controllers/feedback/rateCard.js @@ -6,6 +6,7 @@ angular.module('copayApp.controllers').controller('rateCardController', function $scope.score = 0; $scope.goFeedbackFlow = function() { + $scope.hideCard(); if ($scope.isCordova && $scope.score == 5) { $state.go('tabs.rate.rateApp', { score: $scope.score diff --git a/src/js/controllers/feedback/send.js b/src/js/controllers/feedback/send.js index 5a67fb916..d36c43c02 100644 --- a/src/js/controllers/feedback/send.js +++ b/src/js/controllers/feedback/send.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) { - $scope.sendFeedback = function(feedback, skip) { + $scope.sendFeedback = function(feedback, skip, goHome) { var config = configService.getSync(); @@ -15,11 +15,12 @@ angular.module('copayApp.controllers').controller('sendController', function($sc "DeviceVersion": ionic.Platform.version() }; - ongoingProcess.set('sendingFeedback', true); + if(!(goHome || skip)) ongoingProcess.set('sendingFeedback', true); feedbackService.send(dataSrc, function(err) { + if(goHome || skip) return; ongoingProcess.set('sendingFeedback', false); if (err) { - popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback')); + popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Feedback could not be submitted. Please try again later.')); return; } if (!$stateParams.score) { @@ -30,7 +31,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc historyRoot: true }); $ionicHistory.goBack(); - }); + }, gettextCatalog.getString('Finish')); return; } $state.go('tabs.rate.complete', { @@ -38,6 +39,14 @@ angular.module('copayApp.controllers').controller('sendController', function($sc skipped: skip }); }); + if(goHome){ + $state.go('tabs.home'); + } else if(skip) { + $state.go('tabs.rate.complete', { + score: $stateParams.score, + skipped: skip + }); + } }; $scope.$on("$ionicView.beforeEnter", function(event, data) { @@ -71,7 +80,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc $scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay.") + ' ' + gettextCatalog.getString("Is there anything we could do better?"); break; default: - $scope.reaction = gettextCatalog.getString("Feedback!"); + $scope.reaction = gettextCatalog.getString("Send Feedback"); $scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay. How could we improve your experience?"); break; } diff --git a/src/sass/views/feedback/complete.scss b/src/sass/views/feedback/complete.scss index 52de5bea7..729d0393f 100644 --- a/src/sass/views/feedback/complete.scss +++ b/src/sass/views/feedback/complete.scss @@ -3,8 +3,9 @@ .close-button { color: $dark-gray; position: absolute; - top: 10px; - right: 15px; + top: 5px; + right: 10px; + padding: 15px; font-size: 36px; } .complete-layout { @@ -13,11 +14,22 @@ height: 100%; &__expand { display: flex; + flex-direction: column; flex-grow: 1; align-items: center; justify-content: center; + text-align: center; + opacity: 0; + transition: opacity .3s; + &.fade-in { + opacity: 1; + } } } + .share-the-love-illustration { + width: 5rem; + margin: 1rem; + } .title { font-size: 20px; font-weight: bold; @@ -45,14 +57,23 @@ height: 50px; } .share-buttons { - padding: 50px 10px; + padding: 50px 10px 30px; background-color: $subtle-gray; text-align: center; + transition: transform .3s cubic-bezier(0.4, 0.0, 0.2, 1) .2s, opacity .5s ease-in .2s; + transform: translateY(100%); + opacity: 0; + &.slide-up { + transform: translateY(0); + opacity: 1; + } } .share-buttons__action { display: inline-block; color: #667; font-size: .9rem; width: 90px; + height: 90px; + margin-bottom: 20px; } } diff --git a/src/sass/views/feedback/send.scss b/src/sass/views/feedback/send.scss index 2277729f1..654ad5924 100644 --- a/src/sass/views/feedback/send.scss +++ b/src/sass/views/feedback/send.scss @@ -28,9 +28,11 @@ } .user-feedback { border-top: 1px solid $subtle-gray; + border-bottom: 1px solid $subtle-gray; padding: 20px; width: 100%; margin-bottom: 20px; + -webkit-appearance: none; } .send-feedback-star { height: 1rem; diff --git a/www/img/icon-language.svg b/www/img/icon-language.svg index 15adeb549..83c23aaa9 100644 --- a/www/img/icon-language.svg +++ b/www/img/icon-language.svg @@ -5,7 +5,7 @@ Created with sketchtool. - + @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/www/img/icon-notifications.svg b/www/img/icon-notifications.svg index 2da739440..b09e32fed 100644 --- a/www/img/icon-notifications.svg +++ b/www/img/icon-notifications.svg @@ -5,7 +5,7 @@ Created with sketchtool. - + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/www/img/icon-send-feedback.svg b/www/img/icon-send-feedback.svg index 1fc621c07..dc920f28a 100644 --- a/www/img/icon-send-feedback.svg +++ b/www/img/icon-send-feedback.svg @@ -5,7 +5,7 @@ Created with sketchtool. - + @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/www/img/illustration-send-feedback.png b/www/img/illustration-send-feedback.png index 13f5b6ccd..3d3b451a1 100644 Binary files a/www/img/illustration-send-feedback.png and b/www/img/illustration-send-feedback.png differ diff --git a/www/views/feedback/complete.html b/www/views/feedback/complete.html index 37e450e85..e67ed2789 100644 --- a/www/views/feedback/complete.html +++ b/www/views/feedback/complete.html @@ -1,81 +1,51 @@ -
-
-
Invite friends to BitPay!
-
- - - -
-
- Share the love by inviting your friends. -
-
-
-
Thank you!
-
- A member of the team will review your feedback as soon as possible. -
-
- If you have additional feedback, please let us know by tapping the "Send feedback" option in the Settings tab. -
-
-
- - - +
+
+
+
Thank you!
+
+
Share BitPay
+
-
-
-
-
Thank you!
-
- A member of the team will review your feedback as soon as possible. -
-
- If you have additional feedback, please let us know by tapping the "Send feedback" option in the Settings tab. -
-
-
+
A member of the team will review your feedback as soon as possible.
+ +
Share the love by inviting your friends.
+
If you have additional feedback, please let us know by tapping the "Send feedback" option in the Settings tab.
+
-
- Share the love by inviting your friends. -
-
-