mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
fix(client): add new tab not working in horizontal layout
This commit is contained in:
parent
f62e860b61
commit
13a997beb0
@ -88,8 +88,11 @@ export default class Component {
|
|||||||
|
|
||||||
if (fun) {
|
if (fun) {
|
||||||
return this.callMethod(fun, data);
|
return this.callMethod(fun, data);
|
||||||
}
|
} else {
|
||||||
else {
|
if (!this.parent) {
|
||||||
|
throw new Error(`Component "${this.componentId}" does not have a parent attached to propagate a command.`);
|
||||||
|
}
|
||||||
|
|
||||||
return this.parent.triggerCommand(name, data);
|
return this.parent.triggerCommand(name, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,13 +94,13 @@ export default class DesktopLayout {
|
|||||||
|
|
||||||
const launcherPaneIsHorizontal = true;
|
const launcherPaneIsHorizontal = true;
|
||||||
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
|
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
|
||||||
const tabBar = new TabRowWidget();
|
|
||||||
|
|
||||||
return new RootContainer()
|
return new RootContainer()
|
||||||
.setParent(appContext)
|
.setParent(appContext)
|
||||||
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
|
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
|
||||||
.child(tabBar.class("full-width"))
|
.child(new TabRowWidget().class("full-width"))
|
||||||
.css('height', '40px')
|
.css('height', '40px')
|
||||||
|
.setParent(appContext)
|
||||||
)
|
)
|
||||||
.optChild(launcherPaneIsHorizontal, launcherPane)
|
.optChild(launcherPaneIsHorizontal, launcherPane)
|
||||||
.child(new FlexContainer('row')
|
.child(new FlexContainer('row')
|
||||||
@ -115,7 +115,7 @@ export default class DesktopLayout {
|
|||||||
.id('rest-pane')
|
.id('rest-pane')
|
||||||
.css("flex-grow", "1")
|
.css("flex-grow", "1")
|
||||||
.optChild(!launcherPaneIsHorizontal, new FlexContainer('row')
|
.optChild(!launcherPaneIsHorizontal, new FlexContainer('row')
|
||||||
.child(tabBar)
|
.child(new TabRowWidget())
|
||||||
.child(new TitleBarButtonsWidget())
|
.child(new TitleBarButtonsWidget())
|
||||||
.css('height', '40px')
|
.css('height', '40px')
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user