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(() => {
|
||||
this.interface.toggleVisibility(true)
|
||||
|
||||
if (app.cores.settings.is("sidebar.collapsable", false)) {
|
||||
this.interface.toggleExpanded(true)
|
||||
}
|
||||
}, 10)
|
||||
}
|
||||
|
||||
@ -304,24 +300,11 @@ export default class Sidebar extends React.Component {
|
||||
}
|
||||
|
||||
onMouseEnter = () => {
|
||||
if (!this.state.visible) {
|
||||
if (!this.state.visible || app.layout.drawer.isMaskVisible()) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (window.app.cores.settings.is("sidebar.collapsable", false)) {
|
||||
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)
|
||||
return this.interface.toggleExpanded(true)
|
||||
}
|
||||
|
||||
handleMouseLeave = () => {
|
||||
@ -329,11 +312,7 @@ export default class Sidebar extends React.Component {
|
||||
return false
|
||||
}
|
||||
|
||||
if (window.app.cores.settings.is("sidebar.collapsable", false)) {
|
||||
return false
|
||||
}
|
||||
|
||||
this.interface.toggleExpanded(false)
|
||||
return this.interface.toggleExpanded(false)
|
||||
}
|
||||
|
||||
onDropdownOpenChange = (to) => {
|
||||
|
@ -117,25 +117,11 @@ export default {
|
||||
},
|
||||
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",
|
||||
group: "sidebar",
|
||||
component: "Slider",
|
||||
icon: "MdTimer",
|
||||
dependsOn: {
|
||||
"sidebar.collapsable": true
|
||||
},
|
||||
title: "Auto Collapse timeout",
|
||||
description: "Set the delay before the sidebar is collapsed",
|
||||
props: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user