From e992b976e0f073dd6424af0ed7477868836b59fb Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 3 Sep 2014 11:27:31 -0300 Subject: [PATCH] settings: refactor views --- js/controllers/more.js | 10 ++--- js/controllers/settings.js | 2 - views/more.html | 78 +++++++++++++++++++++++--------------- views/settings.html | 46 ++++++---------------- 4 files changed, 63 insertions(+), 73 deletions(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index 87c76ebec..5e148c2a5 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -4,8 +4,8 @@ angular.module('copayApp.controllers').controller('MoreController', function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils, notification) { var w = $rootScope.wallet; - $scope.hideAdv=true; - $scope.hidePriv=true; + $scope.hideAdv = true; + $scope.hidePriv = true; if (w) $scope.priv = w.privateKey.toObj().extendedPrivateKeyString; @@ -24,7 +24,7 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.purge = function(deleteAll) { var w = $rootScope.wallet; var removed = w.purgeTxProposals(deleteAll); - if (removed){ + if (removed) { controllerUtils.updateBalance(); } notification.info('Tx Proposals Purged', removed + ' transaction proposal purged'); @@ -32,14 +32,14 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.updateIndexes = function() { var w = $rootScope.wallet; - notification.info('Scaning for transactions','Using derived addresses from your wallet'); + notification.info('Scaning for transactions', 'Using derived addresses from your wallet'); w.updateIndexes(function(err) { notification.info('Scan Ended', 'Updating balance'); if (err) { notification.error('Error', 'Error updating indexes: ' + err); } controllerUtils.updateAddressList(); - controllerUtils.updateBalance(function(){ + controllerUtils.updateBalance(function() { notification.info('Finished', 'The balance is updated using the derived addresses'); w.sendIndexes(); }); diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 4e3020666..578e6ac0d 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -4,11 +4,9 @@ angular.module('copayApp.controllers').controller('SettingsController', function controllerUtils.redirIfLogged(); $scope.title = 'Settings'; - $scope.networkName = config.networkName; $scope.insightHost = config.blockchain.host; $scope.insightPort = config.blockchain.port; $scope.insightSecure = config.blockchain.schema === 'https'; - $scope.forceNetwork = config.forceNetwork; $scope.defaultLanguage = config.defaultLanguage || 'en'; $scope.availableLanguages = [{ diff --git a/views/more.html b/views/more.html index 78943d5d8..cc993d32f 100644 --- a/views/more.html +++ b/views/more.html @@ -1,62 +1,79 @@

Settings

-
-

Backup

-

It's important to backup your wallet so that you can recover it in case of disaster

- +
+

Backup

+

It's important to backup your wallet so that you can recover it in case of disaster

+ -
+
+
+
+
+ Wallet Unit + +
+
+ Alternative Currency + +
+ +
+ +
+
+
-

- Delete Wallet

-

If all funds have been removed from your wallet and you do not wish to have the wallet data stored on your computer anymore, you can delete your wallet.

+

Delete Wallet

+

If all funds have been removed from your wallet and you do not wish to have the wallet data stored on your computer anymore, you can delete your wallet.

- - Show - Hide - advanced options - + + Show + Hide + advanced options + -

-
-

+
+
+

Master Private Key

Your master private key contains the information to sign any transaction on this wallet. Handle with care.

-
-
-

Scan Wallet Addresses

+
+
+

Scan Wallet Addresses

- This will scan the blockchain looking for addresses derived from your wallet, in case you have funds in addresses not yet generated (e.g.: you restored an old backup). This will also trigger a syncronization of addresses to other connected peers. + This will scan the blockchain looking for addresses derived from your wallet, in case you have funds in addresses not yet generated (e.g.: you restored an old backup). This will also trigger a syncronization of addresses to other connected peers.

-
-
-

Purge Pending Transaction Proposals

+
+
+

Purge Pending Transaction Proposals

- Pending Transactions Proposals will be discarted. This need to be done on ALL peers of a wallet, to prevent the old proposals to be resynced again. + Pending Transactions Proposals will be discarted. This need to be done on ALL peers of a wallet, to prevent the old proposals to be resynced again.

- diff --git a/views/settings.html b/views/settings.html index 0c4ceaf18..b9ce464ac 100644 --- a/views/settings.html +++ b/views/settings.html @@ -10,45 +10,22 @@
Language -
-
- Bitcoin Network - - -
- Network has been fixed to {{networkName}} in this setup. See copay.io for options to use Copay on both livenet and testnet. -
-
-
- Wallet Unit - -
-
- Alternative Currency - -
-
- Insight API server - - - - - - + Insight API server + + + + + + -

- Insight API server is open-source software. You can run your own instance, check Insight API Homepage

+

+ Insight API server is open-source software. You can run your own instance, check Insight API Homepage +

-
« Back

-