mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added floating
mode
This commit is contained in:
parent
0ba5383a21
commit
a201dcd45a
@ -227,6 +227,7 @@ export default class Sidebar extends React.Component {
|
|||||||
classnames(
|
classnames(
|
||||||
"app_sidebar",
|
"app_sidebar",
|
||||||
{
|
{
|
||||||
|
["floating"]: window.app?.settings.get("sidebar.floating"),
|
||||||
["collapsed"]: this.state.visible && this.state.collapsed,
|
["collapsed"]: this.state.visible && this.state.collapsed,
|
||||||
["elevated"]: this.state.visible && this.state.elevated,
|
["elevated"]: this.state.visible && this.state.elevated,
|
||||||
["hidden"]: !this.state.visible,
|
["hidden"]: !this.state.visible,
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
border-radius: 0 @app_sidebar_borderRadius @app_sidebar_borderRadius 0;
|
border-radius: 0 @app_sidebar_borderRadius @app_sidebar_borderRadius 0;
|
||||||
border: 1px solid var(--sidebar-background-color);
|
border: 1px solid var(--sidebar-background-color);
|
||||||
|
|
||||||
|
&.floating {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
&.collapsed {
|
&.collapsed {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
|
@ -224,7 +224,12 @@ export default class SidedrawerController extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div
|
return <div
|
||||||
className="sidedrawers-wrapper"
|
className={classnames(
|
||||||
|
"sidedrawers-wrapper",
|
||||||
|
{
|
||||||
|
["floating-sidebar"]: window.app?.settings.get("sidebar.floating")
|
||||||
|
}
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{this.state.drawers}
|
{this.state.drawers}
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
.sidedrawers-wrapper {
|
.sidedrawers-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
|
&.floating-sidebar {
|
||||||
|
z-index: 950;
|
||||||
|
position: absolute;
|
||||||
|
margin-left: @app_sidebar_collapsed_width;
|
||||||
|
}
|
||||||
|
|
||||||
.sidedrawer {
|
.sidedrawer {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user