delete popup rate card from settings
This commit is contained in:
parent
511730ecd3
commit
8e7e950eb2
10 changed files with 92 additions and 69 deletions
|
|
@ -6,10 +6,6 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
||||||
$scope.score = 0;
|
$scope.score = 0;
|
||||||
|
|
||||||
$scope.goFeedbackFlow = function() {
|
$scope.goFeedbackFlow = function() {
|
||||||
if ($scope.isModal) {
|
|
||||||
$scope.rateModal.hide();
|
|
||||||
$scope.rateModal.remove();
|
|
||||||
}
|
|
||||||
if ($scope.isCordova && $scope.score == 5) {
|
if ($scope.isCordova && $scope.score == 5) {
|
||||||
$state.go('feedback.rateApp', {
|
$state.go('feedback.rateApp', {
|
||||||
score: $scope.score
|
score: $scope.score
|
||||||
|
|
@ -46,21 +42,16 @@ angular.module('copayApp.controllers').controller('rateCardController', function
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.hideCard = function() {
|
$scope.hideCard = function() {
|
||||||
if ($scope.isModal) {
|
storageService.getFeedbackInfo(function(error, info) {
|
||||||
$scope.rateModal.hide();
|
var feedbackInfo = JSON.parse(info);
|
||||||
$scope.rateModal.remove();
|
feedbackInfo.sent = true;
|
||||||
} else {
|
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
||||||
storageService.getFeedbackInfo(function(error, info) {
|
$scope.showRateCard.value = false;
|
||||||
var feedbackInfo = JSON.parse(info);
|
$timeout(function() {
|
||||||
feedbackInfo.sent = true;
|
$scope.$apply();
|
||||||
storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
|
}, 100);
|
||||||
$scope.showRateCard.value = false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
$timeout(function() {
|
|
||||||
$scope.$apply();
|
|
||||||
}, 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $stateParams, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
angular.module('copayApp.controllers').controller('sendController', function($scope, $state, $log, $timeout, $stateParams, $ionicNavBarDelegate, gettextCatalog, popupService, configService, lodash, feedbackService, ongoingProcess) {
|
||||||
$scope.score = parseInt($stateParams.score);
|
|
||||||
switch ($scope.score) {
|
|
||||||
case 1:
|
|
||||||
$scope.reaction = gettextCatalog.getString("Ouch!");
|
|
||||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
$scope.reaction = gettextCatalog.getString("Oh no!");
|
|
||||||
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
$scope.reaction = gettextCatalog.getString("Hmm...");
|
|
||||||
$scope.comment = gettextCatalog.getString("We'd love to do better.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
$scope.reaction = gettextCatalog.getString("Thanks!");
|
|
||||||
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you – how could we improve your experience?");
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
$scope.reaction = gettextCatalog.getString("Thank you!");
|
|
||||||
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.") + ' ' + gettextCatalog.getString("Is there anything we could do better?");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.sendFeedback = function(feedback, skip) {
|
$scope.sendFeedback = function(feedback, skip) {
|
||||||
|
|
||||||
|
|
@ -32,7 +9,7 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
||||||
var dataSrc = {
|
var dataSrc = {
|
||||||
"Email": lodash.values(config.emailFor)[0] || ' ',
|
"Email": lodash.values(config.emailFor)[0] || ' ',
|
||||||
"Feedback": skip ? ' ' : feedback,
|
"Feedback": skip ? ' ' : feedback,
|
||||||
"Score": $stateParams.score
|
"Score": $stateParams.score || ' '
|
||||||
};
|
};
|
||||||
|
|
||||||
ongoingProcess.set('sendingFeedback', true);
|
ongoingProcess.set('sendingFeedback', true);
|
||||||
|
|
@ -42,6 +19,14 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback'));
|
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Could not send feedback'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!$stateParams.score) {
|
||||||
|
popupService.showAlert(gettextCatalog.getString('Thank you!'), gettextCatalog.getString('A member of the team will review your feedback as soon as possible.'));
|
||||||
|
$scope.feedback.value = '';
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
$state.go('feedback.complete', {
|
$state.go('feedback.complete', {
|
||||||
score: $stateParams.score,
|
score: $stateParams.score,
|
||||||
skipped: skip
|
skipped: skip
|
||||||
|
|
@ -49,4 +34,36 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
|
$scope.score = parseInt($stateParams.score);
|
||||||
|
$scope.feedback = {};
|
||||||
|
|
||||||
|
switch ($scope.score) {
|
||||||
|
case 1:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Ouch!");
|
||||||
|
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Oh no!");
|
||||||
|
$scope.comment = gettextCatalog.getString("There's obviously something we're doing wrong.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Hmm...");
|
||||||
|
$scope.comment = gettextCatalog.getString("We'd love to do better.") + ' ' + gettextCatalog.getString("How could we improve your experience?");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Thanks!");
|
||||||
|
$scope.comment = gettextCatalog.getString("That's exciting to hear. We'd love to earn that fifth star from you – how could we improve your experience?");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Thank you!");
|
||||||
|
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet.") + ' ' + gettextCatalog.getString("Is there anything we could do better?");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$scope.reaction = gettextCatalog.getString("Feedback!");
|
||||||
|
$scope.comment = gettextCatalog.getString("We're always looking for ways to improve BitPay wallet. How could we improve your experience?");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $ionicNavBarDelegate, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
angular.module('copayApp.controllers').controller('searchController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService) {
|
||||||
|
|
||||||
var HISTORY_SHOW_LIMIT = 10;
|
var HISTORY_SHOW_LIMIT = 10;
|
||||||
var currentTxHistoryPage = 0;
|
var currentTxHistoryPage = 0;
|
||||||
|
|
|
||||||
|
|
@ -32,15 +32,4 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
||||||
updateConfig();
|
updateConfig();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.openRateModal = function() {
|
|
||||||
$scope.isModal = true;
|
|
||||||
$ionicModal.fromTemplateUrl('views/feedback/rateCard.html', {
|
|
||||||
scope: $scope,
|
|
||||||
backdropClickToClose: false,
|
|
||||||
hardwareBackButtonClose: false
|
|
||||||
}).then(function(modal) {
|
|
||||||
$scope.rateModal = modal;
|
|
||||||
$scope.rateModal.show();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -722,7 +722,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Feedback
|
* Feedback from home
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -758,11 +758,32 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
/*
|
|
||||||
*
|
/*
|
||||||
* Buy or Sell Bitcoin
|
*
|
||||||
*
|
* Feedback from settings
|
||||||
*/
|
*
|
||||||
|
*/
|
||||||
|
.state('tabs.settings.feedback', {
|
||||||
|
url: '/feedback',
|
||||||
|
abstract: true,
|
||||||
|
template: '<ion-nav-view name="feedback"></ion-nav-view>'
|
||||||
|
})
|
||||||
|
.state('tabs.settings.feedback.send', {
|
||||||
|
url: '/send',
|
||||||
|
views: {
|
||||||
|
'tab-settings@tabs': {
|
||||||
|
controller: 'sendController',
|
||||||
|
templateUrl: 'views/feedback/send.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Buy or Sell Bitcoin
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
.state('tabs.buyandsell', {
|
.state('tabs.buyandsell', {
|
||||||
url: '/buyandsell',
|
url: '/buyandsell',
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#rate-card {
|
#rate-card {
|
||||||
|
.item-heading {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
.row {
|
.row {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.row.row-margin{
|
|
||||||
margin: 20px 0px 20px 0px;
|
|
||||||
}
|
|
||||||
.item-icon-right {
|
.item-icon-right {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
#send-feedback {
|
#send-feedback {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
.row {
|
.row {
|
||||||
|
padding: 20px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.skip {
|
.skip {
|
||||||
margin: 20px 20px 10px;
|
margin: 8px 20px 10px;
|
||||||
color: #667;
|
color: #667;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="card" id="rate-card" ng-class="{'popup-modal': isModal}" 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 Wallet?</span>
|
<span translate>How do you like BitPay Wallet?</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>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
<ion-view id="send-feedback">
|
<ion-view id="send-feedback">
|
||||||
|
<ion-nav-bar class="bar-royal" ng-show="!score">
|
||||||
|
<ion-nav-back-button>
|
||||||
|
</ion-nav-back-button>
|
||||||
|
</ion-nav-bar>
|
||||||
<a class="right skip" ng-click="sendFeedback(null,true)" href translate>Skip</a>
|
<a class="right skip" ng-click="sendFeedback(null,true)" href translate>Skip</a>
|
||||||
<ion-content class="has-header" scroll="false">
|
<ion-content class="has-header" scroll="false">
|
||||||
<div class="row item item-sub">
|
<div class="row item item-sub">
|
||||||
|
|
@ -24,9 +28,9 @@
|
||||||
<span translate>{{comment}}</span>
|
<span translate>{{comment}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<textarea ng-model="feedback" placeholder="Your ideas, feedback, or comments" row="40"></textarea>
|
<textarea ng-model="feedback.value" placeholder="Your ideas, feedback, or comments" row="40"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<button ng-disabled="!feedback" type="submit" class="button button-full button-primary" ng-click="sendFeedback(feedback, false)" translate>
|
<button ng-disabled="!feedback.value" type="submit" class="button button-full button-primary" ng-click="sendFeedback(feedback.value, false)" translate>
|
||||||
Send
|
Send
|
||||||
</button>
|
</button>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<img src="img/icon-link.svg" class="bg just-a-hint"/>
|
<img src="img/icon-link.svg" class="bg just-a-hint"/>
|
||||||
</i>
|
</i>
|
||||||
</a>
|
</a>
|
||||||
<a class="item item-icon-left item-icon-right" ng-click="openRateModal()">
|
<a class="item item-icon-left item-icon-right" ui-sref="tabs.settings.feedback.send">
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<img src="img/icon-send-feedback.svg" class="bg"/>
|
<img src="img/icon-send-feedback.svg" class="bg"/>
|
||||||
</i>
|
</i>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue