Merge pull request #5744 from gabrielbazan7/feat/copayfeedback

adding Copay feedback flow
This commit is contained in:
Javier Donadío 2017-03-09 14:52:01 -03:00 committed by GitHub
commit 88f0fa1c47
8 changed files with 37 additions and 17 deletions

View File

@ -1,7 +1,11 @@
'use strict'; '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.isCordova = platformInfo.isCordova;
$scope.title = gettextCatalog.getString("Share {{appName}}", {
appName: appConfigService.nameCase
});
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
function quickFeedback(cb) { function quickFeedback(cb) {

View File

@ -1,7 +1,8 @@
'use strict'; '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.score = parseInt($stateParams.score);
$scope.appName = appConfigService.nameCase;
var isAndroid = platformInfo.isAndroid; var isAndroid = platformInfo.isAndroid;
var isIOS = platformInfo.isIOS; var isIOS = platformInfo.isIOS;
var isWP = platformInfo.isWP; var isWP = platformInfo.isWP;
@ -37,9 +38,13 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
$scope.goAppStore = function() { $scope.goAppStore = function() {
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
var url; var url;
if (isAndroid) url = defaults.rateApp.android; if (isAndroid)
if (isIOS) url = defaults.rateApp.ios; url = $scope.appName == 'Copay' ? defaults.rateApp.copay.android : defaults.rateApp.bitpay.android;
// if (isWP) url = defaults.rateApp.windows; // TODO if (isIOS)
url = $scope.appName == 'Copay' ? defaults.rateApp.copay.ios : defaults.rateApp.bitpay.ios;
// if (isWP)
// url = $scope.appName == 'Copay' ? defaults.rateApp.copay.windows : defaults.rateApp.bitpay.windows;
externalLinkService.open(url); externalLinkService.open(url);
$state.go('tabs.rate.complete', { $state.go('tabs.rate.complete', {
score: $stateParams.score, score: $stateParams.score,

View File

@ -1,9 +1,10 @@
'use strict'; '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.isCordova = platformInfo.isCordova;
$scope.score = 0; $scope.score = 0;
$scope.appName = appConfigService.nameCase;
$scope.goFeedbackFlow = function() { $scope.goFeedbackFlow = function() {
$scope.hideCard(); $scope.hideCard();

View File

@ -1,6 +1,6 @@
'use strict'; '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) { $scope.sendFeedback = function(feedback, goHome) {
@ -74,11 +74,15 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
break; break;
case 5: case 5:
$scope.reaction = gettextCatalog.getString("Thank you!"); $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; break;
default: default:
$scope.justFeedback = true; $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; break;
} }
}); });

View File

@ -20,11 +20,17 @@ angular.module('copayApp.services').factory('configService', function(storageSer
}, },
rateApp: { rateApp: {
ios: 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1149581638&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8', bitpay: {
android: 'https://play.google.com/store/apps/details?id=com.bitpay.wallet', ios: 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=1149581638&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8',
wp: '' android: 'https://play.google.com/store/apps/details?id=com.bitpay.wallet',
wp: ''
},
copay: {
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 default config
wallet: { wallet: {
requiredCopayers: 2, requiredCopayers: 2,

View File

@ -2,7 +2,7 @@
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal">
<ion-nav-back-button> <ion-nav-back-button>
</ion-nav-back-button> </ion-nav-back-button>
<ion-nav-title>{{'Share BitPay' | translate}}</ion-nav-title> <ion-nav-title>{{title}}</ion-nav-title>
<ion-nav-buttons side="secondary"> <ion-nav-buttons side="secondary">
<button ng-show="!fromSettings" class="button no-border" ng-click="close()" translate> <button ng-show="!fromSettings" class="button no-border" ng-click="close()" translate>
Finish Finish

View File

@ -4,10 +4,10 @@
<div class="feedback-title" translate>Thank you!</div> <div class="feedback-title" translate>Thank you!</div>
<img src="img/ico-positive-feedback.svg" class="share-the-love-illustration"/> <img src="img/ico-positive-feedback.svg" class="share-the-love-illustration"/>
<div class="subtitle"> <div class="subtitle">
<span translate>5-star ratings help us get BitPay into more hands, and more users means more resources can be committed to the app!</span> <span translate>5-star ratings help us get {{appName}} into more hands, and more users means more resources can be committed to the app!</span>
</div> </div>
<div class="subtitle"> <div class="subtitle">
<span class="text-bold" translate>Would you be willing to rate BitPay in the app store?</span> <span class="text-bold" translate>Would you be willing to rate {{appName}} in the app store?</span>
</div> </div>
<div class="rate-buttons"> <div class="rate-buttons">
<button type="submit" class="button button-standard button-primary" ng-click="goAppStore()"> <button type="submit" class="button button-standard button-primary" ng-click="goAppStore()">

View File

@ -1,6 +1,6 @@
<div class="card" id="rate-card" ng-controller="rateCardController"> <div class="card" id="rate-card" ng-controller="rateCardController">
<div class="item item-icon-right item-heading"> <div class="item item-icon-right item-heading">
<span translate>How do you like BitPay?</span> <span translate>How do you like {{appName}}?</span>
<a ng-click="hideCard()" ><i class="icon ion-ios-close-empty close-home-tip"></i></a> <a ng-click="hideCard()" ><i class="icon ion-ios-close-empty close-home-tip"></i></a>
</div> </div>
<div class="row item item-sub" ng-class="{'row-margin': isModal}"> <div class="row item item-sub" ng-class="{'row-margin': isModal}">