From e28be27bf3a265714859d826143e3178acff33b4 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 17 Apr 2014 12:37:10 -0300 Subject: [PATCH 1/4] better signin page --- index.html | 55 +++++++++++++++++++++------------ js/controllers/signin.js | 7 ++--- js/models/core/WalletFactory.js | 1 - 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/index.html b/index.html index 8ebc2f12c..f5d0c1db6 100644 --- a/index.html +++ b/index.html @@ -64,17 +64,6 @@ Connecting to wallet...
-
-
-

Open a Existing Wallet

- -
-
- -
-
-

Join a Network Wallet

@@ -85,14 +74,35 @@

-
-
-

Create a New Wallet

-
-
- +
+
+
+

Create a New Wallet

+
+
+ +
+
+
+
+

Open a Existing Wallet

+ +
+
+ +
+
+ +
+
+
@@ -127,6 +137,11 @@
+
+
+ Go back +
+
@@ -152,11 +167,11 @@
-

Copayers ({{$root.wallet.network.connectedPeers.length}}/{{$root.wallet.publicKeyRing.requiredCopayers}})

+

Online Copayers: {{$root.wallet.network.connectedPeers.length}}


-
+

Create a New Wallet

diff --git a/js/controllers/signin.js b/js/controllers/signin.js index 2e571f328..357cc7acc 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -10,7 +10,8 @@ angular.module('copay.signin').controller('SigninController', $scope.loading = false; $scope.walletIds = walletFactory.getWalletIds(); - $scope.selectedWalletId = $scope.walletIds?$scope.walletIds.shift():null; + + $scope.selectedWalletId = $scope.walletIds.length ? $scope.walletIds[0]:null; $scope.create = function() { $location.path('setup'); diff --git a/js/models/storage/LocalPlain.js b/js/models/storage/LocalPlain.js index d32234899..d5434f91b 100644 --- a/js/models/storage/LocalPlain.js +++ b/js/models/storage/LocalPlain.js @@ -54,13 +54,17 @@ Storage.prototype.remove = function(walletId, k) { Storage.prototype.getWalletIds = function() { var walletIds = []; + var uniq = {}; for (var i = 0; i < localStorage.length; i++) { var key = localStorage.key(i); var split = key.split('::'); if (split.length == 2) { var walletId = split[0]; - walletIds.push(walletId); + if (typeof uniq[walletId] === 'undefined' ) { + walletIds.push(walletId); + uniq[walletId] = 1; + } } } From 9733305aeaf081a217b45320e03ea5068ff50bd2 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 17 Apr 2014 13:43:34 -0300 Subject: [PATCH 3/4] ux fixes --- index.html | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index e494bb438..2ccedad3e 100644 --- a/index.html +++ b/index.html @@ -51,6 +51,17 @@ Dismiss
+ +
+ +

+ NOTE: Your wallet is not complete yet. + {{$root.wallet.publicKeyRing.totalCopayers - $root.wallet.publicKeyRing.registeredCopayers() }} keys are missing. Ask your copayers to join your session: {{$root.wallet.network.peerId}} + +

+
+ +
@@ -158,16 +169,14 @@

-

Online Copayers: {{$root.wallet.network.connectedPeers.length}}

+ +

+ {{$root.wallet.publicKeyRing.requiredCopayers}} copayers needed for signning transactions + +

-
- -
@@ -324,6 +330,17 @@ +
+
+

+ [DEBUG] WalletId: {{$root.wallet.id}} +

+
+ + From fc7354e93a3a996f3da025dd0a9dad78602d3997 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 17 Apr 2014 14:28:50 -0300 Subject: [PATCH 4/4] import option (not working yet) --- index.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 2ccedad3e..d10b58a89 100644 --- a/index.html +++ b/index.html @@ -84,6 +84,7 @@ +
@@ -94,6 +95,12 @@
+
+
@@ -108,7 +115,8 @@