fancy not supported message

This commit is contained in:
antelle 2017-05-16 22:56:52 +02:00
parent cb0f81840a
commit 61e6536d02
4 changed files with 30 additions and 0 deletions

View File

@ -33,6 +33,7 @@ ready(() => {
.then(loadConfigs)
.then(initModules)
.then(loadRemoteConfig)
.then(ensureCanRun)
.then(showApp)
.catch(e => {
appModel.appLogger.error('Error starting app', e);
@ -43,6 +44,20 @@ ready(() => {
require('./helpers');
}
function ensureCanRun() {
return Promise.resolve()
.then(() => FeatureDetector.ensureCanRun())
.catch(e => {
Alerts.error({
header: Locale.appSettingsError,
body: Locale.appNotSupportedError,
buttons: [],
esc: false, enter: false, click: false
});
throw e;
});
}
function loadConfigs() {
return Promise.all([
AppSettingsModel.instance.load(),

View File

@ -287,6 +287,7 @@
"appSaveErrorBodyMul": "Failed to auto-save files:",
"appSettingsError": "Error loading app",
"appSettingsErrorBody": "There was an error loading app settings. Please double check app url or contact your administrator.",
"appNotSupportedError": "Your browser is not supported.",
"appTabWarn": "Too many tabs",
"appTabWarnBody": "KeeWeb cannot be used in two browser tabs simultaneously, please close this tab.",

View File

@ -34,6 +34,18 @@ const FeatureDetector = {
},
hasUnicodeFlags: function() {
return this.isMac;
},
ensureCanRun: function() {
if (/MSIE |Trident/.test(navigator.userAgent)) {
throw 'IE detected';
}
if (!localStorage.length) {
try {
localStorage.appSettings = '';
} catch (e) {
throw 'localStorage not available';
}
}
}
};

View File

@ -4,6 +4,7 @@ Release notes
`+` plugins
`*` translations are available only as plugins
`*` Dropbox API V2
`*` deprecated IE
`+` entry templates
`+` support cloud providers in iOS homescreen apps
`+` auto-type improvements and bugfixes
@ -17,6 +18,7 @@ Release notes
`+` mac os window style options
`+` lock on hide mac os hide
`+` release distribution improvements
`+` error message for not supported browsers
`-` removed support of devices without clipboard api
##### v1.4.1 (2017-03-26)