From ee031849b261326e1284736818e3820a247fa9d6 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 4 Aug 2014 11:27:46 -0300 Subject: [PATCH] Fixes: url handler --- css/main.css | 6 ++++++ js/controllers/home.js | 6 +++++- js/controllers/import.js | 6 +++++- js/controllers/join.js | 6 +++++- js/controllers/open.js | 6 +++++- js/controllers/settings.js | 4 ++++ js/controllers/setup.js | 3 +++ views/errors/404.html | 12 +++++++----- views/unsupported.html | 29 ++++++++++++++++------------- views/uri-payment.html | 2 +- 10 files changed, 57 insertions(+), 23 deletions(-) diff --git a/css/main.css b/css/main.css index 8b8e10278..b1eeea852 100644 --- a/css/main.css +++ b/css/main.css @@ -1123,4 +1123,10 @@ a.text-white:hover {color: #ccc;} } } +.wide-page { + background-color: #2C3E50; + margin: 10% 0; + padding: 50px; +} + /*-----------------------------------------------------------------*/ diff --git a/js/controllers/home.js b/js/controllers/home.js index 14c5505ad..576cc5f7c 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -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'); diff --git a/js/controllers/import.js b/js/controllers/import.js index 901945d5c..ab6107db9 100644 --- a/js/controllers/import.js +++ b/js/controllers/import.js @@ -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...'; diff --git a/js/controllers/join.js b/js/controllers/join.js index ea6d446a2..015be9534 100644 --- a/js/controllers/join.js +++ b/js/controllers/join.js @@ -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 diff --git a/js/controllers/open.js b/js/controllers/open.js index 02d47dd1f..124955800 100644 --- a/js/controllers/open.js +++ b/js/controllers/open.js @@ -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(); diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 90128de34..dc2b582d9 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -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; diff --git a/js/controllers/setup.js b/js/controllers/setup.js index cd3811853..392a01253 100644 --- a/js/controllers/setup.js +++ b/js/controllers/setup.js @@ -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; diff --git a/views/errors/404.html b/views/errors/404.html index d75d4b922..1af47d530 100644 --- a/views/errors/404.html +++ b/views/errors/404.html @@ -1,7 +1,9 @@ -
- Copay +
+
+ Copay +
+

404

+

Page not found

+

go back...

-

404

-

Page not found

-

go back...

diff --git a/views/unsupported.html b/views/unsupported.html index e3df0d3a5..24bbda965 100644 --- a/views/unsupported.html +++ b/views/unsupported.html @@ -1,14 +1,17 @@ -
- Copay -
-

Browser unsupported

-

- Copay uses webRTC for peer-to-peer communications, - but your browser does not support it. - Please use - a current version of Google Chrome, Mozilla Firefox, or Opera. -

+
+
+ Copay +
+

Browser unsupported

+

+ Copay uses webRTC for peer-to-peer communications, + but your browser does not support it. + Please use + a current version of Google Chrome, Mozilla Firefox, or Opera. +

+ + For more information + on supported browsers please check http://www.webrtc.org/ +

+
- For more information - on supported browsers please check http://www.webrtc.org/ -

diff --git a/views/uri-payment.html b/views/uri-payment.html index 6c488ee8d..64390d478 100644 --- a/views/uri-payment.html +++ b/views/uri-payment.html @@ -1,4 +1,4 @@ -

+

Preparing payment...