Merge pull request #5077 from bitjson/master
Make it possible to show feedback card from advanced settings
This commit is contained in:
commit
8222885364
4 changed files with 80 additions and 6 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,13 @@
|
|||
.item-note {
|
||||
color: $light-gray;
|
||||
}
|
||||
.item-toggle .toggle,
|
||||
.item-button-right > .button {
|
||||
top: 16px;
|
||||
}
|
||||
.item-button-right > .button {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue