mirror of https://github.com/keeweb/keeweb.git
removed old feature detecting stuff
This commit is contained in:
parent
1054cdcfc4
commit
9924dff39a
|
@ -51,16 +51,15 @@ ready(() => {
|
|||
}
|
||||
|
||||
function ensureCanRun() {
|
||||
return Promise.resolve()
|
||||
.then(() => FeatureDetector.ensureCanRun())
|
||||
return FeatureTester.test()
|
||||
.catch(e => {
|
||||
Alerts.error({
|
||||
header: Locale.appSettingsError,
|
||||
body: Locale.appNotSupportedError,
|
||||
body: Locale.appNotSupportedError + '<br/><br/>' + e,
|
||||
buttons: [],
|
||||
esc: false, enter: false, click: false
|
||||
});
|
||||
throw e;
|
||||
throw 'Feature testing failed: ' + e;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -109,15 +108,7 @@ ready(() => {
|
|||
}
|
||||
|
||||
function showApp() {
|
||||
return FeatureTester.test()
|
||||
.catch(e => {
|
||||
Alerts.error({
|
||||
header: Locale.appFeatureTestFailed, esc: false, enter: false, click: false,
|
||||
body: Locale.appFeatureTestFailedBody + '<br/><br/>' + e,
|
||||
buttons: []
|
||||
});
|
||||
throw 'Feature testing failed: ' + e;
|
||||
})
|
||||
return Promise.resolve()
|
||||
.then(() => {
|
||||
const skipHttpsWarning = localStorage.skipHttpsWarning || appModel.settings.get('skipHttpsWarning');
|
||||
const protocolIsInsecure = ['https:', 'file:', 'app:'].indexOf(location.protocol) < 0;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const kdbxweb = require('kdbxweb');
|
||||
const FeatureDetector = require('../util/feature-detector');
|
||||
|
||||
const FeatureTester = {
|
||||
test() {
|
||||
|
@ -38,6 +39,9 @@ const FeatureTester = {
|
|||
},
|
||||
|
||||
checkLocalStorage() {
|
||||
if (FeatureDetector.isDesktop) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
localStorage.setItem('_test', '1');
|
||||
localStorage.removeItem('_test');
|
||||
|
|
|
@ -285,8 +285,6 @@
|
|||
"appSecWarnBody1": "You have loaded this app with an insecure connection. Someone may be watching you and stealing your passwords. We strongly advise you to stop, unless you clearly understand what you're doing.",
|
||||
"appSecWarnBody2": "Yes, your database is encrypted but no one can guarantee that the app has not been modified on the way to you.",
|
||||
"appSecWarnBtn": "I understand the risks, continue",
|
||||
"appFeatureTestFailed": "Not supported",
|
||||
"appFeatureTestFailedBody": "Your browser doesn't support some important features we're using.",
|
||||
"appUnsavedWarn": "Unsaved changes!",
|
||||
"appUnsavedWarnBody": "You have unsaved files, if you close the app, changes will be lost.",
|
||||
"appDontExitBtn": "Don't exit",
|
||||
|
@ -298,7 +296,7 @@
|
|||
"appSaveErrorBodyMul": "Failed to auto-save files:",
|
||||
"appSettingsError": "Error loading app",
|
||||
"appSettingsErrorBody": "There was an error loading app settings. Please double check the app URL or contact your administrator.",
|
||||
"appNotSupportedError": "Your browser is not supported.",
|
||||
"appNotSupportedError": "Your browser doesn't support some important features we're using.",
|
||||
"appTabWarn": "Too many tabs",
|
||||
"appTabWarnBody": "KeeWeb cannot be used in two browser tabs simultaneously, please close this tab.",
|
||||
"appRightsAlert": "Locking KeeWeb app",
|
||||
|
|
|
@ -40,18 +40,6 @@ const FeatureDetector = {
|
|||
hasUnicodeFlags: function() {
|
||||
return this.isMac;
|
||||
},
|
||||
ensureCanRun: function() {
|
||||
if (!window.crypto) {
|
||||
throw 'WebCrypto not available';
|
||||
}
|
||||
if (!localStorage.length && !isDesktop) {
|
||||
try {
|
||||
localStorage.appSettings = '';
|
||||
} catch (e) {
|
||||
throw 'localStorage not available';
|
||||
}
|
||||
}
|
||||
},
|
||||
getBrowserCssClass: function() {
|
||||
if (window.chrome && window.chrome.webstore) {
|
||||
return 'chrome';
|
||||
|
|
Loading…
Reference in New Issue