mirror of https://github.com/BTCPrivate/copay.git
scrolling refactor - copy backup phrase
This commit is contained in:
parent
fc52a8cf87
commit
c0e70eb686
|
@ -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) {
|
var confirm = function(cb) {
|
||||||
$scope.backupError = false;
|
$scope.backupError = false;
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ angular.module('copayApp.directives')
|
||||||
var msg = gettextCatalog.getString('Copied to clipboard');
|
var msg = gettextCatalog.getString('Copied to clipboard');
|
||||||
elem.bind('click', function() {
|
elem.bind('click', function() {
|
||||||
var data = scope.copyToClipboard;
|
var data = scope.copyToClipboard;
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
window.cordova.plugins.clipboard.copy(data);
|
window.cordova.plugins.clipboard.copy(data);
|
||||||
window.plugins.toast.showShortCenter(msg);
|
window.plugins.toast.showShortCenter(msg);
|
||||||
|
@ -36,4 +38,3 @@ angular.module('copayApp.directives')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
// CHECKBOX CIRCLE
|
// CHECKBOX CIRCLE
|
||||||
$ionicConfigProvider.form.checkbox('circle');
|
$ionicConfigProvider.form.checkbox('circle');
|
||||||
|
|
||||||
|
// USE NATIVE SCROLLING
|
||||||
|
$ionicConfigProvider.scrolling.jsScrolling(false);
|
||||||
|
|
||||||
$logProvider.debugEnabled(true);
|
$logProvider.debugEnabled(true);
|
||||||
$provide.decorator('$log', ['$delegate', 'platformInfo',
|
$provide.decorator('$log', ['$delegate', 'platformInfo',
|
||||||
function($delegate, platformInfo) {
|
function($delegate, platformInfo) {
|
||||||
|
|
|
@ -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 overflow-scroll="true">
|
<ion-content>
|
||||||
<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 > Export.</div>
|
<div class="phrase-unavailable-instructions" translate>You can still export it from Advanced > Export.</div>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
-->
|
-->
|
||||||
<div id="wallet-backup-phrase-step-1" class="ng-hide" ng-show="step == 1 && (mnemonicWords || (!credentialsEncrypted && !deleted))">
|
<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="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">
|
<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"> </span> </span>
|
<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"> </span> </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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 overflow-scroll="true">
|
<ion-content>
|
||||||
<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>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content overflow-scroll="true">
|
<ion-content>
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in New Issue