Merge pull request #5536 from JDonadio/feat/select-text

Select text
This commit is contained in:
Gabriel Edgardo Bazán 2017-01-27 17:46:11 +02:00 committed by GitHub
commit a305d570a1
6 changed files with 22 additions and 15 deletions

View File

@ -2,15 +2,15 @@
angular.module('copayApp.controllers').controller('backupController', angular.module('copayApp.controllers').controller('backupController',
function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal) { function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal) {
var wallet = profileService.getWallet($stateParams.walletId); $scope.wallet = profileService.getWallet($stateParams.walletId);
$scope.viewTitle = wallet.name || wallet.credentials.walletName; $scope.viewTitle = $scope.wallet.name || $scope.wallet.credentials.walletName;
$scope.n = wallet.n; $scope.n = $scope.wallet.n;
var keys; var keys;
$scope.credentialsEncrypted = wallet.isPrivKeyEncrypted(); $scope.credentialsEncrypted = $scope.wallet.isPrivKeyEncrypted();
var isDeletedSeed = function() { var isDeletedSeed = function() {
if (!wallet.credentials.mnemonic && !wallet.credentials.mnemonicEncrypted) if (!$scope.wallet.credentials.mnemonic && !$scope.wallet.credentials.mnemonicEncrypted)
return true; return true;
return false; return false;
@ -35,7 +35,7 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.mnemonicWords = words.split(/[\u3000\s]+/); $scope.mnemonicWords = words.split(/[\u3000\s]+/);
$scope.shuffledMnemonicWords = shuffledWords($scope.mnemonicWords); $scope.shuffledMnemonicWords = shuffledWords($scope.mnemonicWords);
$scope.mnemonicHasPassphrase = wallet.mnemonicHasPassphrase(); $scope.mnemonicHasPassphrase = $scope.wallet.mnemonicHasPassphrase();
$scope.useIdeograms = words.indexOf("\u3000") >= 0; $scope.useIdeograms = words.indexOf("\u3000") >= 0;
$scope.data.passphrase = null; $scope.data.passphrase = null;
$scope.customWords = []; $scope.customWords = [];
@ -115,9 +115,9 @@ angular.module('copayApp.controllers').controller('backupController',
try { try {
walletClient.seedFromMnemonic(customSentence, { walletClient.seedFromMnemonic(customSentence, {
network: wallet.credentials.network, network: $scope.wallet.credentials.network,
passphrase: passphrase, passphrase: passphrase,
account: wallet.credentials.account account: $scope.wallet.credentials.account
}); });
} catch (err) { } catch (err) {
walletClient.credentials.xPrivKey = lodash.repeat('x', 64); walletClient.credentials.xPrivKey = lodash.repeat('x', 64);
@ -130,7 +130,7 @@ angular.module('copayApp.controllers').controller('backupController',
} }
} }
profileService.setBackupFlag(wallet.credentials.walletId); profileService.setBackupFlag($scope.wallet.credentials.walletId);
return cb(); return cb();
}, 1); }, 1);
}; };
@ -195,7 +195,7 @@ angular.module('copayApp.controllers').controller('backupController',
return; return;
} }
walletService.getKeys(wallet, function(err, k) { walletService.getKeys($scope.wallet, function(err, k) {
if (err || !k) { if (err || !k) {
$log.error('Could not get keys: ', err); $log.error('Could not get keys: ', err);
$ionicHistory.goBack(); $ionicHistory.goBack();

View File

@ -2,6 +2,13 @@
* Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/
*/ */
.enable_text_select {
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
.box-notification { .box-notification {
padding: 0.5rem; padding: 0.5rem;
border: 1px solid; border: 1px solid;

View File

@ -6,7 +6,7 @@
<ion-nav-back-button> <ion-nav-back-button>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content scroll="false"> <ion-content overflow-scroll="true">
<div class="ng-hide" ng-show="deleted"> <div class="ng-hide" ng-show="deleted">
<div class="phrase-unavailable" translate>Wallet recovery phrase not available.</div> <div class="phrase-unavailable" translate>Wallet recovery phrase not available.</div>
<div class="phrase-unavailable-instructions" translate>You can still export it from Advanced &gt; Export.</div> <div class="phrase-unavailable-instructions" translate>You can still export it from Advanced &gt; Export.</div>

View File

@ -1,4 +1,4 @@
<div id="terms"> <div id="terms" class="enable_text_select">
<p> <p>
This is a binding Agreement between BitPay, Inc. (&ldquo;BitPay&rdquo; or &ldquo;We&rdquo;) and the person, persons, or entity (&ldquo;You&rdquo; or &ldquo;Your&rdquo;) using the service, Software, or application (&ldquo;Software&rdquo;). This is a binding Agreement between BitPay, Inc. (&ldquo;BitPay&rdquo; or &ldquo;We&rdquo;) and the person, persons, or entity (&ldquo;You&rdquo; or &ldquo;Your&rdquo;) using the service, Software, or application (&ldquo;Software&rdquo;).
</p> </p>

View File

@ -4,7 +4,7 @@
<ion-nav-back-button> <ion-nav-back-button>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content overflow-scroll="true">
<div class="settings-button-group"> <div class="settings-button-group">
<button class="button button-standard button-primary" style="margin-top: 1rem" copy-to-clipboard="prepare()"> <button class="button button-standard button-primary" style="margin-top: 1rem" copy-to-clipboard="prepare()">
<i class="icon ion-clipboard"></i> <i class="icon ion-clipboard"></i>
@ -16,7 +16,7 @@
</button> </button>
</div> </div>
<div class="list"> <div class="list">
<div class="item item-text-wrap"> <div class="item item-text-wrap enable_text_select">
<ul> <ul>
<li ng-repeat="l in logs"> <li ng-repeat="l in logs">
<span ng-class="{'energized': l.level=='warn', 'dark': l.level=='debug', 'positive': l.level=='info', 'assertive': l.level=='error' }"> <span ng-class="{'energized': l.level=='warn', 'dark': l.level=='debug', 'positive': l.level=='info', 'assertive': l.level=='error' }">

View File

@ -5,7 +5,7 @@
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content overflow-scroll="true">
<div class="list"> <div class="list">
<div class="item item-text-wrap" id="settings-tos" ng-include="'views/includes/terms.html'"></div> <div class="item item-text-wrap" id="settings-tos" ng-include="'views/includes/terms.html'"></div>
</div> </div>