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 @@ Use Unconfirmed Funds -
- If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays. +
+ If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays.
Experimental Features
@@ -47,8 +47,15 @@ Recent Transaction Card -
- If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab. +
+ If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab. +
+ + + Development Utilities + +
+ These features make it easier to test complex functionality on all devices. They may be unstable.
@@ -60,6 +67,31 @@ If enabled, the Frequently Used card - a list of the most commonly chosen recipients - will appear in the Send tab.
--> +
+
Development Utilities
+
+
+ These utilities may be unstable. Proceed at your own risk. +
+
+ +
+ Feedback Card + + + +
+
+ The feedback card is displayed on the Home tab at certain times. You can activate it immediately here. +
+
+