mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #2178 from matiu/retrict-old-android-stock-browsers
Retrict old android stock browsers
This commit is contained in:
commit
57cad04b0a
35
js/routes.js
35
js/routes.js
|
@ -3,6 +3,20 @@
|
||||||
var LS = require('../js/plugins/LocalStorage');
|
var LS = require('../js/plugins/LocalStorage');
|
||||||
var ls = new LS();
|
var ls = new LS();
|
||||||
|
|
||||||
|
var unsupported = false;
|
||||||
|
|
||||||
|
if (!ls || ls.length < 1)
|
||||||
|
unsupported = true;
|
||||||
|
|
||||||
|
|
||||||
|
if (window && window.navigator) {
|
||||||
|
var rxaosp = window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);
|
||||||
|
var isaosp = (rxaosp && rxaosp[1] < 537);
|
||||||
|
if (isaosp)
|
||||||
|
unsupported = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Setting up route
|
//Setting up route
|
||||||
angular
|
angular
|
||||||
.module('copayApp')
|
.module('copayApp')
|
||||||
|
@ -127,18 +141,17 @@ angular
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootScope.$on('$routeChangeStart', function(event, next, current) {
|
$rootScope.$on('$routeChangeStart', function(event, next, current) {
|
||||||
|
if (unsupported) {
|
||||||
if (!ls || ls.length < 1) {
|
|
||||||
$location.path('unsupported');
|
$location.path('unsupported');
|
||||||
} else {
|
return;
|
||||||
if (!$rootScope.iden && next.logged) {
|
}
|
||||||
$idle.unwatch();
|
|
||||||
$location.path('/');
|
if (!$rootScope.iden && next.logged) {
|
||||||
}
|
$idle.unwatch();
|
||||||
if ($rootScope.wallet && !$rootScope.wallet.isComplete()
|
$location.path('/');
|
||||||
&& next.walletShouldBeComplete) {
|
}
|
||||||
$location.path('/copayers');
|
if ($rootScope.wallet && !$rootScope.wallet.isComplete() && next.walletShouldBeComplete) {
|
||||||
}
|
$location.path('/copayers');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,14 +5,10 @@
|
||||||
</div>
|
</div>
|
||||||
<h1 translate class="text-center text-white">Browser unsupported</h1>
|
<h1 translate class="text-center text-white">Browser unsupported</h1>
|
||||||
<h3 class="text-center text-white">
|
<h3 class="text-center text-white">
|
||||||
Copay uses WebStorage to save wallet data,
|
Copay does not support your browser.
|
||||||
but your browser does not support it.
|
Please use a current version of Google Chrome, Mozilla Firefox, Internet Explorer, Safari, or Opera.
|
||||||
Please use
|
<br>
|
||||||
a current version of Internet Explorer, Safari, Google Chrome, Mozilla Firefox, or Opera.
|
Note that localStorage should also be enabled (enabled by default in most cases).
|
||||||
<br><br>
|
|
||||||
|
|
||||||
Check if your browser support WebStorage <a
|
|
||||||
href="http://caniuse.com/#feat=namevalue-storage" target="_blank">here</a>
|
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue