diff --git a/src/js/controllers/advancedSettings.js b/src/js/controllers/advancedSettings.js
index 16b556501..6f8712544 100644
--- a/src/js/controllers/advancedSettings.js
+++ b/src/js/controllers/advancedSettings.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
+angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService, storageService, $ionicHistory, $timeout) {
var updateConfig = function() {
@@ -27,8 +27,42 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
$scope.frequentlyUsedEnabled = {
value: config.frequentlyUsed.enabled
};
+ $scope.developmentUtilitiesEnabled = {
+ value: false
+ };
};
+ $scope.toggledDevelopmentUtils = function (){
+ if($scope.developmentUtilitiesEnabled.value){
+ $log.debug('User enabled development utilities.');
+ } else {
+ $log.debug('User disabled development utilities.');
+ }
+ }
+
+ $scope.activateFeedbackCard = function () {
+ $scope.feedbackCardActivating = true;
+ storageService.getFeedbackInfo(function(error, info) {
+ var feedbackInfo = JSON.parse(info);
+ // hardcoding so we can distinguish from normal operation
+ feedbackInfo.time = 1231006505; // genesis block time
+ feedbackInfo.version = window.version;
+ feedbackInfo.sent = false;
+ storageService.setFeedbackInfo(JSON.stringify(feedbackInfo), function() {
+ $log.debug('Activated feedback card with: ' + JSON.stringify(feedbackInfo));
+ $ionicHistory.clearCache();
+ $timeout(function(){
+ $scope.feedbackCardActivating = false;
+ $scope.feedbackCardActivated = true;
+ }, 500);
+ });
+ });
+ }
+
+ $scope.resetActivateFeedbackCard = function(){
+ $scope.feedbackCardActivated = false;
+ }
+
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
diff --git a/src/js/controllers/feedback/rateCard.js b/src/js/controllers/feedback/rateCard.js
index f08ab41c8..a8162b061 100644
--- a/src/js/controllers/feedback/rateCard.js
+++ b/src/js/controllers/feedback/rateCard.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('copayApp.controllers').controller('rateCardController', function($scope, $state, $timeout, gettextCatalog, platformInfo, storageService) {
+angular.module('copayApp.controllers').controller('rateCardController', function($scope, $state, $timeout, $log, gettextCatalog, platformInfo, storageService) {
$scope.isCordova = platformInfo.isCordova;
$scope.score = 0;
@@ -43,6 +43,7 @@ angular.module('copayApp.controllers').controller('rateCardController', function
};
$scope.hideCard = function() {
+ $log.debug('Feedback card dismissed.')
storageService.getFeedbackInfo(function(error, info) {
var feedbackInfo = JSON.parse(info);
feedbackInfo.sent = true;
diff --git a/www/views/advancedSettings.html b/www/views/advancedSettings.html
index 11a90fd4b..41c417d26 100644
--- a/www/views/advancedSettings.html
+++ b/www/views/advancedSettings.html
@@ -33,8 +33,8 @@