scrolling refactor - copy backup phrase

This commit is contained in:
JDonadio 2017-02-16 16:41:36 -05:00
parent fc52a8cf87
commit c0e70eb686
6 changed files with 15 additions and 5 deletions

View File

@ -97,6 +97,12 @@ angular.module('copayApp.controllers').controller('backupController',
});
};
$scope.copyRecoveryPhrase = function() {
if ($scope.wallet.network == 'livenet') return null;
else if (!$scope.wallet.credentials.mnemonic) return null;
else return $scope.wallet.credentials.mnemonic;
};
var confirm = function(cb) {
$scope.backupError = false;

View File

@ -18,6 +18,8 @@ angular.module('copayApp.directives')
var msg = gettextCatalog.getString('Copied to clipboard');
elem.bind('click', function() {
var data = scope.copyToClipboard;
if (!data) return;
if (isCordova) {
window.cordova.plugins.clipboard.copy(data);
window.plugins.toast.showShortCenter(msg);
@ -36,4 +38,3 @@ angular.module('copayApp.directives')
}
}
});

View File

@ -36,6 +36,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
// CHECKBOX CIRCLE
$ionicConfigProvider.form.checkbox('circle');
// USE NATIVE SCROLLING
$ionicConfigProvider.scrolling.jsScrolling(false);
$logProvider.debugEnabled(true);
$provide.decorator('$log', ['$delegate', 'platformInfo',
function($delegate, platformInfo) {

View File

@ -6,7 +6,7 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content overflow-scroll="true">
<ion-content>
<div class="ng-hide" ng-show="deleted">
<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>
@ -16,7 +16,7 @@
-->
<div id="wallet-backup-phrase-step-1" class="ng-hide" ng-show="step == 1 && (mnemonicWords || (!credentialsEncrypted && !deleted))">
<div class="initial-prompt" translate>Please carefully write down this phrase.</div>
<div class="backup-phrase" ng-class="{'enable_text_select': wallet.network == 'testnet'}">
<div class="backup-phrase" copy-to-clipboard="copyRecoveryPhrase()">
<div class="backup-phrase-content">
<span class="backup-phrase-content-word-readonly" ng-repeat="word in mnemonicWords track by $index"><span style="white-space:nowrap">{{word}}</span><span ng-show="useIdeograms">&#x3000;</span> </span>
</div>

View File

@ -4,7 +4,7 @@
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content overflow-scroll="true">
<ion-content>
<div class="settings-button-group">
<button class="button button-standard button-primary" style="margin-top: 1rem" copy-to-clipboard="prepare()">
<i class="icon ion-clipboard"></i>

View File

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