Web: Scripts: Api: Fixed frames element inside sdk
This commit is contained in:
parent
794f55d8a4
commit
295d1b3105
@ -395,6 +395,7 @@ class PureHome extends React.Component {
|
||||
refreshFiles,
|
||||
setViewAs,
|
||||
hashSettings,
|
||||
logout,
|
||||
} = this.props;
|
||||
|
||||
const eventData = typeof e.data === "string" ? JSON.parse(e.data) : e.data;
|
||||
@ -488,6 +489,11 @@ class PureHome extends React.Component {
|
||||
res = hashSettings;
|
||||
break;
|
||||
}
|
||||
case "logout":
|
||||
{
|
||||
res = logout();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res = "Wrong method";
|
||||
}
|
||||
@ -664,8 +670,6 @@ export default inject(
|
||||
setIsPreview,
|
||||
} = filesStore;
|
||||
|
||||
const { hashSettings } = auth.settingsStore;
|
||||
|
||||
const { gallerySelected } = oformsStore;
|
||||
|
||||
const {
|
||||
@ -716,6 +720,7 @@ export default inject(
|
||||
frameConfig,
|
||||
isFrame,
|
||||
withPaging,
|
||||
hashSettings,
|
||||
} = auth.settingsStore;
|
||||
|
||||
if (!firstLoad) {
|
||||
@ -806,6 +811,7 @@ export default inject(
|
||||
isLoadedEmptyPage,
|
||||
|
||||
hashSettings,
|
||||
logout: auth.logout,
|
||||
};
|
||||
}
|
||||
)(withRouter(observer(Home)));
|
||||
|
@ -243,6 +243,10 @@
|
||||
this.#isConnected = true;
|
||||
}
|
||||
|
||||
window.DocSpace.SDK.frames = window.DocSpace.SDK.frames || [];
|
||||
|
||||
window.DocSpace.SDK.frames[this.config.frameId] = this;
|
||||
|
||||
return this.#iframe;
|
||||
}
|
||||
|
||||
@ -274,6 +278,8 @@
|
||||
window.removeEventListener("message", this.#onMessage, false);
|
||||
this.#isConnected = false;
|
||||
|
||||
delete window.DocSpace.SDK.frames[this.config.frameId];
|
||||
|
||||
this.#iframe.parentNode &&
|
||||
this.#iframe.parentNode.replaceChild(target, this.#iframe);
|
||||
}
|
||||
@ -380,6 +386,4 @@
|
||||
window.DocSpace = window.DocSpace || {};
|
||||
|
||||
window.DocSpace.SDK = new DocSpace(config);
|
||||
|
||||
window.DocSpace.SDK.initFrame();
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user