If mobile app, import from a plain text backup
This commit is contained in:
parent
fe0c061eaa
commit
34b5dc3298
6 changed files with 13 additions and 10 deletions
|
|
@ -1,12 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('ImportController',
|
||||
function($scope, $rootScope, $location, $timeout, identityService, notification, isMobile, Compatibility) {
|
||||
function($scope, $rootScope, $location, $timeout, identityService, notification, isMobile, isCordova, Compatibility) {
|
||||
|
||||
$rootScope.title = 'Import wallet';
|
||||
$scope.importStatus = 'Importing wallet - Reading backup...';
|
||||
$scope.hideAdv = true;
|
||||
$scope.is_iOS = isMobile.iOS();
|
||||
$scope.isCordova = isCordova;
|
||||
$scope.importOpts = {};
|
||||
|
||||
window.ignoreMobilePause = true;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('ImportProfileController',
|
||||
function($scope, $rootScope, $location, $timeout, notification, isMobile, identityService) {
|
||||
function($scope, $rootScope, $location, $timeout, notification, isMobile, isCordova, identityService) {
|
||||
$scope.title = 'Import a backup';
|
||||
$scope.importStatus = 'Importing wallet - Reading backup...';
|
||||
$scope.hideAdv = true;
|
||||
$scope.is_iOS = isMobile.iOS();
|
||||
$scope.isCordova = isCordova;
|
||||
|
||||
window.ignoreMobilePause = true;
|
||||
$scope.$on('$destroy', function() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, $filter, $timeout, backupService, identityService, isMobile) {
|
||||
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, $filter, $timeout, backupService, identityService, isMobile, isCordova) {
|
||||
$scope.username = $rootScope.iden.getName();
|
||||
$scope.isSafari = isMobile.Safari();
|
||||
$scope.isCordova = !!window.cordova;
|
||||
$scope.isCordova = isCordova;
|
||||
|
||||
$rootScope.title = 'Profile';
|
||||
$scope.hideAdv = true;
|
||||
|
|
@ -62,6 +62,7 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
|||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
if (!w) return;
|
||||
$scope.isSafari = isMobile.Safari();
|
||||
$scope.isCordova = isCordova;
|
||||
$scope.item = w;
|
||||
$scope.error = null;
|
||||
$scope.success = null;
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div ng-show="!is_iOS && !backupOldWallet">
|
||||
<div ng-show="!is_iOS && !isCordova && !backupOldWallet">
|
||||
<legend for="backupFile" class="m10b">
|
||||
<span translate>Choose backup file from your computer</span> <i class="fi-laptop"></i>
|
||||
</legend>
|
||||
<input type="file" class="form-control" placeholder="{{'Select a backup file'|translate}}" name="backupFile" ng-model="backupFile" ng-file-select>
|
||||
</div>
|
||||
|
||||
<div ng-show="is_iOS && !backupOldWallet">
|
||||
<div ng-show="is_iOS || isCordova && !backupOldWallet">
|
||||
<label for="backupText" class="m10b">
|
||||
<span translate>Paste backup plain text code</span> <i class="fi-clipboard"></i>
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div ng-show="!is_iOS">
|
||||
<div ng-show="!is_iOS && !isCordova">
|
||||
<div class="input">
|
||||
<input type="file" class="db form-control"
|
||||
placeholder="{{'Select a backup file'|translate}}" name="backupFile" ng-model="backupFile" ng-file-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="is_iOS">
|
||||
<div ng-show="is_iOS || isCordova">
|
||||
<div class="input">
|
||||
<textarea
|
||||
placeholder="Paste backup plain text code"
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
<div class="row" ng-show="!backupWalletPlainText && !error">
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="primary expand" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||
ng-show="!isSafari"><i class="fi-download"></i> Download backup</button>
|
||||
ng-show="!isSafari && !isCordova"><i class="fi-download"></i> Download backup</button>
|
||||
<button class="primary expand" ng-click="viewWalletBackup()" ng-disabled="loading"
|
||||
ng-show="isSafari"><i class="fi-eye"></i> View Backup</button>
|
||||
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-12 columns">
|
||||
<button class="warning expand" ng-disabled="loading"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue