mirror of https://github.com/BTCPrivate/copay.git
fix(feedback): more feedback flow improvements and bug fixes
This commit is contained in:
parent
8b7ab38f2b
commit
63c7684259
|
@ -4,42 +4,63 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
$scope.isCordova = platformInfo.isCordova;
|
||||
var config = configService.getSync();
|
||||
|
||||
function quickFeedback(cb){
|
||||
window.plugins.spinnerDialog.show();
|
||||
$timeout(window.plugins.spinnerDialog.hide, 300);
|
||||
$timeout(cb, 20);
|
||||
}
|
||||
|
||||
$scope.shareFacebook = function() {
|
||||
window.plugins.socialsharing.shareVia($scope.shareFacebookVia, null, null, null, config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareVia($scope.shareFacebookVia, null, null, null, config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareTwitter = function() {
|
||||
window.plugins.socialsharing.shareVia($scope.shareTwitterVia, null, null, null, config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareVia($scope.shareTwitterVia, null, null, null, config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareGooglePlus = function() {
|
||||
window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareEmail = function() {
|
||||
window.plugins.socialsharing.shareViaEmail(config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareViaEmail(config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareWhatsapp = function() {
|
||||
window.plugins.socialsharing.shareViaWhatsApp(config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareViaWhatsApp(config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareMessage = function() {
|
||||
window.plugins.socialsharing.shareViaSMS(config.download.url);
|
||||
quickFeedback(function(){
|
||||
window.plugins.socialsharing.shareViaSMS(config.download.url);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
if (!$scope.fromSettings) {
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
} else {
|
||||
$ionicNavBarDelegate.showBackButton(true);
|
||||
$ionicConfig.views.swipeBackEnabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$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;
|
||||
$scope.fromSettings = (data.stateParams && data.stateParams.fromSettings) ? true : false;
|
||||
|
||||
if (!$scope.fromSettings) {
|
||||
$ionicNavBarDelegate.showBackButton(false);
|
||||
$ionicConfig.views.swipeBackEnabled(false);
|
||||
} else $ionicNavBarDelegate.showBackButton(true);
|
||||
|
||||
storageService.getFeedbackInfo(function(error, info) {
|
||||
var feedbackInfo = lodash.isString(info) ? JSON.parse(info) : null;
|
||||
feedbackInfo.sent = true;
|
||||
|
|
|
@ -43,6 +43,7 @@ angular.module('copayApp.controllers').controller('rateAppController', function(
|
|||
externalLinkService.open(url);
|
||||
$state.go('tabs.rate.complete', {
|
||||
score: $stateParams.score,
|
||||
skipped: true,
|
||||
rated: true
|
||||
});
|
||||
};
|
||||
|
|
|
@ -80,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("Send Feedback");
|
||||
$scope.justFeedback = true;
|
||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay. How could we improve your experience?");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -759,9 +759,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
controller: 'completeController',
|
||||
templateUrl: 'views/feedback/complete.html'
|
||||
}
|
||||
},
|
||||
customConfig: {
|
||||
hideStatusBar: true
|
||||
}
|
||||
})
|
||||
.state('tabs.rate', {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#complete {
|
||||
background-color: #ffffff;
|
||||
background-color: #fff;
|
||||
.close-button {
|
||||
color: $dark-gray;
|
||||
position: absolute;
|
||||
|
@ -30,7 +30,11 @@
|
|||
width: 5rem;
|
||||
margin: 1rem;
|
||||
}
|
||||
.title {
|
||||
.send-feedback-illustration {
|
||||
height: 21rem;
|
||||
margin: 1rem;
|
||||
}
|
||||
.feedback-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: $dark-gray;
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
#rate-app {
|
||||
background-color: #ffffff;
|
||||
.skip {
|
||||
margin-top: 15px;
|
||||
color: #667;
|
||||
}
|
||||
text-align: center;
|
||||
.skip-rating {
|
||||
margin-right: 15px;
|
||||
color: $dark-gray;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
padding: 15px;
|
||||
}
|
||||
.icon-svg > img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
.title {
|
||||
.feedback-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: $dark-gray;
|
||||
margin: 80px 50px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.share-the-love-illustration {
|
||||
width: 5rem;
|
||||
margin: 1rem;
|
||||
}
|
||||
.subtitle {
|
||||
padding: 10px 30px 20px 40px;
|
||||
color: #667;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
.feedback-heading {
|
||||
padding-top: 20px
|
||||
}
|
||||
.title {
|
||||
.feedback-title {
|
||||
padding-left: 10px;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
|
@ -38,4 +38,16 @@
|
|||
height: 1rem;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.form-fade-in {
|
||||
opacity: 0;
|
||||
animation-name: fadeIn;
|
||||
animation-duration: .5s;
|
||||
animation-fill-mode: forwards;
|
||||
animation-timing-function: ease-in;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
|
|
@ -1,33 +1,28 @@
|
|||
<ion-view id="complete" hide-tabs>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-bar class="bar-royal" ng-if="fromSettings">
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<a ng-show="!fromSettings" class="close-button" ng-click="close()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
|
||||
</ion-nav-buttons>
|
||||
<ion-nav-title>{{'Share BitPay' | translate}}</ion-nav-title>
|
||||
</ion-nav-bar>
|
||||
<ion-content scroll="false">
|
||||
<a class="close-button" ng-click="close()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
|
||||
<a class="close-button" ng-show="!fromSettings" ng-click="close()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
|
||||
<div class="complete-layout">
|
||||
<div class="complete-layout__expand" ng-class="{'fade-in': !animate || socialsharing}">
|
||||
<div ng-switch="score && !skipped || rated">
|
||||
<div class="title" ng-switch-when="true" translate>Thank you!</div>
|
||||
<div ng-switch-default>
|
||||
<div class="title" translate>Share BitPay</div>
|
||||
<img src="img/ico-positive-feedback.svg" class="share-the-love-illustration"/>
|
||||
</div>
|
||||
<div ng-show="fromSettings">
|
||||
<img src="img/ico-positive-feedback.svg" class="share-the-love-illustration"/>
|
||||
<div class="subtitle" translate>Share the love by inviting your friends.</div>
|
||||
</div>
|
||||
<div class="subtitle" ng-show="!skipped && !rated" translate>A member of the team will review your feedback as soon as possible.</div>
|
||||
<img src="img/ico-positive-feedback.svg" ng-if="rated && socialsharing" class="share-the-love-illustration"/>
|
||||
<div class="subtitle" ng-if="score > 3 && socialsharing" translate>Share the love by inviting your friends.</div>
|
||||
<div class="subtitle" ng-if="score <= 3 || !socialsharing" translate>If you have additional feedback, please let us know by tapping the "Send feedback" option in the Settings tab.</div>
|
||||
<div class="text-center" ng-if="score <= 3 || !socialsharing">
|
||||
<i class="icon icon-svg">
|
||||
<img src="img/illustration-send-feedback.png"/>
|
||||
</i>
|
||||
<div ng-show="!fromSettings">
|
||||
<div class="feedback-title" translate>Thank you!</div>
|
||||
<div class="subtitle" ng-show="!skipped" translate>A member of the team will review your feedback as soon as possible.</div>
|
||||
<div ng-if="score <= 3 || !socialsharing">
|
||||
<div class="subtitle" translate>If you have additional feedback, please let us know by tapping the "Send feedback" option in the Settings tab.</div>
|
||||
<img src="img/illustration-send-feedback.png" class="send-feedback-illustration"/>
|
||||
</div>
|
||||
<div class="subtitle" ng-if="score > 3 && socialsharing" translate>Share the love by inviting your friends.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="share-buttons" ng-show="socialsharing" ng-class="{'slide-up': !animate || socialsharing }">
|
||||
<div class="share-buttons" ng-if="score > 3 && socialsharing" ng-class="{'slide-up': socialsharing }">
|
||||
<div class="share-buttons__action" ng-show="facebook" ng-click="shareFacebook()">
|
||||
<i class="icon socialsharing-icon">
|
||||
<img src="img/social-icons/ico-social-facebook.svg"/>
|
||||
|
|
|
@ -1,25 +1,19 @@
|
|||
<ion-view id="rate-app" hide-tabs>
|
||||
<ion-content scroll="false">
|
||||
<a class="right skip skip-rating" ng-click="skip()" translate>Not now</a>
|
||||
<div class="title">
|
||||
<span translate>Thank you!</span>
|
||||
<div>
|
||||
<i class="icon icon-svg">
|
||||
<img src="img/ico-positive-feedback.svg" class="bg"/>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="subtitle text-center">
|
||||
<a class="skip-rating" ng-click="skip()" translate>Not now</a>
|
||||
<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>
|
||||
</div>
|
||||
<div class="subtitle text-center">
|
||||
<div class="subtitle">
|
||||
<span class="text-bold" translate>Would you be willing to rate BitPay in the app store?</span>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button type="submit" class="button button-standard button-primary" ng-click="goAppStore()">
|
||||
<span translate>Rate on the app store</span>
|
||||
</button>
|
||||
<button type="submit" class="button button-standard button-primary button-clear" ng-click="sendFeedback()">
|
||||
<button type="submit" class="button button-standard button-secondary button-clear" ng-click="sendFeedback()">
|
||||
<span translate>Send us feedback instead</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
<ion-nav-title>{{'Send Feedback' | translate}}</ion-nav-title>
|
||||
<ion-nav-buttons side="primary">
|
||||
<button ng-show="score" class="button no-border" ng-click="sendFeedback(null, true, true)" translate>
|
||||
Cancel
|
||||
|
@ -16,7 +17,7 @@
|
|||
<ion-content class="has-header" scroll="false">
|
||||
<div class="row item item-sub feedback-heading">
|
||||
<div class="col col-50">
|
||||
<div class="title">
|
||||
<div class="feedback-title" ng-if="!justFeedback">
|
||||
<span>{{reaction}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,7 +37,7 @@
|
|||
<div class="comment">
|
||||
<span translate>{{comment}}</span>
|
||||
</div>
|
||||
<div ng-if="showForm">
|
||||
<div ng-if="showForm" class="form-fade-in">
|
||||
<textarea class="user-feedback" ng-model="feedback.value" rows="5" placeholder="Your ideas, feedback, or comments" autofocus></textarea>
|
||||
<button ng-disabled="!feedback.value" type="submit" class="button button-standard button-primary" ng-click="sendFeedback(feedback.value, false)" translate>
|
||||
Send
|
||||
|
|
Loading…
Reference in New Issue