mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-01 04:56:06 -04:00
SYWEB-13: Do not start the app if the browser does not support WEBStorage.
Internet Explorer case: Launch the app only for versions 9 and higher.
This commit is contained in:
parent
28bcd01e8d
commit
f9688d7519
3 changed files with 37 additions and 4 deletions
|
@ -80,7 +80,24 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
|
|||
$httpProvider.interceptors.push('AccessTokenInterceptor');
|
||||
}]);
|
||||
|
||||
matrixWebClient.run(['$location', 'matrixService', function($location, matrixService) {
|
||||
matrixWebClient.run(['$location', '$rootScope', 'matrixService', function($location, $rootScope, matrixService) {
|
||||
|
||||
// Check browser support
|
||||
// Support IE from 9.0. AngularJS needs some tricks to run on IE8 and below
|
||||
var version = parseFloat($.browser.version);
|
||||
if ($.browser.msie && version < 9.0) {
|
||||
$rootScope.unsupportedBrowser = {
|
||||
browser: navigator.userAgent,
|
||||
reason: "Internet Explorer is supported from version 9"
|
||||
};
|
||||
}
|
||||
// The app requires localStorage
|
||||
if(typeof(Storage) === "undefined") {
|
||||
$rootScope.unsupportedBrowser = {
|
||||
browser: navigator.userAgent,
|
||||
reason: "It does not support HTML local storage"
|
||||
};
|
||||
}
|
||||
|
||||
// If user auth details are not in cache, go to the login page
|
||||
if (!matrixService.isUserLoggedIn() &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue