Merge pull request #190 from gabrielbazan7/fix/params

adding wallet id on url
This commit is contained in:
Matias Alejo Garcia 2016-08-17 13:10:19 -03:00 committed by GitHub
commit 926325ae72
25 changed files with 81 additions and 74 deletions

View File

@ -14,7 +14,6 @@
<!-- <body ng&#45;cloak class="ng&#45;cloak"> --> <!-- <body ng&#45;cloak class="ng&#45;cloak"> -->
<body > <body >
<ion-nav-bar class="bar-stable"></ion-nav-bar>
<ion-nav-view name="main"></ion-nav-view> <ion-nav-view name="main"></ion-nav-view>
<script src="lib/ionic.bundle.min.js"></script> <script src="lib/ionic.bundle.min.js"></script>

View File

@ -1,13 +1,13 @@
<ion-view ng-controller="preferencesController" cache-view="false" ng-init="init()"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Settings</ion-nav-title> <ion-nav-title>Wallet Settings</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
 <button class="button" href ui-sref="walletDetails">  <button class="button" href ui-sref="wallet.details">
     <i class="ion-arrow-left-c"></i> Back      <i class="ion-arrow-left-c"></i> Back
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesController" cache-view="false" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"> <div class="item item-divider">
Preferences Preferences
@ -15,7 +15,7 @@
<div class="item item-icon-right" href ui-sref="preferencesAlias"> <div class="item item-icon-right" href ui-sref="preferencesAlias">
<span translate>Wallet Name</span> <span translate>Wallet Name</span>
<span class="item-note"> <span class="item-note">
{{index.alias||index.walletName}} {{alias||walletName}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon ion-ios-arrow-right"></i>
</div> </div>
@ -38,7 +38,7 @@
</span> </span>
</div> </div>
<div class="item item-icon-right" href ui-sref="preferencesColor"> <div class="item item-icon-right" href ui-sref="preferencesColor">
<span ng-style="{'color':index.backgroundColor}">&block;</span> <span ng-style="{'color': backgroundColor}">&block;</span>
<span translate>Wallet Color</span> <span translate>Wallet Color</span>
<span class="item-note"> <span class="item-note">
{{index.alias||index.walletName}} {{index.alias||index.walletName}}

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesAbout" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>About Copay</ion-nav-title> <ion-nav-title>About Copay</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="preferencesAbout" cache-view="false">
<div class="item item-divider"> <div class="item item-divider">
Release information Release information
</div> </div>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesAliasController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Alias</ion-nav-title> <ion-nav-title>Alias</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesAliasController" cache-view="false">
<form name="aliasForm" ng-submit="save(aliasForm)" novalidate> <form name="aliasForm" ng-submit="save(aliasForm)" novalidate>
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label" transalate>Alias for {{walletName}}</span> <span class="input-label" transalate>Alias for {{walletName}}</span>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesAltCurrencyController" cache-view="false" ng-init="init()"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Alternative Currency</ion-nav-title> <ion-nav-title>Alternative Currency</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
 </ion-nav-buttons>  </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="preferencesAltCurrencyController" ng-init="init()" cache-view="false">
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency" <ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
ng-click="save(altCurrency)">{{altCurrency.name}} ng-click="save(altCurrency)">{{altCurrency.name}}
</ion-radio> </ion-radio>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesBwsUrlController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Service URL</ion-nav-title> <ion-nav-title>Wallet Service URL</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesBwsUrlController" cache-view="false">
<form name="settingsBwsUrlForm" ng-submit="save(settingsBwsUrlForm)" novalidate> <form name="settingsBwsUrlForm" ng-submit="save(settingsBwsUrlForm)" novalidate>
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label" transalate>Wallet Service URL</span><a ng-click="resetDefaultUrl()" translate> Set default url</a> <span class="input-label" transalate>Wallet Service URL</span><a ng-click="resetDefaultUrl()" translate> Set default url</a>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesColorController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Color</ion-nav-title> <ion-nav-title>Color</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesColorController" cache-view="false">
<ion-radio ng-repeat="c in colorList" ng-value="c" ng-model="currentColor" ng-click="save(c)"> <ion-radio ng-repeat="c in colorList" ng-value="c" ng-model="currentColor" ng-click="save(c)">
<span ng-style="{'color': c}">&block;</span> <span ng-style="{'color': c}">&block;</span>
</ion-radio> </ion-radio>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesDeleteWalletController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Delete Wallet</ion-nav-title> <ion-nav-title>Delete Wallet</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesDeleteWalletController" cache-view="false">
<div translate>Warning!</div> <div translate>Warning!</div>
<div translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div> <div translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
<div class="right" ng-style="{'color':index.backgroundColor}" ng-show="!isDeletingWallet"> <div class="right" ng-style="{'color':index.backgroundColor}" ng-show="!isDeletingWallet">

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesDeleteWordsController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Delete Recovery Phrase</ion-nav-title> <ion-nav-title>Delete Recovery Phrase</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesDeleteWordsController" cache-view="false">
<div ng-show="!deleted"> <div ng-show="!deleted">
<div ng-show="error"> <div ng-show="error">
{{error|translate}} {{error|translate}}

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesEmailController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Email Notifications</ion-nav-title> <ion-nav-title>Email Notifications</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesEmailController" cache-view="false">
<form name="emailForm" ng-submit="save(emailForm)" novalidate> <form name="emailForm" ng-submit="save(emailForm)" novalidate>
<label class="item item-input item-stacked-label"> <label class="item item-input item-stacked-label">
<span class="input-label" transalate>Email for wallet notifications</span> <span class="input-label" transalate>Email for wallet notifications</span>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesFeeController" cache-view="false" ng-init="init()"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Preferences fee</ion-nav-title> <ion-nav-title>Preferences fee</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -8,7 +8,7 @@
 </ion-nav-buttons>  </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="preferencesFeeController" cache-view="false" ng-init="init()">
<div ng-show="loading"> <div ng-show="loading">
<ion-spinner class="spinner-dark" icon="lines">Loading...</ion-spinner> <ion-spinner class="spinner-dark" icon="lines">Loading...</ion-spinner>
</div> </div>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesHistory" cache-view="false" ng-init="index.updatingTxHistory ? null : csvHistory()"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Transaction History</ion-nav-title> <ion-nav-title>Transaction History</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesHistory" cache-view="false" ng-init="index.updatingTxHistory ? null : csvHistory()">
<div class="item item-divider"></div> <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"> <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> <span translate>Export to file</span>

View File

@ -1,5 +1,5 @@
<ion-view ng-controller="preferencesInformation" cache-view="false" ng-init="init()"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Wallet Information</ion-nav-title> <ion-nav-title>Wallet Information</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -8,7 +8,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="preferencesInformation" cache-view="false" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"> <div class="item item-divider">
Wallet Information Wallet Information

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesLanguageController" ng-init="init()" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Languages</ion-nav-title> <ion-nav-title>Languages</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="preferencesLanguageController" ng-init="init()" cache-view="false">
<ion-radio ng-repeat="lang in availableLanguages" ng-value="lang.isoCode" ng-model="currentLanguage" <ion-radio ng-repeat="lang in availableLanguages" ng-value="lang.isoCode" ng-model="currentLanguage"
ng-click="save(lang.isoCode)">{{lang.name}} ng-click="save(lang.isoCode)">{{lang.name}}
</ion-radio> </ion-radio>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesLogs" ng-init="init()" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Session log</ion-nav-title> <ion-nav-title>Session log</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="preferencesLogs" ng-init="init()" cache-view="false">
<button ng-show="isCordova" ng-click="logs.sendLogs()"><i class="fi-mail"></i> <button ng-show="isCordova" ng-click="logs.sendLogs()"><i class="fi-mail"></i>
<span translate>Send by email</span> <span translate>Send by email</span>
</button> </button>

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="preferencesUnitController" ng-init="init()" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Unit</ion-nav-title> <ion-nav-title>Unit</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar class="bar-stable"> </ion-nav-bar class="bar-stable">
<ion-content> <ion-content ng-controller="preferencesUnitController" ng-init="init()" cache-view="false">
<ion-radio ng-repeat="unit in unitList" ng-value="unit.code" ng-model="currentUnit" <ion-radio ng-repeat="unit in unitList" ng-value="unit.code" ng-model="currentUnit"
ng-click="save(unit)">{{unit.shortName}} ng-click="save(unit)">{{unit.shortName}}
</ion-radio> </ion-radio>

View File

@ -1,5 +1,8 @@
<ion-view view-title="Home"> <ion-view>
<ion-nav-bar class="bar-stable">
<ion-nav-title>Home</ion-nav-title>
</ion-nav-bar>
<ion-content class="padding home" ng-controller="tabHomeController"> <ion-content class="padding home" ng-controller="tabHomeController">
<a href="#/add"><i class="ion-ios-plus-outline right"></i></a> <a href="#/add"><i class="ion-ios-plus-outline right"></i></a>
<h2>Wallets </h2> <h2>Wallets </h2>
@ -8,7 +11,7 @@
<li ng-show="wallets[0]" <li ng-show="wallets[0]"
ng-repeat="item in wallets track by $index" class="item item-icon-left" ng-repeat="item in wallets track by $index" class="item item-icon-left"
menu-toggle href ui-sref="walletDetails({'walletId': item.id})"> menu-toggle href ui-sref="wallet.details({'walletId': item.id})">
<i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i> <i class="icon ion-briefcase size-21" ng-style="{'color':item.color}"></i>
{{item.name || item.id}} {{item.name || item.id}}
<span ng-show="item.n > 1" class="text-gray"> <span ng-show="item.n > 1" class="text-gray">

View File

@ -1,6 +1,6 @@
<ion-view ng-controller="tabReceiveController" cache-view="false"> <ion-view>
<ion-nav-title>Receive</ion-nav-title> <ion-nav-title>Receive</ion-nav-title>
<ion-content ng-init="init()"> <ion-content ng-controller="tabReceiveController" ng-init="init()" cache-view="false">
<div class="text-center m30v" ng-click="copyToClipboard(addr, $event)" ng-show="addr" > <div class="text-center m30v" ng-click="copyToClipboard(addr, $event)" ng-show="addr" >
<qrcode size="220" data="bitcoin:{{addr}}" ng-show="addr"></qrcode> <qrcode size="220" data="bitcoin:{{addr}}" ng-show="addr"></qrcode>
@ -34,7 +34,7 @@ Error: {{addrError}}
</div> </div>
</div> </div>
<div ng-show="!incomplete"> <div ng-show="!incomplete">
<div class="item item-icon-left" ng-click="shareAddress(addr)" ng-show="isCordova && addr" ng-disabled="generatingAddress"> <div class="item item-icon-left" ng-click="shareAddress(addr)" ng-show="isCordova && addr" ng-disabled="generatingAddress">
<i class="icon ion-ios-upload-outline"></i> <i class="icon ion-ios-upload-outline"></i>

View File

@ -1,6 +1,6 @@
<ion-view ng-controller="tabSettingsController" cache-view="false" ng-init="init()"> <ion-view>
<ion-nav-title>Global Settings</ion-nav-title> <ion-nav-title>Global Settings</ion-nav-title>
<ion-content class="has-header"> <ion-content class="has-header" ng-controller="tabSettingsController" cache-view="false" ng-init="init()">
<div class="item item-divider"> <div class="item item-divider">
</div> </div>
<div class="list"> <div class="list">

View File

@ -1,4 +1,4 @@
<ion-view ng-controller="termOfUseController" cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Terms of Use</ion-nav-title> <ion-nav-title>Terms of Use</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
@ -7,7 +7,7 @@
   </button>    </button>
  </ion-nav-buttons>   </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content ng-controller="termOfUseController" cache-view="false">
<p> <p>
<div ng-include="'views/includes/terms.html'"></div> <div ng-include="'views/includes/terms.html'"></div>
</p> </p>

View File

@ -1,4 +1,4 @@
<ion-view cache-view="false"> <ion-view>
<ion-nav-bar class="bar-stable"> <ion-nav-bar class="bar-stable">
<ion-nav-title>Translators</ion-nav-title> <ion-nav-title>Translators</ion-nav-title>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">

View File

@ -1,19 +1,21 @@
<ion-view ng-controller="walletDetailsController"> <ion-view ng-controller="walletDetailsController">
<ion-nav-bar class="bar-stable">
<ion-nav-title>{{wallet.name}}</ion-nav-title>
<ion-nav-title>{{wallet.name}}</ion-nav-title> <ion-nav-buttons side="primary">
<button class="button" href ui-sref="tabs.home">
<ion-nav-buttons side="primary"> <i class="ion-arrow-left-c"></i> Back
<button class="button" href ui-sref="tabs.home"> </button>
<i class="ion-arrow-left-c"></i> Back </ion-nav-buttons>
</button> <ion-nav-buttons side="secondary">
</ion-nav-buttons> <button class="button button-icon icon ion-ios-settings" href ui-sref="wallet.preferences"></button>
<ion-nav-buttons side="secondary"> </ion-nav-buttons>
<button class="button button-icon icon ion-ios-settings" href ui-sref="preferences"></button> </ion-nav-bar>
</ion-nav-buttons>
<ion-content delegate-handle="my-handle" overflow-scroll="true"> <ion-content delegate-handle="my-handle" overflow-scroll="true">
<button class="button button-icon icon ion-ios-settings" href ui-sref="wallet.preferences"></button>
<div ng-show="!wallet"> <div ng-show="!wallet">
No Wallet No Wallet

View File

@ -1,11 +1,11 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesController', angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, configService, profileService, fingerprintService, walletService) { function($scope, $rootScope, $timeout, $log, $stateParams, configService, profileService, fingerprintService, walletService) {
var fc; var fc;
var config = configService.getSync(); var config = configService.getSync();
console.log($stateParams);
var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() { var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() {
$scope.init(); $scope.init();
}); });
@ -19,6 +19,11 @@ angular.module('copayApp.controllers').controller('preferencesController',
fc = profileService.focusedClient; fc = profileService.focusedClient;
if (fc) { if (fc) {
$scope.backgroundColor = fc.color;
config.aliasFor = config.aliasFor || {};
$scope.walletName = fc.credentials.walletName;
$scope.alias = config.aliasFor[fc.credentials.walletId] || $scope.walletName;
$scope.encryptEnabled = walletService.isEncrypted(fc); $scope.encryptEnabled = walletService.isEncrypted(fc);
if (fc.isPrivKeyExternal) if (fc.isPrivKeyExternal)
$scope.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor'; $scope.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';

View File

@ -84,8 +84,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);
$scope.wallet = wallet; $scope.wallet = wallet;
if (wallet) { if (wallet) {
profileService.setAndStoreFocus(wallet.id, function() {});
walletService.updateStatus(wallet, {}, function(err, status) { walletService.updateStatus(wallet, {}, function(err, status) {
if (err) {} // TODO if (err) {} // TODO
}); });

View File

@ -14,7 +14,7 @@ if (window && window.navigator) {
//Setting up route //Setting up route
angular.module('copayApp').config(function(historicLogProvider, $provide, $logProvider, $stateProvider, $urlRouterProvider, $compileProvider) { angular.module('copayApp').config(function(historicLogProvider, $provide, $logProvider, $stateProvider, $urlRouterProvider, $compileProvider) {
$urlRouterProvider.otherwise('/tabs'); $urlRouterProvider.otherwise('/tabs/home');
$logProvider.debugEnabled(true); $logProvider.debugEnabled(true);
$provide.decorator('$log', ['$delegate', 'platformInfo', $provide.decorator('$log', ['$delegate', 'platformInfo',
@ -93,17 +93,25 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
} }
} }
}) })
.state('walletDetails', { .state('wallet', {
url: '/details', url: '/wallet/{walletId}',
abstract: true,
needProfile: true, needProfile: true,
views: { views: {
'main': { 'main': {
templateUrl: 'views/walletDetails.html', template: '<ui-view/>',
}, },
}, },
params: { })
walletId: null, .state('wallet.details', {
}, url: '/details',
needProfile: true,
templateUrl: 'views/walletDetails.html'
})
.state('wallet.preferences', {
url: '/preferences',
needProfile: true,
templateUrl: 'views/preferences.html'
}) })
.state('walletHome', { .state('walletHome', {
url: '/old', url: '/old',
@ -238,16 +246,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
walletId: null, walletId: null,
}, },
}) })
.state('preferences', {
url: '/preferences',
templateUrl: 'views/preferences.html',
needProfile: true,
views: {
'main': {
templateUrl: 'views/preferences.html',
},
}
})
.state('preferencesLanguage', { .state('preferencesLanguage', {
url: '/preferencesLanguage', url: '/preferencesLanguage',
needProfile: true, needProfile: true,