feat(mobile): launch bar config now has a fixed tree

This commit is contained in:
Elian Doran 2025-02-08 10:24:26 +02:00
parent 7b36040b26
commit 57c9e0477e
No known key found for this signature in database
3 changed files with 29 additions and 1 deletions

View File

@ -167,6 +167,11 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {
}
this.checkFullHeight();
if (utils.isMobile()) {
const hasFixedTree = this.noteContext?.hoistedNoteId === "_lbMobileRoot";
$("body").toggleClass("force-fixed-tree", hasFixedTree);
}
}
/**

View File

@ -1415,6 +1415,29 @@ body.mobile #launcher-pane .dropdown.global-menu > .dropdown-menu.show {
}
}
@media (max-width: 991px) {
body.mobile.force-fixed-tree #mobile-sidebar-wrapper {
padding-top: 0;
position: static;
height: 40vh;
width: 100vw;
transform: none !important;
background-color: var(--left-pane-background-color) !important;
}
body.mobile.force-fixed-tree #mobile-sidebar-wrapper .quick-search {
display: none;
}
body.mobile.force-fixed-tree #mobile-rest-container {
flex-direction: column !important;
}
body.mobile.force-fixed-tree #detail-container {
flex-grow: 1;
}
}
#launcher-pane {
color: var(--launcher-pane-text-color);
background-color: var(--launcher-pane-background-color);

View File

@ -462,7 +462,7 @@ body.mobile .fancytree-node > span {
background-color: rgba(0, 0, 0, 0.5);
}
body.mobile #mobile-sidebar-wrapper {
body.mobile:not(.force-fixed-tree) #mobile-sidebar-wrapper {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
border-right: 1px solid var(--subtle-border-color);