diff --git a/src/js/controllers/feedback/complete.js b/src/js/controllers/feedback/complete.js index 8c6d9f140..8b3fe711c 100644 --- a/src/js/controllers/feedback/complete.js +++ b/src/js/controllers/feedback/complete.js @@ -1,7 +1,11 @@ 'use strict'; -angular.module('copayApp.controllers').controller('completeController', function($scope, $stateParams, $timeout, $log, $ionicHistory, $state, $ionicNavBarDelegate, $ionicConfig, platformInfo, configService, storageService, lodash) { +angular.module('copayApp.controllers').controller('completeController', function($scope, $stateParams, $timeout, $log, $ionicHistory, $state, $ionicNavBarDelegate, $ionicConfig, platformInfo, configService, storageService, lodash, appConfigService, gettextCatalog) { $scope.isCordova = platformInfo.isCordova; + $scope.title = gettextCatalog.getString("Share {{appName}}", { + appName: appConfigService.nameCase + }); + var defaults = configService.getDefaults(); function quickFeedback(cb) { diff --git a/src/js/controllers/feedback/rateApp.js b/src/js/controllers/feedback/rateApp.js index e94982e03..37313fef2 100644 --- a/src/js/controllers/feedback/rateApp.js +++ b/src/js/controllers/feedback/rateApp.js @@ -1,7 +1,8 @@ 'use strict'; -angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, $window, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService) { +angular.module('copayApp.controllers').controller('rateAppController', function($scope, $state, $stateParams, $window, lodash, externalLinkService, configService, platformInfo, feedbackService, ongoingProcess, popupService, appConfigService) { $scope.score = parseInt($stateParams.score); + $scope.appName = appConfigService.nameCase; var isAndroid = platformInfo.isAndroid; var isIOS = platformInfo.isIOS; var isWP = platformInfo.isWP; @@ -37,9 +38,24 @@ angular.module('copayApp.controllers').controller('rateAppController', function( $scope.goAppStore = function() { var defaults = configService.getDefaults(); var url; - if (isAndroid) url = defaults.rateApp.android; - if (isIOS) url = defaults.rateApp.ios; - // if (isWP) url = defaults.rateApp.windows; // TODO + if (isAndroid) { + if ($scope.appName == 'Copay') + url = defaults.rateCopay.android; + if ($scope.appName == 'BitPay') + url = defaults.rateBitPay.android; + } + if (isIOS) { + if ($scope.appName == 'Copay') + url = defaults.rateCopay.ios; + if ($scope.appName == 'BitPay') + url = defaults.rateBitPay.ios; + } + // if (isWP) { + // if ($scope.appName == 'Copay') + // url = defaults.rateCopay.windows; + // if ($scope.appName == 'BitPay') + // url = defaults.rateBitPay.windows; + // } externalLinkService.open(url); $state.go('tabs.rate.complete', { score: $stateParams.score, diff --git a/src/js/controllers/feedback/rateCard.js b/src/js/controllers/feedback/rateCard.js index a8162b061..abc109796 100644 --- a/src/js/controllers/feedback/rateCard.js +++ b/src/js/controllers/feedback/rateCard.js @@ -1,9 +1,10 @@ 'use strict'; -angular.module('copayApp.controllers').controller('rateCardController', function($scope, $state, $timeout, $log, gettextCatalog, platformInfo, storageService) { +angular.module('copayApp.controllers').controller('rateCardController', function($scope, $state, $timeout, $log, gettextCatalog, platformInfo, storageService, appConfigService) { $scope.isCordova = platformInfo.isCordova; $scope.score = 0; + $scope.appName = appConfigService.nameCase; $scope.goFeedbackFlow = function() { $scope.hideCard(); diff --git a/src/js/controllers/feedback/send.js b/src/js/controllers/feedback/send.js index 7be7687ff..23fb0ea59 100644 --- a/src/js/controllers/feedback/send.js +++ b/src/js/controllers/feedback/send.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo) { +angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, $ionicHistory, $ionicConfig, $window, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess, platformInfo, appConfigService) { $scope.sendFeedback = function(feedback, goHome) { @@ -74,11 +74,15 @@ angular.module('copayApp.controllers').controller('sendController', function($sc break; case 5: $scope.reaction = gettextCatalog.getString("Thank you!"); - $scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay.") + ' ' + gettextCatalog.getString("Is there anything we could do better?"); + $scope.comment = gettextCatalog.getString("We're always looking for ways to improve {{appName}}.", { + appName: appConfigService.nameCase + }) + ' ' + gettextCatalog.getString("Is there anything we could do better?"); break; default: $scope.justFeedback = true; - $scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay. How could we improve your experience?"); + $scope.comment = gettextCatalog.getString("We're always looking for ways to improve {{appName}}. How could we improve your experience?", { + appName: appConfigService.nameCase + }); break; } }); diff --git a/src/js/services/configService.js b/src/js/services/configService.js index 9e447f7b9..e68fba24c 100644 --- a/src/js/services/configService.js +++ b/src/js/services/configService.js @@ -19,12 +19,17 @@ angular.module('copayApp.services').factory('configService', function(storageSer url: 'https://bitpay.com/wallet', }, - rateApp: { + rateBitPay: { ios: 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1149581638&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8', android: 'https://play.google.com/store/apps/details?id=com.bitpay.wallet', wp: '' }, + rateCopay: { + ios: 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=951330296&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8', + android: 'https://play.google.com/store/apps/details?id=com.bitpay.copay', + wp: '' + }, // wallet default config wallet: { requiredCopayers: 2, diff --git a/www/views/feedback/complete.html b/www/views/feedback/complete.html index ff0dae44c..eda4335e2 100644 --- a/www/views/feedback/complete.html +++ b/www/views/feedback/complete.html @@ -2,7 +2,7 @@ - {{'Share BitPay' | translate}} + {{title}}