mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
Render layout even when has renderlock
This commit is contained in:
parent
6c1699447f
commit
9f3a538492
@ -95,6 +95,10 @@ export default class Layout extends React.Component {
|
|||||||
this.setLayout("default")
|
this.setLayout("default")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
window.app.setLocation = (location) => {
|
||||||
|
return window.history.pushState(null, null, location)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onTransitionStart = () => {
|
onTransitionStart = () => {
|
||||||
@ -114,13 +118,7 @@ export default class Layout extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.state.renderLock) {
|
const InitializationComponent = this.props.staticRenders?.Initialization ? React.createElement(this.props.staticRenders.Initialization) : null
|
||||||
if (this.props.staticRenders?.Initialization) {
|
|
||||||
return React.createElement(this.props.staticRenders.Initialization)
|
|
||||||
}
|
|
||||||
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.state.renderError) {
|
if (this.state.renderError) {
|
||||||
if (this.props.staticRenders?.RenderError) {
|
if (this.props.staticRenders?.RenderError) {
|
||||||
@ -133,7 +131,7 @@ export default class Layout extends React.Component {
|
|||||||
const layoutComponentProps = {
|
const layoutComponentProps = {
|
||||||
...this.props.bindProps,
|
...this.props.bindProps,
|
||||||
...this.state,
|
...this.state,
|
||||||
children: this.props.children,
|
children: this.state.RenderChildren,
|
||||||
layoutPageModesClassnames: [{
|
layoutPageModesClassnames: [{
|
||||||
["noMargin"]: this.state.compactMode,
|
["noMargin"]: this.state.compactMode,
|
||||||
}],
|
}],
|
||||||
@ -141,10 +139,10 @@ export default class Layout extends React.Component {
|
|||||||
onTransitionFinish: this.onTransitionFinish,
|
onTransitionFinish: this.onTransitionFinish,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LayoutRenders[this.state.layoutType]) {
|
const Layout = LayoutRenders[this.state.layoutType]
|
||||||
return LayoutRenders[this.state.layoutType](layoutComponentProps)
|
|
||||||
}
|
|
||||||
|
|
||||||
return LayoutRenders.default(layoutComponentProps)
|
return <Layout {...layoutComponentProps}>
|
||||||
|
{this.state.renderLock ? InitializationComponent : this.props.children}
|
||||||
|
</Layout>
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user