fixed argon2 in browsers

This commit is contained in:
antelle 2020-05-31 13:03:59 +02:00
parent 835acff637
commit 3c47adbf32
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const Features = {
!isDesktop &&
!/^http(s?):\/\/((localhost:8085)|((app|beta)\.keeweb\.info))/.test(location.href),
isLocal: location.origin.indexOf('localhost') >= 0,
canUseWasmInWebWorker: !isDesktop && !/Chrome/.test(navigator.appVersion),
canUseWasmInWebWorker: !isDesktop && !/Chrome/.test(navigator.appVersion), // TODO: enable it back in Chrome
supportsTitleBarStyles() {
return this.isMac;

View File

@ -29,7 +29,7 @@ const KdbxwebInit = {
if (!global.WebAssembly) {
return Promise.reject('WebAssembly is not supported');
}
if (AppSettingsModel.nativeArgon2) {
if (Launcher && AppSettingsModel.nativeArgon2) {
const ts = logger.ts();
const argon2 = Launcher.reqNative('argon2');
logger.debug('Native argon2 runtime loaded (main thread)', logger.ts(ts));