diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index 6b91db34d..bad361d93 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -37,9 +37,24 @@ angular.module('copayApp.controllers').controller('createController', }; $scope.showAdvChange = function() { + $scope.showAdv = !$scope.showAdv; + $scope.resizeView(); + }; + + $scope.resizeView = function() { $timeout(function() { $ionicScrollDelegate.resize(); - }, 10); + }); + checkPasswordFields(); + }; + + function checkPasswordFields() { + if (!$scope.encrypt) { + $scope.formData.passphrase = $scope.formData.createPassphrase = $scope.formData.passwordSaved = null; + $timeout(function() { + $scope.$apply(); + }); + } }; function updateRCSelect(n) { @@ -160,7 +175,6 @@ angular.module('copayApp.controllers').controller('createController', function _create(opts) { ongoingProcess.set('creatingWallet', true); $timeout(function() { - profileService.createWallet(opts, function(err, client) { ongoingProcess.set('creatingWallet', false); if (err) { @@ -173,11 +187,12 @@ angular.module('copayApp.controllers').controller('createController', $log.debug('Remote preferences saved for:' + client.credentials.walletId) }); - if ($scope.seedSource.id == 'set') { profileService.setBackupFlag(client.credentials.walletId); } + $ionicHistory.removeBackView(); + if (!client.isComplete()) { $ionicHistory.nextViewOptions({ disableAnimate: true @@ -188,8 +203,7 @@ angular.module('copayApp.controllers').controller('createController', walletId: client.credentials.walletId }); }, 100); - } - else $state.go('tabs.home') + } else $state.go('tabs.home'); }); }, 100); } diff --git a/src/js/controllers/export.js b/src/js/controllers/export.js index 4d7aed6c0..a5a90766b 100644 --- a/src/js/controllers/export.js +++ b/src/js/controllers/export.js @@ -1,9 +1,20 @@ 'use strict'; angular.module('copayApp.controllers').controller('exportController', - function($scope, $timeout, $log, $ionicHistory, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) { + function($scope, $timeout, $log, $ionicHistory, $ionicScrollDelegate, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) { var wallet = profileService.getWallet($stateParams.walletId); + $scope.showAdvChange = function() { + $scope.showAdv = !$scope.showAdv; + $scope.resizeView(); + }; + + $scope.resizeView = function() { + $timeout(function() { + $ionicScrollDelegate.resize(); + }); + }; + var init = function() { $scope.formData = {}; $scope.isEncrypted = wallet.isPrivKeyEncrypted(); diff --git a/src/js/controllers/join.js b/src/js/controllers/join.js index 83150713a..c358b7fc9 100644 --- a/src/js/controllers/join.js +++ b/src/js/controllers/join.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('joinController', - function($scope, $rootScope, $timeout, $state, $ionicHistory, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) { + function($scope, $rootScope, $timeout, $state, $ionicHistory, $ionicScrollDelegate, profileService, configService, storageService, applicationService, gettext, gettextCatalog, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log, $stateParams, popupService) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; @@ -12,6 +12,26 @@ angular.module('copayApp.controllers').controller('joinController', $scope.derivationPath = derivationPathHelper.default; $scope.account = 1; + $scope.showAdvChange = function() { + $scope.showAdv = !$scope.showAdv; + $scope.resizeView(); + }; + + $scope.resizeView = function() { + $timeout(function() { + $ionicScrollDelegate.resize(); + }); + checkPasswordFields(); + }; + + function checkPasswordFields() { + if (!$scope.encrypt) { + $scope.passphrase = $scope.createPassphrase = $scope.passwordSaved = null; + $timeout(function() { + $scope.$apply(); + }); + } + }; this.onQrCodeScanned = function(data) { $scope.secret = data; @@ -156,11 +176,10 @@ angular.module('copayApp.controllers').controller('joinController', $state.transitionTo('tabs.copayers', { walletId: client.credentials.walletId }); - }, 100); - } - else $state.go('tabs.home') + }); + } else $state.go('tabs.home'); }); - }, 100); + }); }; updateSeedSourceSelect(); diff --git a/www/views/join.html b/www/views/join.html index f21080820..c1e559383 100644 --- a/www/views/join.html +++ b/www/views/join.html @@ -40,10 +40,12 @@ - +
+ + Show advanced options Hide advanced options -
+
@@ -69,23 +71,6 @@ -
-
- - WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. - -
-
- - - -
- diff --git a/www/views/tab-create-personal.html b/www/views/tab-create-personal.html index 506709f63..81623a180 100644 --- a/www/views/tab-create-personal.html +++ b/www/views/tab-create-personal.html @@ -18,10 +18,12 @@ ng-blur="formFocus(false)"> - +
+ + Show advanced options Hide advanced options -
+
-
-
- WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. -
-
- - - -
- diff --git a/www/views/tab-create-shared.html b/www/views/tab-create-shared.html index 914976dc2..fd3472bb0 100644 --- a/www/views/tab-create-shared.html +++ b/www/views/tab-create-shared.html @@ -48,10 +48,12 @@ - +
+ + Show advanced options Hide advanced options -
+
-
-
- WARNING: The password cannot be recovered. Be sure to write it down. The wallet can not be restored without the password. -
-
- - - -
- diff --git a/www/views/tab-export-file.html b/www/views/tab-export-file.html index 31eb7d51a..552ab6d9f 100644 --- a/www/views/tab-export-file.html +++ b/www/views/tab-export-file.html @@ -18,13 +18,13 @@ - - Show advanced options - Hide advanced options - +
+ + Show advanced options + Hide advanced options + -
- + Do not include private key