fix method name - add spending password external link

This commit is contained in:
JDonadio 2017-08-31 18:14:49 -03:00
commit 8c610e0531
No known key found for this signature in database
GPG key ID: EC1F4E04B2BFA730
5 changed files with 19 additions and 5 deletions

View file

@ -66,7 +66,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
});
};
$scope.learnMore = function() {
$scope.openBitcoinCashWeb = function() {
var url = 'https://www.bitcoincash.org/';
var optIn = true;
var title = null;

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, $ionicHistory, configService, profileService, fingerprintService, walletService, platformInfo) {
function($scope, $rootScope, $timeout, $log, $ionicHistory, configService, profileService, fingerprintService, walletService, platformInfo, externalLinkService, gettextCatalog) {
var wallet;
var walletId;
@ -58,6 +58,16 @@ angular.module('copayApp.controllers').controller('preferencesController',
}
};
$scope.openWikiSpendingPassword = function() {
var url = 'https://github.com/bitpay/copay/wiki/COPAY---FAQ#what-the-spending-password-does';
var optIn = true;
var title = null;
var message = gettextCatalog.getString('Read more in our Wiki');
var okText = gettextCatalog.getString('Open');
var cancelText = gettextCatalog.getString('Go Back');
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};
$scope.touchIdChange = function() {
var newStatus = $scope.touchIdEnabled.value;
walletService.setTouchId(wallet, !!newStatus, function(err) {

View file

@ -34,6 +34,9 @@
width: 20px;
}
}
a {
cursor: pointer;
}
}
&-explanation, &-button-group {
padding: 0 1rem;

View file

@ -13,7 +13,7 @@
</ion-toggle>
<div class="comment" translate>
Enable Bitcoin Cash wallet creation and operation within the App.
<a ng-click="learnMore()">Learn more</a>
<a ng-click="openBitcoinCashWeb()">Learn more</a>
</div>

View file

@ -44,10 +44,11 @@
<div class="comment">
<span translate>
If enabled, all sensitive information (private key and recovery phrase) and actions (spending and exporting) associated with this wallet will be protected.
<a ng-click="openWikiSpendingPassword()">Learn more</a>
</span>
<span class="text-light assertive" ng-show="wallet.needsBackup" translate>
<div class="text-light assertive" ng-show="wallet.needsBackup" translate>
Complete the backup process to use this option
</span>
</div>
</div>
</div>
<div ng-show="wallet.canSign() && touchIdAvailable">