mirror of https://github.com/keeweb/keeweb.git
fixed Dropbox connection on iOS 13 homescreen
This commit is contained in:
parent
82cad800c2
commit
1c744d8d6b
|
@ -1,9 +1,8 @@
|
|||
import { Storage } from 'storage';
|
||||
import { Features } from 'util/features';
|
||||
|
||||
const AuthReceiver = {
|
||||
receive() {
|
||||
if (!Features.isPopup && !Features.isStandalone) {
|
||||
if (!Features.isPopup) {
|
||||
return false;
|
||||
}
|
||||
const opener = window.opener || window.parent;
|
||||
|
@ -12,16 +11,9 @@ const AuthReceiver = {
|
|||
if (!hasKeys) {
|
||||
return false;
|
||||
}
|
||||
if (Features.isStandalone) {
|
||||
if (sessionStorage.authStorage) {
|
||||
Storage[sessionStorage.authStorage].handleOAuthReturnMessage(message);
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
opener.postMessage(message, window.location.origin);
|
||||
window.close();
|
||||
return true;
|
||||
}
|
||||
opener.postMessage(message, window.location.origin);
|
||||
window.close();
|
||||
return true;
|
||||
},
|
||||
|
||||
urlArgsToMessage(url) {
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Events } from 'framework/events';
|
|||
import { Links } from 'const/links';
|
||||
import { AppSettingsModel } from 'models/app-settings-model';
|
||||
import { RuntimeDataModel } from 'models/runtime-data-model';
|
||||
import { Features } from 'util/features';
|
||||
import { Logger } from 'util/logger';
|
||||
|
||||
const MaxRequestRetries = 3;
|
||||
|
@ -30,18 +29,6 @@ class StorageBase {
|
|||
}
|
||||
}
|
||||
this.logger = new Logger('storage-' + this.name);
|
||||
if (this._oauthReturnMessage) {
|
||||
this.logger.debug('OAuth return message', this._oauthReturnMessage);
|
||||
this._oauthProcessReturn(this._oauthReturnMessage);
|
||||
delete this._oauthReturnMessage;
|
||||
delete sessionStorage.authStorage;
|
||||
if (Features.isStandalone) {
|
||||
const [url, urlParams] = location.href.split(/[?#]/);
|
||||
if (urlParams) {
|
||||
location.href = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -49,10 +36,6 @@ class StorageBase {
|
|||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
handleOAuthReturnMessage(message) {
|
||||
this._oauthReturnMessage = message;
|
||||
}
|
||||
|
||||
_xhr(config) {
|
||||
const xhr = new XMLHttpRequest();
|
||||
if (config.responseType) {
|
||||
|
@ -135,9 +118,6 @@ class StorageBase {
|
|||
settings = Object.keys(settings)
|
||||
.map(key => key + '=' + settings[key])
|
||||
.join(',');
|
||||
if (Features.isStandalone) {
|
||||
sessionStorage.authStorage = this.name;
|
||||
}
|
||||
|
||||
return window.open(url, title, settings);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ Release notes
|
|||
-------------
|
||||
##### v1.11.2 (2019-09-29)
|
||||
`-` fix #1272: Argon2 error
|
||||
`-` fixed Dropbox connection on iOS 13 homescreen
|
||||
|
||||
##### v1.11.1 (2019-09-28)
|
||||
`-` fix #1270: password change control focus
|
||||
|
|
Loading…
Reference in New Issue