mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
remove compactMode
logic from layout
This commit is contained in:
parent
59b6a205af
commit
6f6b7a39e3
@ -38,13 +38,12 @@ const LayoutRenders = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Layout extends React.Component {
|
export default class Layout extends React.PureComponent {
|
||||||
progressBar = progressBar.configure({ parent: "html", showSpinner: false })
|
progressBar = progressBar.configure({ parent: "html", showSpinner: false })
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
layoutType: "default",
|
layoutType: "default",
|
||||||
isOnTransition: false,
|
isOnTransition: false,
|
||||||
compactMode: false,
|
|
||||||
renderLock: true,
|
renderLock: true,
|
||||||
renderError: null,
|
renderError: null,
|
||||||
}
|
}
|
||||||
@ -71,12 +70,6 @@ export default class Layout extends React.Component {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
window.app.eventBus.on("toogleCompactMode", (to) => {
|
|
||||||
this.setState({
|
|
||||||
compactMode: to ?? !this.state.compactMode,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
if (window.app.settings.get("forceMobileMode") || window.app.isAppCapacitor() || Math.min(window.screen.width, window.screen.height) < 768 || navigator.userAgent.indexOf("Mobi") > -1) {
|
if (window.app.settings.get("forceMobileMode") || window.app.isAppCapacitor() || Math.min(window.screen.width, window.screen.height) < 768 || navigator.userAgent.indexOf("Mobi") > -1) {
|
||||||
window.isMobile = true
|
window.isMobile = true
|
||||||
this.setLayout("mobile")
|
this.setLayout("mobile")
|
||||||
@ -133,9 +126,6 @@ export default class Layout extends React.Component {
|
|||||||
const layoutComponentProps = {
|
const layoutComponentProps = {
|
||||||
...this.props.bindProps,
|
...this.props.bindProps,
|
||||||
...this.state,
|
...this.state,
|
||||||
layoutPageModesClassnames: [{
|
|
||||||
["noMargin"]: this.state.compactMode,
|
|
||||||
}],
|
|
||||||
onTransitionStart: this.onTransitionStart,
|
onTransitionStart: this.onTransitionStart,
|
||||||
onTransitionFinish: this.onTransitionFinish,
|
onTransitionFinish: this.onTransitionFinish,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user