From ac7ce0af2349666c80cd29830af34d19be912933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Tue, 16 Aug 2016 16:47:51 -0300 Subject: [PATCH] refactor wallet settings --- public/index.html | 10 +- public/views/backup.html | 344 ++++++++++------------ public/views/export.html | 252 ++++++++-------- public/views/preferences.html | 166 +++++------ public/views/preferencesAdvanced.html | 87 +++--- public/views/preferencesAlias.html | 39 +-- public/views/preferencesBwsUrl.html | 36 +-- public/views/preferencesColor.html | 26 +- public/views/preferencesDeleteWallet.html | 39 ++- public/views/preferencesDeleteWords.html | 51 ++-- public/views/preferencesEmail.html | 44 ++- public/views/preferencesHistory.html | 47 +-- public/views/preferencesInformation.html | 214 +++++++------- public/views/preferencesLanguage.html | 12 +- public/views/walletDetails.html | 5 +- src/js/controllers/preferencesAlias.js | 4 +- src/js/controllers/preferencesEmail.js | 5 +- 17 files changed, 662 insertions(+), 719 deletions(-) diff --git a/public/index.html b/public/index.html index 351a81c7f..c706c45d7 100644 --- a/public/index.html +++ b/public/index.html @@ -14,15 +14,7 @@ - - - - - - - - - + diff --git a/public/views/backup.html b/public/views/backup.html index 60228ef3f..61be78fe4 100644 --- a/public/views/backup.html +++ b/public/views/backup.html @@ -1,109 +1,96 @@ -
- - -
- - {{error|translate}} - -
- - - -
-
-
-
Write your wallet recovery phrase
-
- - To restore this {{index.m}}-{{index.n}} shared wallet you will need - : -
- Your wallet recovery phrase and access to the server that coordinated the initial wallet creation. You still need {{index.m}} keys to spend. - OR the wallet recovery phrase of all copayers in the wallet - OR 1 wallet export file and the remaining quorum of wallet recovery phrases (e.g. in a 3-5 wallet: 1 wallet export file + 2 wallet recovery phrases of any of the other copayers). +
+
+
+
Write your wallet recovery phrase
+
+ + To restore this {{index.m}}-{{index.n}} shared wallet you will need + : +
+ Your wallet recovery phrase and access to the server that coordinated the initial wallet creation. You still need {{index.m}} keys to spend. + OR the wallet recovery phrase of all copayers in the wallet + OR 1 wallet export file and the remaining quorum of wallet recovery phrases (e.g. in a 3-5 wallet: 1 wallet export file + 2 wallet recovery phrases of any of the other copayers). +
+
- -
-
- - To restore this {{index.m}}-{{index.n}} shared wallet you will need - : -
- Your wallet recovery phrase and access to the server that coordinated the initial wallet creation. You still need {{index.m}} keys to spend. - OR the wallet recovery phrases of all copayers in the wallet +
+ + To restore this {{index.m}}-{{index.n}} shared wallet you will need + : +
+ Your wallet recovery phrase and access to the server that coordinated the initial wallet creation. You still need {{index.m}} keys to spend. + OR the wallet recovery phrases of all copayers in the wallet +
+
-
-
-
-
- Wallet recovery phrase not available. You can still export it from Advanced > Export. +
+
+ Wallet recovery phrase not available. You can still export it from Advanced > Export. +
-
-
-

- - You need the wallet recovery phrase to restore this personal wallet. Write it down and keep them somewhere safe. - -

-
-
-
- {{word}}  +
+

+ + You need the wallet recovery phrase to restore this personal wallet. Write it down and keep them somewhere safe. + +

+
+
+
+ {{word}}  +
-
-
-
- - - This recovery phrase was created with a password. To recover this wallet both the recovery phrase and password are needed. - +
+
+ + + This recovery phrase was created with a password. To recover this wallet both the recovery phrase and password are needed. + +
+
+ +
+
-
- -
-
+ - - -
- +
Confirm your wallet recovery phrase

@@ -122,106 +109,97 @@

-
-
- -
-
- - - -
-
-
Enter your password
-

- In order to verify your wallet backup, please type your password: -

-
- -
-
- -
- -
-
- - - -
-
-
- -
-
Congratulations!
-

- You backed up your wallet. You can now restore this wallet at any time. -

- -
+
- -
-
-
- You can safely install your wallet on another device and use it from multiple devices at the same time. - - Learn more about Copay backups - +
+
+ + + +
+
Enter your password
+ +
+ +
+
+ + + +
+
+
+ +
+
Congratulations!
+

+ You backed up your wallet. You can now restore this wallet at any time. +

+ +
+ + +
+
+
+ You can safely install your wallet on another device and use it from multiple devices at the same time. + + Learn more about Copay backups + +
-
-
-
- -
-
Backup failed
-

- Failed to verify backup. Please check your information -

-
-
- You can safely install your wallet on another device and use it from multiple devices at the same time. - - Learn more about Copay backups - +
+
+ +
+
Backup failed
+

+ Failed to verify backup. Please check your information +

+
+
+ You can safely install your wallet on another device and use it from multiple devices at the same time. + + Learn more about Copay backups + +
+
+ +
+
- -
- -
-
-
-
-
+ + diff --git a/public/views/export.html b/public/views/export.html index 883ff8107..5232b0efb 100644 --- a/public/views/export.html +++ b/public/views/export.html @@ -1,135 +1,139 @@ -
-
-
-

-
-
-
- File/Text -
-
- QR Code -
-
-
- -
-
- - Failed to export -
- -
+ + + Export Wallet + +   +   + + +

+
+
+ File/Text +
+
+ QR Code +
+
+
+ +
+
+ + Failed to export +
+ + +
+
+ +
+ +
+ + +
+ +
+
+
+ + +
+
+ +
+
From the destination device, go to Add wallet > Import wallet and scan this QR code
+
+ +
+
Exporting via QR not supported for this wallet
+
+ + + +
+ + Do not include private key + +
+ +
+ + + + WARNING: The private key of this wallet is not available. The export allows to check the wallet balance, transaction history, and create spend proposals from the export. However, does not allow to approve (sign) proposals, so funds will not be accessible from the export. + + +
+ +
+ + + + WARNING: Not including the private key allows to check the wallet balance, transaction history, and create spend proposals from the export. However, does not allow to approve (sign) proposals, so funds will not be accessible from the export. + + +
+ +
- -
- -
- - -
- + + +
+

Export options

+ +
- - -
-
- -
-
From the destination device, go to Add wallet > Import wallet and scan this QR code
-
-
Exporting via QR not supported for this wallet
-
- - - -
- - Do not include private key - -
- -
- - - - WARNING: The private key of this wallet is not available. The export allows to check the wallet balance, transaction history, and create spend proposals from the export. However, does not allow to approve (sign) proposals, so funds will not be accessible from the export. - - -
- -
- - - - WARNING: Not including the private key allows to check the wallet balance, transaction history, and create spend proposals from the export. However, does not allow to approve (sign) proposals, so funds will not be accessible from the export. - - -
- -
-
- - -
-

Export options

- - +
+
+

Wallet Export

+
+ +
+
+ + Copy this text as it is to a safe place (notepad or email)
-
- -
-
-

Wallet Export

-
- -
-
- - Copy this text as it is to a safe place (notepad or email) -
-
-
-
-
+ + diff --git a/public/views/preferences.html b/public/views/preferences.html index 6aaab77f7..c7aa21a7a 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -1,91 +1,81 @@ - -
-
- - -
- -

- -
    - -
  • -
    - {{index.alias||index.walletName}} - + + + Wallet Settings + +   +   + + +
    +
    + Preferences
    -
    Alias
    -
  • - -
  • -
    - Disabled - {{index.preferences.email}} - -
    -
    Email Notifications
    -
  • - -
  • -
    - - -
    -
    Color
    -
  • - -
  • -
    - {{externalSource}} -
    -
    Hardware wallet
    -
  • - -
  • -
    - - Not completed +
    + Wallet Name + + {{index.alias||index.walletName}} - +
    -
    Backup
    -
  • - -
  • - -
    Advanced
    -
  • - -
- -

- Security preferences -

- -
- - Request Spending Password - - - - Scan Fingerprint - -
-
- -
    -
  • - -
    Delete recovery phrase
    -
  • -
- -
- -

-
- -
+
+ Devices + + 1 + +
+
+ Required number of signatures + + 1 + +
+
+ Hardware wallet + + {{externalSource}} + +
+
+ + Wallet Color + + {{index.alias||index.walletName}} + + +
+
+ Email Notifications + + Disabled + {{index.preferences.email}} + + +
+
+ Security +
+
+ Backup + +
+
+ + Request Spending Password + +
+
+ Delete recovery phrase + +
+
+ Advanced +
+
+ Advanced + +
+
+ + diff --git a/public/views/preferencesAdvanced.html b/public/views/preferencesAdvanced.html index 6db820e7e..6c3900a82 100644 --- a/public/views/preferencesAdvanced.html +++ b/public/views/preferencesAdvanced.html @@ -1,47 +1,40 @@ -
-
- -
- -

- -
    - -
  • - -
    Wallet Information
    -
  • - -
  • - -
    Sweep paper wallet
    -
  • - -
  • - -
    Export Wallet
    -
  • - -
  • - -
    Wallet Service URL
    -
  • - -
  • - -
    Transaction History
    -
  • - -
  • - -
    Delete Wallet
    -
  • - -
- -
-
- + + + Advanced Preferences + +   +   + + +
+
+
+
+ Wallet Information + +
+
+ Sweep paper wallet + +
+
+ Export Wallet + +
+
+ Wallet Service URL + +
+
+ Transaction History + +
+
+ Delete Wallet + +
+
+
+
diff --git a/public/views/preferencesAlias.html b/public/views/preferencesAlias.html index 1f7e4c02e..98d95c54c 100644 --- a/public/views/preferencesAlias.html +++ b/public/views/preferencesAlias.html @@ -1,19 +1,20 @@ -
-
- -
- -

-
- - - -
-
Changing wallet alias only affects the local wallet name. -
-
-
+ + + Alias + +   +   + + +
+ + +
+
Changing wallet alias only affects the local wallet name.
+
+
diff --git a/public/views/preferencesBwsUrl.html b/public/views/preferencesBwsUrl.html index 63fb44c72..94249b5ba 100644 --- a/public/views/preferencesBwsUrl.html +++ b/public/views/preferencesBwsUrl.html @@ -1,17 +1,19 @@ -
-
- -
-

-
- - Set default url - - -
-
-
+ + + Wallet Service URL + +   +   + + +
+ + +
+
+
diff --git a/public/views/preferencesColor.html b/public/views/preferencesColor.html index 5c0c33faf..d28f1f6f7 100644 --- a/public/views/preferencesColor.html +++ b/public/views/preferencesColor.html @@ -1,11 +1,15 @@ -
-
- -
-

- - - - -
+ + + Color + +   +   + + + + + + + diff --git a/public/views/preferencesDeleteWallet.html b/public/views/preferencesDeleteWallet.html index ed729f44f..04969db7a 100644 --- a/public/views/preferencesDeleteWallet.html +++ b/public/views/preferencesDeleteWallet.html @@ -1,21 +1,18 @@ -
-
- -
-
-
Warning!
-
Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED
-
- -
    -
  • -
    - {{index.walletName}} ({{index.alias}}) -
    -
    Delete wallet
    -
  • -
-
+ + + Delete Wallet + +   +   + + +
Warning!
+
Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED
+
+ {{index.walletName}}({{index.alias}}) +
+ +
+
diff --git a/public/views/preferencesDeleteWords.html b/public/views/preferencesDeleteWords.html index c7efc4670..54b72dc9d 100644 --- a/public/views/preferencesDeleteWords.html +++ b/public/views/preferencesDeleteWords.html @@ -1,35 +1,26 @@ -
-
- - -
- -
-
-
+ + + Delete Recovery Phrase + +   +   + + +
+
{{error|translate}}
-
Warning!
-
Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.
-
Need to do backup
+
Warning!
+
Once you have copied your wallet recovery phrase down, it is recommended to delete it from this device.
+
Need to do backup
+
+ +
-
    -
  • -
    - {{index.walletName}} ({{index.alias}}) -
    -
    Delete Recovery Phrase
    -
  • -
-
- -
-
+
Wallet recovery phrase not available. You can still export it from Advanced > Export.
-
- -
+ + diff --git a/public/views/preferencesEmail.html b/public/views/preferencesEmail.html index 765586654..7af7b5b62 100644 --- a/public/views/preferencesEmail.html +++ b/public/views/preferencesEmail.html @@ -1,25 +1,21 @@ -
-
- -
-

- -
-
- - {{error|translate}} - + + + Email Notifications + +   +   + + + + + + +
Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include your wallet addresses and its balance, but no more.
- - - - - -
Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include your wallet addresses and its balance, but no more. -
-
-
+ + diff --git a/public/views/preferencesHistory.html b/public/views/preferencesHistory.html index f0560b6fe..afe85b24f 100644 --- a/public/views/preferencesHistory.html +++ b/public/views/preferencesHistory.html @@ -1,24 +1,25 @@ -
-
-
-

- -
    -
  • - - Export to file - -
  • -
  • - preparing... + + + Transaction History + +   +   + + +
    +
    Export to file -
  • -
  • - Clear cache -
  • -
-
+
+
+ Export to file + + preparing... + +
+
+ Clear cache +
+ + diff --git a/public/views/preferencesInformation.html b/public/views/preferencesInformation.html index 9e94fde71..7e0587475 100644 --- a/public/views/preferencesInformation.html +++ b/public/views/preferencesInformation.html @@ -1,147 +1,137 @@ -
-
-
-

Wallet Information

- -
    -
  • - BETA: Android Key Derivation Test: - + + + Wallet Information + +   +   + + +
    +
    + Wallet Information +
    +
    + BETA: Android Key Derivation Test: + {{androidTest}} -
  • - -
  • +
+
Wallet Name (at creation) - + {{walletName}} - - -
  • +
  • +
    Wallet Id - + {{walletId}} - - -
  • +
  • +
    Wallet Configuration (m-n) - + {{M}}-{{N}} - - -
  • +
  • +
    Wallet Network - + {{network}} - - -
  • +
  • +
    Address Type - + {{addressType}} - - -
  • +
  • +
    Derivation Strategy - + {{derivationStrategy}} - - -
  • - Hardware Wallet - - {{index.externalSource}} +
  • +
    + Hardware Wallet + + {{index.externalSource}} - - -
  • +
  • +
    - + No private key - - -
  • - Account ({{derivationStrategy}}) - +
  • +
    + Account({{derivationStrategy}}) + #{{index.account}} - +
    -

    Copayers

    -
  • - - {{copayer.name}} ({{'Me'|translate}}) - - - {{copayer.name}} - -
  • +
    + Copayers +
    -

    Extended Public Keys

    -
  • -
    -
    Copayer {{$index}}
    -
    -
    {{pk}}
    -
    - ({{basePath}}) -
    -
    +
    + {{copayer.name}} ({{'Me'|translate}}) + {{copayer.name}} + +
    + +
    + Extended Public Keys +
    + +
    + Copayer {{$index}}< + + + Copayer {{$index}} + {{pk}} + ({{basePath}}) + +
    + +
    +
    + Last Wallet Addresses
    -
  • - -
    -

    Last Wallet Addresses

    -
      -
    • -
      - {{a.address}} -
      -
      - {{a.path}} · {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }} -
      -
    • -
    -
    - Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time. +
    + {{a.address}} + {{a.path}} · {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }} + +
    +
    + Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time. +
    +
      +
    • + Scan addresses for funds +
    • +
    • + Send addresses by email +
    • +
    -
      -
    • - Scan addresses for funds -
    • -
    • - Send addresses by email -
    • -
    -
    - -
      -
      -

      Balance By Address

      -
    • -
      - {{a.address}} -
      -
      +
      +
      + Balance By Address +
      +
      + {{a.address}} + {{(a.amount/1e8).toFixed(8)}} BTC -
      -
    • + +
    - - -

    -
    -
    +
    + + diff --git a/public/views/preferencesLanguage.html b/public/views/preferencesLanguage.html index 2f91c9cb5..4509bd097 100644 --- a/public/views/preferencesLanguage.html +++ b/public/views/preferencesLanguage.html @@ -1,11 +1,11 @@ - Languages - -   + Languages + +   +   {{wallet.name}} - + + + diff --git a/src/js/controllers/preferencesAlias.js b/src/js/controllers/preferencesAlias.js index 14cb02f25..aeec31fcd 100644 --- a/src/js/controllers/preferencesAlias.js +++ b/src/js/controllers/preferencesAlias.js @@ -2,12 +2,14 @@ angular.module('copayApp.controllers').controller('preferencesAliasController', function($scope, $timeout, configService, profileService, go) { + var fc = profileService.focusedClient; var walletId = fc.credentials.walletId; var config = configService.getSync(); config.aliasFor = config.aliasFor || {}; - $scope.alias = config.aliasFor[walletId] || fc.credentials.walletName; + $scope.walletName = fc.credentials.walletName; + $scope.alias = config.aliasFor[walletId] || $scope.walletName; $scope.save = function() { var opts = { diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js index 9baa87599..5a7d233ee 100644 --- a/src/js/controllers/preferencesEmail.js +++ b/src/js/controllers/preferencesEmail.js @@ -1,19 +1,18 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, go, profileService, walletService) { + $scope.save = function(form) { - $scope.error = null; - $scope.saving = true; var fc = profileService.focusedClient; var email = $scope.email || ''; walletService.updateRemotePreferences(fc, { email: email, }, function(err) { - $scope.saving = false; if (!err) $rootScope.$emit('Local/EmailUpdated', email); go.path('preferences'); }); }; + });