adding wallet id on url
This commit is contained in:
parent
28d9d76f93
commit
965619740b
25 changed files with 82 additions and 75 deletions
|
|
@ -1,11 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
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 config = configService.getSync();
|
||||
|
||||
console.log($stateParams);
|
||||
var disableFocusListener = $rootScope.$on('Local/NewFocusedWalletReady', function() {
|
||||
$scope.init();
|
||||
});
|
||||
|
|
@ -19,6 +19,11 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
|
||||
fc = profileService.focusedClient;
|
||||
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);
|
||||
if (fc.isPrivKeyExternal)
|
||||
$scope.externalSource = fc.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
$scope.wallet = wallet;
|
||||
|
||||
|
||||
if (wallet) {
|
||||
profileService.setAndStoreFocus(wallet.id, function() {});
|
||||
walletService.updateStatus(wallet, {}, function(err, status) {
|
||||
if (err) {} // TODO
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ if (window && window.navigator) {
|
|||
|
||||
//Setting up route
|
||||
angular.module('copayApp').config(function(historicLogProvider, $provide, $logProvider, $stateProvider, $urlRouterProvider, $compileProvider) {
|
||||
$urlRouterProvider.otherwise('/tabs');
|
||||
$urlRouterProvider.otherwise('/tabs/home');
|
||||
|
||||
$logProvider.debugEnabled(true);
|
||||
$provide.decorator('$log', ['$delegate', 'platformInfo',
|
||||
|
|
@ -93,17 +93,25 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('walletDetails', {
|
||||
url: '/details',
|
||||
.state('wallet', {
|
||||
url: '/wallet/{walletId}',
|
||||
abstract: true,
|
||||
needProfile: true,
|
||||
views: {
|
||||
'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', {
|
||||
url: '/old',
|
||||
|
|
@ -238,16 +246,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
walletId: null,
|
||||
},
|
||||
})
|
||||
.state('preferences', {
|
||||
url: '/preferences',
|
||||
templateUrl: 'views/preferences.html',
|
||||
needProfile: true,
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/preferences.html',
|
||||
},
|
||||
}
|
||||
})
|
||||
.state('preferencesLanguage', {
|
||||
url: '/preferencesLanguage',
|
||||
needProfile: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue