mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
remove sidebar auto collapse
This commit is contained in:
parent
df88991bdf
commit
7c44442bb8
@ -152,10 +152,6 @@ export default class Sidebar extends React.Component {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.interface.toggleVisibility(true)
|
this.interface.toggleVisibility(true)
|
||||||
|
|
||||||
if (app.cores.settings.is("sidebar.collapsable", false)) {
|
|
||||||
this.interface.toggleExpanded(true)
|
|
||||||
}
|
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,24 +300,11 @@ export default class Sidebar extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMouseEnter = () => {
|
onMouseEnter = () => {
|
||||||
if (!this.state.visible) {
|
if (!this.state.visible || app.layout.drawer.isMaskVisible()) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.app.cores.settings.is("sidebar.collapsable", false)) {
|
return this.interface.toggleExpanded(true)
|
||||||
if (!this.state.expanded) {
|
|
||||||
this.interface.toggleExpanded(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// do nothing if is mask visible
|
|
||||||
if (app.layout.drawer.isMaskVisible()) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
this.interface.toggleExpanded(true)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseLeave = () => {
|
handleMouseLeave = () => {
|
||||||
@ -329,11 +312,7 @@ export default class Sidebar extends React.Component {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.app.cores.settings.is("sidebar.collapsable", false)) {
|
return this.interface.toggleExpanded(false)
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
this.interface.toggleExpanded(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDropdownOpenChange = (to) => {
|
onDropdownOpenChange = (to) => {
|
||||||
|
@ -117,25 +117,11 @@ export default {
|
|||||||
},
|
},
|
||||||
mobile: false,
|
mobile: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "sidebar.collapsable",
|
|
||||||
group: "sidebar",
|
|
||||||
component: "Switch",
|
|
||||||
icon: "Columns",
|
|
||||||
title: "Auto Collapse",
|
|
||||||
description: "Allow to collapse the sidebar when loose focus.",
|
|
||||||
emitEvent: "settingChanged.sidebar_collapse",
|
|
||||||
storaged: true,
|
|
||||||
mobile: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "sidebar.collapse_delay_time",
|
id: "sidebar.collapse_delay_time",
|
||||||
group: "sidebar",
|
group: "sidebar",
|
||||||
component: "Slider",
|
component: "Slider",
|
||||||
icon: "MdTimer",
|
icon: "MdTimer",
|
||||||
dependsOn: {
|
|
||||||
"sidebar.collapsable": true
|
|
||||||
},
|
|
||||||
title: "Auto Collapse timeout",
|
title: "Auto Collapse timeout",
|
||||||
description: "Set the delay before the sidebar is collapsed",
|
description: "Set the delay before the sidebar is collapsed",
|
||||||
props: {
|
props: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user