feat(mobile): move menu button to the right

This commit is contained in:
Elian Doran 2024-11-23 09:43:34 +02:00
parent 14fa687b9c
commit 2dda8f60ed
No known key found for this signature in database

View File

@ -118,13 +118,7 @@ export default class MobileLayout {
return new RootContainer()
.setParent(appContext)
.cssBlock(MOBILE_CSS)
.child(new FlexContainer(launcherPaneIsHorizontal ? "row" : "column")
.id("launcher-pane")
.class(launcherPaneIsHorizontal ? "horizontal" : "vertical")
.css(launcherPaneIsHorizontal ? "height" : "width", "53px")
.child(new GlobalMenuWidget(launcherPaneIsHorizontal))
.child(new LauncherContainer(launcherPaneIsHorizontal))
)
.child(this.#buildLauncherPane(launcherPaneIsHorizontal))
.child(new FlexContainer("row")
.filling()
.child(new ScreenContainer("tree", 'column')
@ -178,4 +172,25 @@ export default class MobileLayout {
.child(new ConfirmDialog())
);
}
#buildLauncherPane(isHorizontal) {
let launcherPane;
if (isHorizontal) {
launcherPane = new FlexContainer(isHorizontal ? "row" : "column")
.class("horizontal")
.css("height", "53px")
.child(new LauncherContainer(true))
.child(new GlobalMenuWidget(true));
} else {
launcherPane = new FlexContainer(launcherPaneIsHorizontal ? "row" : "column")
.class("vertical")
.css("width", "53px")
.child(new GlobalMenuWidget(false))
.child(new LauncherContainer(false));
}
launcherPane.id("launcher-pane");
return launcherPane;
}
}