mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
feat(client): implement top launcher pane
This commit is contained in:
parent
8300acd30b
commit
efc84722a9
@ -93,15 +93,18 @@ export default class DesktopLayout {
|
||||
appContext.noteTreeWidget = new NoteTreeWidget();
|
||||
|
||||
const launcherPaneIsHorizontal = true;
|
||||
const launcherPane = new FlexContainer("column")
|
||||
const launcherPane = new FlexContainer(launcherPaneIsHorizontal ? "row" : "column")
|
||||
.id("launcher-pane")
|
||||
.css("width", "53px")
|
||||
.css(launcherPaneIsHorizontal ? "height" : "width", "53px")
|
||||
.child(new GlobalMenuWidget())
|
||||
.child(new LauncherContainer())
|
||||
.child(new LauncherContainer(launcherPaneIsHorizontal))
|
||||
.child(new LeftPaneToggleWidget());
|
||||
|
||||
return new RootContainer()
|
||||
.setParent(appContext)
|
||||
.optChild(launcherPaneIsHorizontal, launcherPane)
|
||||
.child(new FlexContainer('row')
|
||||
.css("flex-grow", "1")
|
||||
.optChild(!launcherPaneIsHorizontal, launcherPane)
|
||||
.child(new LeftPaneContainer()
|
||||
.child(new QuickSearchWidget())
|
||||
@ -203,6 +206,7 @@ export default class DesktopLayout {
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.child(new BulkActionsDialog())
|
||||
.child(new AboutDialog())
|
||||
.child(new HelpDialog())
|
||||
|
@ -4,11 +4,11 @@ import appContext from "../../components/app_context.js";
|
||||
import LauncherWidget from "./launcher.js";
|
||||
|
||||
export default class LauncherContainer extends FlexContainer {
|
||||
constructor() {
|
||||
super('column');
|
||||
constructor(horizontal) {
|
||||
super(horizontal ? "row" : "column");
|
||||
|
||||
this.id('launcher-container');
|
||||
this.css('height', '100%');
|
||||
this.css(horizontal ? "width" : 'height', '100%');
|
||||
this.filling();
|
||||
|
||||
this.load();
|
||||
|
@ -2,7 +2,7 @@ import FlexContainer from "./flex_container.js";
|
||||
|
||||
export default class RootContainer extends FlexContainer {
|
||||
constructor() {
|
||||
super('row');
|
||||
super('column');
|
||||
|
||||
this.id('root-widget');
|
||||
this.css('height', '100%');
|
||||
|
Loading…
x
Reference in New Issue
Block a user