From aea0cb0428a37a34cc2c999a0a1bccb1e9b599ca Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 29 Aug 2016 16:48:15 -0300 Subject: [PATCH] refactor navigation parameters --- chrome-app/manifest.json | 4 ++-- package.json | 4 ++-- public/views/backup.html | 19 +++++++++---------- public/views/preferences.html | 13 +++++-------- public/views/preferencesAbout.html | 9 ++++----- public/views/preferencesAdvanced.html | 12 +++++------- public/views/preferencesAlias.html | 11 ++++------- public/views/preferencesAltCurrency.html | 11 ++++------- public/views/preferencesBwsUrl.html | 11 ++++------- public/views/preferencesColor.html | 11 ++++------- public/views/preferencesDeleteWallet.html | 11 ++++------- public/views/preferencesDeleteWords.html | 11 ++++------- public/views/preferencesEmail.html | 11 ++++------- public/views/preferencesFee.html | 11 ++++------- public/views/preferencesHistory.html | 13 +++++-------- public/views/preferencesInformation.html | 11 ++++------- public/views/preferencesLanguage.html | 11 ++++------- public/views/preferencesLogs.html | 11 ++++------- public/views/preferencesUnit.html | 13 +++++-------- public/views/termsOfUse.html | 12 +++++------- public/views/translators.html | 12 +++++------- src/js/controllers/backup.js | 11 ++++------- src/js/controllers/import.js | 6 +++++- src/js/controllers/preferences.js | 8 ++++---- src/js/controllers/preferencesAbout.js | 4 +++- src/js/controllers/preferencesAlias.js | 6 +++--- src/js/controllers/preferencesAltCurrency.js | 5 +++-- src/js/controllers/preferencesBwsUrl.js | 3 ++- src/js/controllers/preferencesColor.js | 6 +++--- src/js/controllers/preferencesDelete.js | 4 ++-- src/js/controllers/preferencesDeleteWords.js | 7 +++---- src/js/controllers/preferencesEmail.js | 6 +++--- src/js/controllers/preferencesFee.js | 4 +++- src/js/controllers/preferencesHistory.js | 4 ++-- src/js/controllers/preferencesInformation.js | 5 +++-- src/js/controllers/preferencesLanguage.js | 5 +++-- src/js/controllers/preferencesLogs.js | 3 ++- src/js/controllers/preferencesUnit.js | 5 +++-- src/js/controllers/termOfUse.js | 5 ++--- src/js/routes.js | 6 +++++- src/sass/main.scss | 11 +++++++++++ 41 files changed, 160 insertions(+), 186 deletions(-) diff --git a/chrome-app/manifest.json b/chrome-app/manifest.json index 7f7f2324b..e6320e72a 100644 --- a/chrome-app/manifest.json +++ b/chrome-app/manifest.json @@ -1,6 +1,6 @@ - { + { "//":"PLEASE! Do not edit this file directly", - "//":" Modify it at app-template/", + "//":" Modify it at app-template/", "manifest_version": 2, "name": "BitPay", diff --git a/package.json b/package.json index dbd5438d2..24776e4fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ - { + { "//":"PLEASE! Do not edit this file directly", - "//":" Modify it at app-template/", + "//":" Modify it at app-template/", "name": "bitpay", "description": "The BitPay Bitcoin Wallet", diff --git a/public/views/backup.html b/public/views/backup.html index 46cb5ce27..c4a41b2cf 100644 --- a/public/views/backup.html +++ b/public/views/backup.html @@ -1,16 +1,15 @@ - - - -   -   + + + + {{'Back' | translate}} + - +
-delete mnemonics. You can still export it. -
+ Wallet recovery phrase not available. You can still export it from Advanced > Export. + + diff --git a/public/views/preferences.html b/public/views/preferences.html index 6e761c24a..f1fc1d0a3 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -1,13 +1,10 @@ - - Wallet Settings - - - + + + {{'Back' | translate}} + - +
Preferences diff --git a/public/views/preferencesAbout.html b/public/views/preferencesAbout.html index 61da7a984..611538017 100644 --- a/public/views/preferencesAbout.html +++ b/public/views/preferencesAbout.html @@ -1,13 +1,12 @@ - - About Copay + - - +
Release information
diff --git a/public/views/preferencesAdvanced.html b/public/views/preferencesAdvanced.html index a0905df99..406ab13a1 100644 --- a/public/views/preferencesAdvanced.html +++ b/public/views/preferencesAdvanced.html @@ -1,11 +1,9 @@ - - Advanced Preferences - - - + + {{'Advanced Preferences' | translate}} + + {{'Back' | translate}} +
diff --git a/public/views/preferencesAlias.html b/public/views/preferencesAlias.html index 9bbf54198..68d8b4996 100644 --- a/public/views/preferencesAlias.html +++ b/public/views/preferencesAlias.html @@ -1,11 +1,8 @@ - - Alias - - - + + + {{'Back' | translate}} +
diff --git a/public/views/preferencesAltCurrency.html b/public/views/preferencesAltCurrency.html index 60c2cbfe6..47114b9c2 100644 --- a/public/views/preferencesAltCurrency.html +++ b/public/views/preferencesAltCurrency.html @@ -1,11 +1,8 @@ - - Alternative Currency - - - + + + {{'Back' | translate}} + - - Wallet Service URL - - - + + + {{'Back' | translate}} + diff --git a/public/views/preferencesColor.html b/public/views/preferencesColor.html index 2c12a4d3e..747c1b1e4 100644 --- a/public/views/preferencesColor.html +++ b/public/views/preferencesColor.html @@ -1,11 +1,8 @@ - - Color - - - + + + {{'Back' | translate}} + diff --git a/public/views/preferencesDeleteWallet.html b/public/views/preferencesDeleteWallet.html index 5a2ee8d3e..eb8192c16 100644 --- a/public/views/preferencesDeleteWallet.html +++ b/public/views/preferencesDeleteWallet.html @@ -1,11 +1,8 @@ - - Delete Wallet - - - + + + {{'Back' | translate}} +
Warning!
diff --git a/public/views/preferencesDeleteWords.html b/public/views/preferencesDeleteWords.html index d0810d09d..abdadd91c 100644 --- a/public/views/preferencesDeleteWords.html +++ b/public/views/preferencesDeleteWords.html @@ -1,11 +1,8 @@ - - Delete Recovery Phrase - - - + + + {{'Back' | translate}} +
diff --git a/public/views/preferencesEmail.html b/public/views/preferencesEmail.html index 59dd8ccf0..0cca13933 100644 --- a/public/views/preferencesEmail.html +++ b/public/views/preferencesEmail.html @@ -1,11 +1,8 @@ - - Email Notifications - - - + + + {{'Back' | translate}} + diff --git a/public/views/preferencesFee.html b/public/views/preferencesFee.html index 616f9ed7a..842adf979 100644 --- a/public/views/preferencesFee.html +++ b/public/views/preferencesFee.html @@ -1,11 +1,8 @@ - - Preferences fee - - - + + + {{'Back' | translate}} + diff --git a/public/views/preferencesHistory.html b/public/views/preferencesHistory.html index 88e7087ac..e8a732834 100644 --- a/public/views/preferencesHistory.html +++ b/public/views/preferencesHistory.html @@ -1,13 +1,10 @@ - - Transaction History - - - + + + {{'Back' | translate}} + - +
Export to file diff --git a/public/views/preferencesInformation.html b/public/views/preferencesInformation.html index 773821617..a15e4cb0a 100644 --- a/public/views/preferencesInformation.html +++ b/public/views/preferencesInformation.html @@ -1,11 +1,8 @@ - - Wallet Information - - - + + + {{'Back' | translate}} +
diff --git a/public/views/preferencesLanguage.html b/public/views/preferencesLanguage.html index 5d4565bb1..493fb9570 100644 --- a/public/views/preferencesLanguage.html +++ b/public/views/preferencesLanguage.html @@ -1,11 +1,8 @@ - - Languages - - - + + + {{'Back' | translate}} + - - Session log - - - + + + {{'Back' | translate}} + - - + + + {{'Back' | translate}} + + {{unit.shortName}} diff --git a/public/views/termsOfUse.html b/public/views/termsOfUse.html index 3995003f7..b1d40739b 100644 --- a/public/views/termsOfUse.html +++ b/public/views/termsOfUse.html @@ -1,12 +1,10 @@ - - Terms of Use - - - + + + {{'Back' | translate}} + +

diff --git a/public/views/translators.html b/public/views/translators.html index da8c182cd..84aabea3a 100644 --- a/public/views/translators.html +++ b/public/views/translators.html @@ -1,11 +1,9 @@ - - Translators - - - + + {{'Translators' | translate}} + + {{'Back' | translate}} +

Translation Credits

diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index ad8c3cd3e..f14000986 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -1,10 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('backupController', - function($rootScope, $scope, $timeout, $log, $state, $stateParams, $ionicPopup, uxLanguage, lodash, fingerprintService, platformInfo, configService, profileService, gettext, bwcService, walletService, ongoingProcess) { - + function($rootScope, $scope, $timeout, $log, $state, $stateParams, $ionicPopup, $ionicNavBarDelegate, gettextCatalog, uxLanguage, lodash, fingerprintService, platformInfo, configService, profileService, bwcService, walletService, ongoingProcess) { var wallet = profileService.getWallet($stateParams.walletId); - $scope.walletName = wallet.credentials.walletName; + $ionicNavBarDelegate.title(gettextCatalog.getString(wallet.credentials.walletName)); $scope.n = wallet.n; var keys; @@ -71,8 +70,7 @@ angular.module('copayApp.controllers').controller('backupController', if ($scope.step == 1) { if ($stateParams.fromOnboarding) $state.go('onboarding.backupRequest'); else $state.go('wallet.preferences'); - } - else { + } else { $scope.goToStep($scope.step - 1); } }; @@ -98,8 +96,7 @@ angular.module('copayApp.controllers').controller('backupController', confirmBackupPopup.close(); if ($stateParams.fromOnboarding) $state.go('onboarding.disclaimer'); else $state.go('tabs.home') - } - else { + } else { confirmBackupPopup.close(); $scope.goToStep(1); } diff --git a/src/js/controllers/import.js b/src/js/controllers/import.js index 9f1f5cb61..6e4b4deab 100644 --- a/src/js/controllers/import.js +++ b/src/js/controllers/import.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('importController', - function($scope, $rootScope, $timeout, $log, $state, $stateParams, profileService, configService, sjcl, gettext, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService) { + function($scope, $rootScope, $timeout, $log, $state, $stateParams, $ionicHistory, profileService, configService, sjcl, gettext, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService) { var isChromeApp = platformInfo.isChromeApp; var isDevel = platformInfo.isDevel; @@ -15,6 +15,10 @@ angular.module('copayApp.controllers').controller('importController', $scope.account = 1; $scope.importErr = false; + $scope.goBack = function() { + $ionicHistory.goBack(); + }; + var updateSeedSourceSelect = function() { $scope.seedOptions = []; diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js index 92fb04344..65d95f618 100644 --- a/src/js/controllers/preferences.js +++ b/src/js/controllers/preferences.js @@ -1,8 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesController', - function($scope, $rootScope, $timeout, $log, $stateParams, configService, profileService, fingerprintService, walletService, $state) { - + function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, fingerprintService, walletService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Preferences')); var wallet = profileService.getWallet($stateParams.walletId); var walletId = wallet.credentials.walletId; $scope.wallet = wallet; @@ -10,8 +10,8 @@ angular.module('copayApp.controllers').controller('preferencesController', $scope.init = function() { $scope.externalSource = null; - if (!wallet) - return $state.go('tabs.home'); + if (!wallet) + return $ionicHistory.goBack(); var config = configService.getSync(); config.aliasFor = config.aliasFor || {}; diff --git a/src/js/controllers/preferencesAbout.js b/src/js/controllers/preferencesAbout.js index 9a88ccbb9..d410eec64 100644 --- a/src/js/controllers/preferencesAbout.js +++ b/src/js/controllers/preferencesAbout.js @@ -1,4 +1,6 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesAbout', - function() {}); + function($ionicNavBarDelegate, gettextCatalog) { + $ionicNavBarDelegate.title(gettextCatalog.getString('About Copay')); + }); diff --git a/src/js/controllers/preferencesAlias.js b/src/js/controllers/preferencesAlias.js index f5537c9f7..41557fa80 100644 --- a/src/js/controllers/preferencesAlias.js +++ b/src/js/controllers/preferencesAlias.js @@ -1,8 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesAliasController', - function($scope, $timeout, $stateParams, $state, configService, profileService, walletService) { - + function($scope, $timeout, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, walletService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Alias')); var wallet = profileService.getWallet($stateParams.walletId); $scope.wallet = wallet; var walletId = wallet.credentials.walletId; @@ -20,7 +20,7 @@ angular.module('copayApp.controllers').controller('preferencesAliasController', configService.set(opts, function(err) { if (err) $log.warn(err); - $state.go('wallet.preferences') + $ionicHistory.goBack(); }); }; }); diff --git a/src/js/controllers/preferencesAltCurrency.js b/src/js/controllers/preferencesAltCurrency.js index 290e5187b..bd1aaf674 100644 --- a/src/js/controllers/preferencesAltCurrency.js +++ b/src/js/controllers/preferencesAltCurrency.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesAltCurrencyController', - function($scope, $log, $state, $timeout, configService, rateService, lodash, profileService, walletService) { + function($scope, $log, $timeout, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, configService, rateService, lodash, profileService, walletService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Alternative Currency')); var next = 10; var completeAlternativeList; @@ -42,8 +43,8 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl configService.set(opts, function(err) { if (err) $log.warn(err); - $state.go('tabs.settings'); + $ionicHistory.goBack(); walletService.updateRemotePreferences(profileService.getWallets(), {}, function() { $log.debug('Remote preferences saved'); }); diff --git a/src/js/controllers/preferencesBwsUrl.js b/src/js/controllers/preferencesBwsUrl.js index 3b39ee407..0c886148a 100644 --- a/src/js/controllers/preferencesBwsUrl.js +++ b/src/js/controllers/preferencesBwsUrl.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesBwsUrlController', - function($scope, $log, $stateParams, configService, applicationService, profileService, storageService) { + function($scope, $log, $stateParams, $ionicNavBarDelegate, configService, applicationService, profileService, storageService) { + $ionicNavBarDelegate.title('Wallet Service URL'); $scope.error = null; $scope.success = null; diff --git a/src/js/controllers/preferencesColor.js b/src/js/controllers/preferencesColor.js index a6ebe7ca8..fb9ecf737 100644 --- a/src/js/controllers/preferencesColor.js +++ b/src/js/controllers/preferencesColor.js @@ -1,7 +1,7 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, $stateParams, $state, configService, profileService) { - +angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Color')); $scope.colorList = [ '#DD4B39', '#F38F12', @@ -35,7 +35,7 @@ angular.module('copayApp.controllers').controller('preferencesColorController', configService.set(opts, function(err) { if (err) $log.warn(err); - $state.go('wallet.preferences'); + $ionicHistory.goBack(); }); }; }); diff --git a/src/js/controllers/preferencesDelete.js b/src/js/controllers/preferencesDelete.js index 98ab2d080..fa0d3bca2 100644 --- a/src/js/controllers/preferencesDelete.js +++ b/src/js/controllers/preferencesDelete.js @@ -1,12 +1,12 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', - function($scope, $ionicPopup, $stateParams, lodash, profileService, $state, gettextCatalog, ongoingProcess) { + function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, gettextCatalog, lodash, profileService, $state, ongoingProcess) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Delete Wallet')); var wallet = profileService.getWallet($stateParams.walletId); $scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' '; $scope.walletName = '[' + wallet.credentials.walletName + ']'; $scope.error = null; - var walletName = $scope.alias || $scope.walletName; $scope.showDeletePopup = function() { var popup = $ionicPopup.show({ diff --git a/src/js/controllers/preferencesDeleteWords.js b/src/js/controllers/preferencesDeleteWords.js index f64134302..8a5f777b3 100644 --- a/src/js/controllers/preferencesDeleteWords.js +++ b/src/js/controllers/preferencesDeleteWords.js @@ -1,7 +1,7 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, $state, $stateParams, confirmDialog, lodash, notification, profileService, walletService, gettext) { - +angular.module('copayApp.controllers').controller('preferencesDeleteWordsController', function($scope, $ionicHistory, $stateParams, $ionicNavBarDelegate, gettextCatalog, confirmDialog, lodash, profileService, walletService, gettext) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Delete recovery phrase')); var wallet = profileService.getWallet($stateParams.walletId); var msg = gettext('Are you sure you want to delete the recovery phrase?'); var successMsg = gettext('Recovery phrase deleted'); @@ -17,8 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWordsControl if (ok) { wallet.clearMnemonic(); profileService.updateCredentials(JSON.parse(wallet.export()), function() { - notification.success(successMsg); - $state.go('wallet.details'); + $ionicHistory.goBack(); }); } }); diff --git a/src/js/controllers/preferencesEmail.js b/src/js/controllers/preferencesEmail.js index 6e929e7f6..7d24ef4ec 100644 --- a/src/js/controllers/preferencesEmail.js +++ b/src/js/controllers/preferencesEmail.js @@ -1,7 +1,7 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $state, $stateParams, profileService, walletService) { - +angular.module('copayApp.controllers').controller('preferencesEmailController', function($rootScope, $scope, $ionicHistory, $stateParams, $ionicNavBarDelegate, gettextCatalog, profileService, walletService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Email Notifications')); $scope.save = function(form) { var wallet = profileService.getWallet($stateParams.walletId); var email = $scope.email || ''; @@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('preferencesEmailController', email: email, }, function(err) { if (err) $log.warn(err); - $state.go('wallet.preferences'); + $ionicHistory.goBack(); }); }; diff --git a/src/js/controllers/preferencesFee.js b/src/js/controllers/preferencesFee.js index b0591a6ce..e254f0411 100644 --- a/src/js/controllers/preferencesFee.js +++ b/src/js/controllers/preferencesFee.js @@ -1,6 +1,7 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, configService, feeService) { +angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, feeService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Preferences fee')); $scope.init = function() { $scope.loading = true; @@ -25,6 +26,7 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu configService.set(opts, function(err) { if (err) $log.debug(err); $scope.currentFeeLevel = newFee.level; + $ionicHistory.goBack(); $timeout(function() { $scope.$apply(); }, 10); diff --git a/src/js/controllers/preferencesHistory.js b/src/js/controllers/preferencesHistory.js index 8ce711ea9..6ac41aea0 100644 --- a/src/js/controllers/preferencesHistory.js +++ b/src/js/controllers/preferencesHistory.js @@ -1,8 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesHistory', - function($scope, $log, $stateParams, $timeout, storageService, $state, profileService, lodash) { - + function($scope, $log, $stateParams, $timeout, $ionicNavBarDelegate, gettextCatalog, storageService, $state, profileService, lodash) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Transaction History')); var wallet = profileService.getWallet($stateParams.walletId); var c = wallet.credentials; $scope.csvReady = false; diff --git a/src/js/controllers/preferencesInformation.js b/src/js/controllers/preferencesInformation.js index ac2f205bc..2848d95ce 100644 --- a/src/js/controllers/preferencesInformation.js +++ b/src/js/controllers/preferencesInformation.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesInformation', - function($scope, $log, $timeout, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) { + function($scope, $log, $timeout, $ionicNavBarDelegate, platformInfo, gettextCatalog, lodash, profileService, configService, $stateParams, walletService, $state) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Wallet Information')); var base = 'xpub'; var wallet = profileService.getWallet($stateParams.walletId); var walletId = wallet.id; @@ -12,7 +13,7 @@ angular.module('copayApp.controllers').controller('preferencesInformation', config.colorFor = config.colorFor || {}; $scope.init = function() { - var c =wallet.credentials; + var c = wallet.credentials; var basePath = c.getBaseAddressDerivationPath(); $scope.wallet = wallet; diff --git a/src/js/controllers/preferencesLanguage.js b/src/js/controllers/preferencesLanguage.js index 1cd78702d..0406d3542 100644 --- a/src/js/controllers/preferencesLanguage.js +++ b/src/js/controllers/preferencesLanguage.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesLanguageController', - function($scope, $log, $state, configService, profileService, uxLanguage, walletService) { + function($scope, $log, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, configService, profileService, uxLanguage, walletService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Language')); $scope.init = function() { $scope.availableLanguages = uxLanguage.getLanguages(); @@ -20,7 +21,7 @@ angular.module('copayApp.controllers').controller('preferencesLanguageController configService.set(opts, function(err) { if (err) $log.warn(err); - $state.go('tabs.settings') + $ionicHistory.goBack(); uxLanguage.update(function() { walletService.updateRemotePreferences(profileService.getWallets(), {}, function() { $log.debug('Remote preferences saved'); diff --git a/src/js/controllers/preferencesLogs.js b/src/js/controllers/preferencesLogs.js index 6db095b6e..153a279aa 100644 --- a/src/js/controllers/preferencesLogs.js +++ b/src/js/controllers/preferencesLogs.js @@ -1,7 +1,8 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesLogs', - function($scope, historicLog) { + function($scope, historicLog, $ionicNavBarDelegate, gettextCatalog) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Session Log')); $scope.init = function() { $scope.logs = historicLog.get(); diff --git a/src/js/controllers/preferencesUnit.js b/src/js/controllers/preferencesUnit.js index 5fdc78aba..3c3a2ddd9 100644 --- a/src/js/controllers/preferencesUnit.js +++ b/src/js/controllers/preferencesUnit.js @@ -1,6 +1,7 @@ 'use strict'; -angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $state, walletService, profileService) { +angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, walletService, profileService) { + $ionicNavBarDelegate.title(gettextCatalog.getString('Unit')); $scope.init = function() { var config = configService.getSync(); @@ -36,7 +37,7 @@ angular.module('copayApp.controllers').controller('preferencesUnitController', f configService.set(opts, function(err) { if (err) $log.warn(err); - $state.go('tabs.settings'); + $ionicHistory.goBack(); walletService.updateRemotePreferences(profileService.getWallets(), {}, function() { $log.debug('Remote preferences saved'); }); diff --git a/src/js/controllers/termOfUse.js b/src/js/controllers/termOfUse.js index 846272e40..c66f55b8c 100644 --- a/src/js/controllers/termOfUse.js +++ b/src/js/controllers/termOfUse.js @@ -1,8 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('termOfUseController', - function($scope, uxLanguage) { - + function($scope, uxLanguage, $ionicNavBarDelegate, gettextCatalog) { + $ionicNavBarDelegate.title(gettextCatalog.getString('About Copay')); $scope.lang = uxLanguage.currentLanguage; - }); diff --git a/src/js/routes.js b/src/js/routes.js index da4adaf89..44c63ff8e 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -29,6 +29,10 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr $ionicConfigProvider.navBar.positionPrimaryButtons('left'); $ionicConfigProvider.navBar.positionSecondaryButtons('right'); + // NAV BACK-BUTTON TEXT/ICON + $ionicConfigProvider.backButton.icon('ion-chevron-left'); + $ionicConfigProvider.backButton.previousTitleText(false); + $logProvider.debugEnabled(true); $provide.decorator('$log', ['$delegate', 'platformInfo', function($delegate, platformInfo) { @@ -95,7 +99,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr * */ - .state('unsupported', { + .state('unsupported', { url: '/unsupported', templateUrl: 'views/unsupported.html' }) diff --git a/src/sass/main.scss b/src/sass/main.scss index 4a8d52f4f..535db7a93 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -850,6 +850,7 @@ ul.wallet-selection.wallets { .no-border { border-style: none; + background-color: transparent !important; } input[type=file] { @@ -874,6 +875,16 @@ input[type=file] { .wallets { height: 90px; } + +.bar .button.back-button { + color: #444; + font-size: 14px; +} + +.bar .button.button-clear .icon:before { + font-size: 16px; +} + /* * Calculator */