mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
right pane restoration for custom widgets
This commit is contained in:
@@ -38,6 +38,7 @@ import BookPropertiesWidget from "../widgets/ribbon_widgets/book_properties.js";
|
||||
import LinkMapWidget from "../widgets/ribbon_widgets/link_map.js";
|
||||
import NotePathsWidget from "../widgets/ribbon_widgets/note_paths.js";
|
||||
import SimilarNotesWidget from "../widgets/ribbon_widgets/similar_notes.js";
|
||||
import RightPaneContainer from "../widgets/containers/right_pane_container.js";
|
||||
|
||||
export default class DesktopLayout {
|
||||
constructor(customWidgets) {
|
||||
@@ -76,64 +77,74 @@ export default class DesktopLayout {
|
||||
)
|
||||
.child(new LeftPaneContainer()
|
||||
.hideInZenMode()
|
||||
.css("width", "300px")
|
||||
.child(new QuickSearchWidget())
|
||||
.child(appContext.mainTreeWidget)
|
||||
.child(...this.customWidgets.get('left-pane'))
|
||||
)
|
||||
.child(new FlexContainer('column')
|
||||
.id('center-pane')
|
||||
.css("flex-grow", "1")
|
||||
.child(new FlexContainer('row').overflowing()
|
||||
.child(new TabRowWidget())
|
||||
.child(new TitleBarButtonsWidget())
|
||||
.css('height', '40px')
|
||||
)
|
||||
.child(new SplitNoteContainer(() =>
|
||||
new FlexContainer('column')
|
||||
.css("flex-grow", "1")
|
||||
.child(new FlexContainer('row').class('title-row')
|
||||
.css('align-items: center;')
|
||||
.cssBlock('.title-row > * { margin: 5px; }')
|
||||
.overflowing()
|
||||
.child(new NoteIconWidget())
|
||||
.child(new NoteTitleWidget())
|
||||
.child(new SpacerWidget(1))
|
||||
.child(new ClosePaneButton())
|
||||
.child(new CreatePaneButton())
|
||||
.child(new FlexContainer('row')
|
||||
.filling()
|
||||
.child(new FlexContainer('column')
|
||||
.filling()
|
||||
.id('center-pane')
|
||||
.child(new SplitNoteContainer(() =>
|
||||
new FlexContainer('column')
|
||||
.css("flex-grow", "1")
|
||||
.child(new FlexContainer('row').class('title-row')
|
||||
.css('align-items: center;')
|
||||
.cssBlock('.title-row > * { margin: 5px; }')
|
||||
.overflowing()
|
||||
.child(new NoteIconWidget())
|
||||
.child(new NoteTitleWidget())
|
||||
.child(new SpacerWidget(1))
|
||||
.child(new ClosePaneButton())
|
||||
.child(new CreatePaneButton())
|
||||
)
|
||||
.child(
|
||||
new RibbonContainer()
|
||||
.ribbon(new SearchDefinitionWidget())
|
||||
.ribbon(new BasicPropertiesWidget())
|
||||
.ribbon(new BookPropertiesWidget())
|
||||
.ribbon(new NotePropertiesWidget())
|
||||
.ribbon(new FilePropertiesWidget())
|
||||
.ribbon(new ImagePropertiesWidget())
|
||||
.ribbon(new PromotedAttributesWidget())
|
||||
.ribbon(new OwnedAttributeListWidget())
|
||||
.ribbon(new InheritedAttributesWidget())
|
||||
.ribbon(new NotePathsWidget())
|
||||
.ribbon(new LinkMapWidget())
|
||||
.ribbon(new SimilarNotesWidget())
|
||||
.ribbon(new NoteInfoWidget())
|
||||
.button(new ButtonWidget()
|
||||
.icon('bx bx-history')
|
||||
.title("Note Revisions")
|
||||
.command("showNoteRevisions")
|
||||
.titlePlacement("bottom"))
|
||||
.button(new NoteActionsWidget())
|
||||
)
|
||||
.child(new NoteUpdateStatusWidget())
|
||||
.child(
|
||||
new ScrollingContainer()
|
||||
.child(new SqlTableSchemasWidget())
|
||||
.child(new NoteDetailWidget())
|
||||
.child(new NoteListWidget())
|
||||
.child(new SearchResultWidget())
|
||||
.child(new SqlResultWidget())
|
||||
)
|
||||
.child(...this.customWidgets.get('center-pane'))
|
||||
)
|
||||
)
|
||||
.child(
|
||||
new RibbonContainer()
|
||||
.ribbon(new SearchDefinitionWidget())
|
||||
.ribbon(new BasicPropertiesWidget())
|
||||
.ribbon(new BookPropertiesWidget())
|
||||
.ribbon(new NotePropertiesWidget())
|
||||
.ribbon(new FilePropertiesWidget())
|
||||
.ribbon(new ImagePropertiesWidget())
|
||||
.ribbon(new PromotedAttributesWidget())
|
||||
.ribbon(new OwnedAttributeListWidget())
|
||||
.ribbon(new InheritedAttributesWidget())
|
||||
.ribbon(new NotePathsWidget())
|
||||
.ribbon(new LinkMapWidget())
|
||||
.ribbon(new SimilarNotesWidget())
|
||||
.ribbon(new NoteInfoWidget())
|
||||
.button(new ButtonWidget()
|
||||
.icon('bx bx-history')
|
||||
.title("Note Revisions")
|
||||
.command("showNoteRevisions")
|
||||
.titlePlacement("bottom"))
|
||||
.button(new NoteActionsWidget())
|
||||
)
|
||||
.child(new NoteUpdateStatusWidget())
|
||||
.child(
|
||||
new ScrollingContainer()
|
||||
.child(new SqlTableSchemasWidget())
|
||||
.child(new NoteDetailWidget())
|
||||
.child(new NoteListWidget())
|
||||
.child(new SearchResultWidget())
|
||||
.child(new SqlResultWidget())
|
||||
)
|
||||
.child(...this.customWidgets.get('center-pane'))
|
||||
)
|
||||
.child(new RightPaneContainer()
|
||||
.hideInZenMode()
|
||||
.css("width", "300px")
|
||||
.child(...this.customWidgets.get('right-pane'))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user