Merge pull request #1033 from cmgustavo/bug/01-url-handler

Fixes: url handler
This commit is contained in:
Matias Alejo Garcia 2014-08-07 00:58:08 -03:00
commit bb9406be01
11 changed files with 53 additions and 23 deletions

View File

@ -1129,4 +1129,10 @@ a.text-warning:hover {color: #FD7262;}
}
}
.wide-page {
background-color: #2C3E50;
margin: 10% 0;
padding: 50px;
}
/*-----------------------------------------------------------------*/

View File

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

View File

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

View File

@ -2,6 +2,7 @@
angular.module('copayApp.controllers').controller('JoinController',
function($scope, $rootScope, $timeout, walletFactory, controllerUtils, Passphrase, notification) {
controllerUtils.redirIfLogged();
$rootScope.fromSetup = false;
$scope.loading = false;

View File

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

View File

@ -2,6 +2,8 @@
angular.module('copayApp.controllers').controller('SettingsController',
function($scope, $rootScope, $window, $location) {
controllerUtils.redirIfLogged();
$scope.title = 'Settings';
$scope.networkName = config.networkName;
$scope.insightHost = config.blockchain.host;

View File

@ -34,6 +34,7 @@ var valid_pairs = {
angular.module('copayApp.controllers').controller('SetupController',
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase, backupService, notification) {
controllerUtils.redirIfLogged();
$rootScope.fromSetup = true;
$rootScope.videoInfo = {};

View File

@ -14,6 +14,13 @@ angular.module('copayApp.services')
return vi.muted;
};
root.redirIfLogged = function() {
var w = $rootScope.wallet;
if (w) {
$location.path('addresses');
}
};
root.logout = function() {
Socket.removeAllListeners();

View File

@ -1,7 +1,9 @@
<div class="text-center logo-setup">
<img src="img/logo-negative-beta.svg" alt="Copay">
<div class="wide-page">
<div class="text-center">
<img src="img/logo-negative-beta.svg" alt="Copay">
</div>
<h1 class="text-center text-white">404</h1>
<h3 class="text-center text-white">Page not found</h3>
<p class="text-center"><a href="#!/">go back...</a></p>
</div>
<h1 class="text-center text-white">404</h1>
<h3 class="text-center">Page not found</h3>
<p class="text-center"><a href="#!/">go back...</a></p>

View File

@ -1,15 +1,18 @@
<div class="text-center logo-setup">
<img src="img/logo-negative-beta.svg" alt="Copay">
<div ng-include="'views/includes/version.html'"></div>
</div>
<h1 class="text-center text-white">Browser unsupported</h1>
<h3 class="text-center">
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.
<br><br>
<div class="wide-page">
<div class="text-center">
<img src="img/logo-negative-beta.svg" alt="Copay">
<div class="text-white" ng-include="'views/includes/version.html'"></div>
</div>
<h1 class="text-center text-white">Browser unsupported</h1>
<h3 class="text-center text-white">
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.
<br><br>
For more information
on supported browsers please check <a href="http://www.webrtc.org/">http://www.webrtc.org/</a>
</h3>
</div>
For more information
on supported browsers please check <a href="http://www.webrtc.org/">http://www.webrtc.org/</a>
</h3>

View File

@ -1,4 +1,4 @@
<h3 class="text-center">
<h3 class="text-center text-white">
Preparing payment...
</h3>
<div data-ng-init="" data-ng-controller="UriPaymentController">