Fixes: url handler

This commit is contained in:
Gustavo Maximiliano Cortez 2014-08-04 11:27:46 -03:00
commit ee031849b2
10 changed files with 56 additions and 22 deletions

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('HomeController',
function($scope, $rootScope, walletFactory, notification) {
function($scope, $rootScope, $location, walletFactory, notification) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
$scope.loading = false;
if ($rootScope.pendingPayment) {
notification.info('Login Required', 'Please open wallet to complete payment');

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('ImportController',
function($scope, $rootScope, walletFactory, controllerUtils, Passphrase, notification) {
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, notification) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
$scope.title = 'Import a backup';
$scope.importStatus = 'Importing wallet - Reading backup...';

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('JoinController',
function($scope, $rootScope, $timeout, walletFactory, controllerUtils, Passphrase, notification) {
function($scope, $rootScope, $timeout, $location, walletFactory, controllerUtils, Passphrase, notification) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
$scope.loading = false;
// QR code Scanner

View file

@ -1,7 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('OpenController',
function($scope, $rootScope, walletFactory, controllerUtils, Passphrase, notification) {
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, notification) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
var cmp = function(o1, o2) {
var v1 = o1.show.toLowerCase(),
v2 = o2.show.toLowerCase();

View file

@ -2,6 +2,10 @@
angular.module('copayApp.controllers').controller('SettingsController',
function($scope, $rootScope, $window, $location) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
$scope.title = 'Settings';
$scope.networkName = config.networkName;
$scope.insightHost = config.blockchain.host;

View file

@ -34,6 +34,9 @@ var valid_pairs = {
angular.module('copayApp.controllers').controller('SetupController',
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase, backupService, notification) {
if ($rootScope.wallet) {
$location.path('/addresses');
}
$rootScope.videoInfo = {};
$scope.loading = false;