refactor navigation parameters

This commit is contained in:
Javier 2016-08-29 16:48:15 -03:00
parent de9ae56557
commit aea0cb0428
41 changed files with 160 additions and 186 deletions

View File

@ -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",

View File

@ -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",

View File

@ -1,16 +1,15 @@
<ion-view ng-controller="backupController" ng-init="init()">
<ion-nav-bar class="bar-stable">
<ion-nav-buttons side="primary">
 <button class="button no-border" ng-click="goBack()">
     <i class="icon ion-chevron-left"></i>Back
   </button>
  </ion-nav-buttons>
<ion-view>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<ion-content ng-controller="backupController" ng-init="init()">
<div ng-show="deleted">
delete mnemonics. You can still export it.
</div >
<span translate>Wallet recovery phrase not available. You can still export it from Advanced &gt; Export.</span>
</div>
<!--
## STEP 1
-->

View File

@ -1,13 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Settings</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.details">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesController" ng-init="init()">
<ion-content ng-controller="preferencesController" ng-init="init()">
<div class="list">
<div class="item item-divider">
Preferences

View File

@ -1,13 +1,12 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>About Copay</ion-nav-title>
<ion-nav-bar>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> Back
<button class="button button-stable no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> {{'Back' | translate}}
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content ng-controller="preferencesAbout" >
<ion-content ng-controller="preferencesAbout">
<div class="item item-divider">
Release information
</div>

View File

@ -1,11 +1,9 @@
<ion-view >
<ion-nav-bar class="bar-stable">
<ion-nav-title>Advanced Preferences</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferences">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-title>{{'Advanced Preferences' | translate}}</ion-nav-title>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="list">

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Alias</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferences">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAliasController" >
<form name="aliasForm" ng-submit="save(aliasForm)" novalidate>

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Alternative Currency</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesAltCurrencyController" ng-init="init()" >
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Service URL</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesBwsUrlController" >
<form name="settingsBwsUrlForm" ng-submit="save(settingsBwsUrlForm)" novalidate>

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Color</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferences">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesColorController" >
<ion-radio ng-repeat="c in colorList" ng-value="c" ng-model="currentColor" ng-click="save(c)">

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Delete Wallet</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content class="has-header" ng-controller="preferencesDeleteWalletController" >
<div translate>Warning!</div>

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Delete Recovery Phrase</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferences">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesDeleteWordsController" >
<div ng-show="!deleted">

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Email Notifications</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferences">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesEmailController" >
<form name="emailForm" ng-submit="save(emailForm)" novalidate>

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Preferences fee</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesFeeController" ng-init="init()">

View File

@ -1,13 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Transaction History</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()">
<ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()">
<div class="item item-divider"></div>
<div class="item" ng-show="csvReady && !index.isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{index.alias || index.walletName}}.csv">
<span translate>Export to file</span>

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Information</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="wallet.preferencesAdvanced">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesInformation" ng-init="init()">
<div class="list">

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Languages</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesLanguageController" ng-init="init()" >
<ion-radio ng-repeat="lang in availableLanguages" ng-value="lang.isoCode" ng-model="currentLanguage"

View File

@ -1,11 +1,8 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Session log</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesLogs" ng-init="init()" >
<button ng-show="isCordova" ng-click="logs.sendLogs()"><i class="fi-mail"></i>

View File

@ -1,12 +1,9 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Unit</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="tabs.settings">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
</ion-nav-bar class="bar-stable">
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="preferencesUnitController" ng-init="init()" >
<ion-radio ng-repeat="unit in unitList" ng-value="unit.code" ng-model="currentUnit"
ng-click="save(unit)">{{unit.shortName}}

View File

@ -1,12 +1,10 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Terms of Use</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-controller="termOfUseController" cache-view="false">
<p>
<div ng-include="'views/includes/terms.html'"></div>

View File

@ -1,11 +1,9 @@
<ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Translators</ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ui-sref="settings.about">
<i class="icon ion-chevron-left"></i> Back
</button>
</ion-nav-buttons>
<ion-nav-bar>
<ion-nav-title>{{'Translators' | translate}}</ion-nav-title>
<ion-nav-back-button>
{{'Back' | translate}}
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<h4 translate>Translation Credits</h4>

View File

@ -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);
}

View File

@ -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 = [];

View File

@ -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 || {};

View File

@ -1,4 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesAbout',
function() {});
function($ionicNavBarDelegate, gettextCatalog) {
$ionicNavBarDelegate.title(gettextCatalog.getString('About Copay'));
});

View File

@ -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();
});
};
});

View File

@ -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');
});

View File

@ -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;

View File

@ -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();
});
};
});

View File

@ -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({

View File

@ -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();
});
}
});

View File

@ -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();
});
};

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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');

View File

@ -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();

View File

@ -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');
});

View File

@ -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;
});

View File

@ -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'
})

View File

@ -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
*/