diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index 43b20ef7c..f10e1ae2e 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -47,13 +47,36 @@ angular.module('copayApp.controllers').controller('createController', $scope.showAdvChange = function() { $scope.showAdv = !$scope.showAdv; + $scope.encrypt = null; $scope.resizeView(); }; + $scope.checkPassword = function(pw1, pw2) { + if (pw1 && pw1.length > 0) { + if (pw2 && pw2.length > 0) { + if (pw1 == pw2) $scope.result = 'correct'; + else { + $scope.formData.passwordSaved = null; + $scope.result = 'incorrect'; + } + } else + $scope.result = null; + } else + $scope.result = null; + }; + $scope.resizeView = function() { $timeout(function() { $ionicScrollDelegate.resize(); }, 10); + resetPasswordFields(); + }; + + function resetPasswordFields() { + $scope.formData.passphrase = $scope.formData.createPassphrase = $scope.formData.passwordSaved = $scope.formData.repeatPassword = $scope.result = null; + $timeout(function() { + $scope.$apply(); + }); }; function updateRCSelect(n) { diff --git a/www/views/tab-create-personal.html b/www/views/tab-create-personal.html index 4fd4dec4a..b66bf6e72 100644 --- a/www/views/tab-create-personal.html +++ b/www/views/tab-create-personal.html @@ -54,6 +54,59 @@ ng-model="formData.privateKey"> +
+ + Add a password + +
+ Add an optional password to secure the recovery phrase + The recovery phrase could require a password to be imported +
+
+ +
+ + + +
+
+ + + +
+ +
+ This password cannot be recovered. If the password is lost, there is no way you could recover your funds. +
+ + + I have written it down + + +
+ + Add a password + +
+ Add an optional password to secure the recovery phrase + The recovery phrase could require a password to be imported +
+
+ +
+ + + +
+
+ + + +
+ +
+ This password cannot be recovered. If the password is lost, there is no way you could recover your funds. +
+ + + I have written it down +