mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 14:20:36 +08:00
fix(client/rtl): sidebar always displayed on mobile
This commit is contained in:
parent
d35f97d99a
commit
06d87dc94b
1 changed files with 9 additions and 1 deletions
|
|
@ -149,7 +149,15 @@ export default class SidebarContainer extends FlexContainer<BasicWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sidebarEl.classList.toggle("show", isOpen);
|
this.sidebarEl.classList.toggle("show", isOpen);
|
||||||
this.sidebarEl.style.transform = isOpen ? "translateX(0)" : "translateX(-100%)";
|
if (isOpen) {
|
||||||
|
this.sidebarEl.style.transform = "translateX(0)";
|
||||||
|
} else {
|
||||||
|
if (glob.isRtl) {
|
||||||
|
this.sidebarEl.style.transform = "translateX(100%)"
|
||||||
|
} else {
|
||||||
|
this.sidebarEl.style.transform = "translateX(-100%)";
|
||||||
|
}
|
||||||
|
}
|
||||||
this.sidebarEl.style.transition = this.originalSidebarTransition;
|
this.sidebarEl.style.transition = this.originalSidebarTransition;
|
||||||
|
|
||||||
this.backdropEl.classList.toggle("show", isOpen);
|
this.backdropEl.classList.toggle("show", isOpen);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue