adding Copay feedback flow
This commit is contained in:
parent
aeea866623
commit
57ea60d8a6
8 changed files with 44 additions and 14 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<ion-nav-bar class="bar-royal">
|
||||
<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">
|
||||
<button ng-show="!fromSettings" class="button no-border" ng-click="close()" translate>
|
||||
Finish
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
<div class="feedback-title" translate>Thank you!</div>
|
||||
<img src="img/ico-positive-feedback.svg" class="share-the-love-illustration"/>
|
||||
<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 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 class="rate-buttons">
|
||||
<button type="submit" class="button button-standard button-primary" ng-click="goAppStore()">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="card" id="rate-card" ng-controller="rateCardController">
|
||||
<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>
|
||||
</div>
|
||||
<div class="row item item-sub" ng-class="{'row-margin': isModal}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue