Skip to content

Build your personal knowledge base with Trilium Notes

chore(layout): fix regressions after merge

Elian Dorana45c1a1dc8e8
diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsx
index 27fb0f7edf..9112ccbb5b 100644
--- a/apps/client/src/layouts/desktop_layout.tsx
+++ b/apps/client/src/layouts/desktop_layout.tsx
@@ -79,6 +79,11 @@ export default class DesktopLayout {
const customTitleBarButtons = !hasNativeTitleBar && !isMac && !isWindows;
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
+ const titleRow = new FlexContainer("row")
+ .class("title-row")
+ .child(<NoteIconWidget />)
+ .child(<NoteTitleWidget />);
+
const rootContainer = new RootContainer(true)
.setParent(appContext)
.class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout")
@@ -143,18 +148,17 @@ export default class DesktopLayout {
.child(<CreatePaneButton />)
.optChild(isNewLayout, <NoteActions />)
)
- .child(new FlexContainer("row")
- .class("title-row")
- .child(<NoteIconWidget />)
- .child(<NoteTitleWidget />)
- )
- .child(<Ribbon />)
+ .optChild(!isNewLayout, titleRow)
+ .optChild(!isNewLayout, <Ribbon><NoteActions /></Ribbon>)
+ .optChild(isNewLayout, <StandaloneRibbonAdapter component={FormattingToolbar} />)
.child(new WatchedFileUpdateStatusWidget())
.child(<FloatingButtons items={DESKTOP_FLOATING_BUTTONS} />)
.child(
new ScrollingContainer()
.filling()
- .child(new ContentHeader()
+ .optChild(isNewLayout, titleRow)
+ .optChild(isNewLayout, <NoteTitleDetails />)
+ .optChild(!isNewLayout, new ContentHeader()
.child(<ReadOnlyNoteInfoBar />)
.child(<SharedInfo />)
)