mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
redesign experiments
This commit is contained in:
@@ -25,7 +25,6 @@ import PromotedAttributesWidget from "../widgets/type_property_widgets/promoted_
|
||||
import InheritedAttributesWidget from "../widgets/type_property_widgets/inherited_attribute_list.js";
|
||||
import NoteListWidget from "../widgets/note_list.js";
|
||||
import SearchDefinitionWidget from "../widgets/type_property_widgets/search_definition.js";
|
||||
import Container from "../widgets/containers/container.js";
|
||||
import SqlResultWidget from "../widgets/sql_result.js";
|
||||
import SqlTableSchemasWidget from "../widgets/sql_table_schemas.js";
|
||||
import FilePropertiesWidget from "../widgets/type_property_widgets/file_properties.js";
|
||||
@@ -37,6 +36,8 @@ import SyncStatusWidget from "../widgets/sync_status.js";
|
||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
|
||||
import RootContainer from "../widgets/containers/root_container.js";
|
||||
import NoteUpdateStatusWidget from "../widgets/note_update_status.js";
|
||||
import SpacerWidget from "../widgets/spacer.js";
|
||||
import QuickSearchWidget from "../widgets/quick_search.js";
|
||||
|
||||
const RIGHT_PANE_CSS = `
|
||||
<style>
|
||||
@@ -140,69 +141,72 @@ export default class DesktopLayout {
|
||||
|
||||
return new RootContainer()
|
||||
.setParent(appContext)
|
||||
.child(new FlexContainer('row').overflowing()
|
||||
.css('height', '36px')
|
||||
.child(new GlobalMenuWidget())
|
||||
.child(new SyncStatusWidget())
|
||||
.child(new TabRowWidget())
|
||||
.child(new TitleBarButtonsWidget()))
|
||||
.child(new StandardTopWidget()
|
||||
.hideInZenMode())
|
||||
.child(new FlexContainer('row')
|
||||
.collapsible()
|
||||
.filling()
|
||||
.child(new SidePaneContainer('left')
|
||||
.hideInZenMode()
|
||||
.child(appContext.mainTreeWidget)
|
||||
.child(...this.customWidgets.get('left-pane'))
|
||||
.child(new SidePaneContainer('left')
|
||||
.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()
|
||||
.filling()
|
||||
.child(new GlobalMenuWidget())
|
||||
.child(new SyncStatusWidget())
|
||||
.child(new SpacerWidget())
|
||||
.child(new TitleBarButtonsWidget())
|
||||
.css('height', '36px')
|
||||
)
|
||||
.child(new FlexContainer('column').id('center-pane')
|
||||
.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 NotePathsWidget().hideInZenMode())
|
||||
.child(new NoteTypeWidget().hideInZenMode())
|
||||
.child(new NoteActionsWidget().hideInZenMode())
|
||||
)
|
||||
.child(
|
||||
new TabCachingWidget(() => new CollapsibleSectionContainer()
|
||||
.child(new SearchDefinitionWidget())
|
||||
.child(new NotePropertiesWidget())
|
||||
.child(new FilePropertiesWidget())
|
||||
.child(new ImagePropertiesWidget())
|
||||
.child(new PromotedAttributesWidget())
|
||||
.child(new OwnedAttributeListWidget())
|
||||
.child(new InheritedAttributesWidget())
|
||||
)
|
||||
.child(new FlexContainer('row').overflowing()
|
||||
.child(new TabRowWidget())
|
||||
)
|
||||
.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 NotePathsWidget().hideInZenMode())
|
||||
.child(new NoteTypeWidget().hideInZenMode())
|
||||
.child(new NoteActionsWidget().hideInZenMode())
|
||||
)
|
||||
.child(
|
||||
new TabCachingWidget(() => new CollapsibleSectionContainer()
|
||||
.child(new SearchDefinitionWidget())
|
||||
.child(new NotePropertiesWidget())
|
||||
.child(new FilePropertiesWidget())
|
||||
.child(new ImagePropertiesWidget())
|
||||
.child(new PromotedAttributesWidget())
|
||||
.child(new OwnedAttributeListWidget())
|
||||
.child(new InheritedAttributesWidget())
|
||||
)
|
||||
)
|
||||
.child(new NoteUpdateStatusWidget())
|
||||
.child(
|
||||
new TabCachingWidget(() => new ScrollingContainer()
|
||||
.child(new SqlTableSchemasWidget())
|
||||
.child(new NoteDetailWidget())
|
||||
.child(new NoteListWidget())
|
||||
.child(new SearchResultWidget())
|
||||
.child(new SqlResultWidget())
|
||||
)
|
||||
.child(
|
||||
new TabCachingWidget(() => new ScrollingContainer()
|
||||
.child(new SqlTableSchemasWidget())
|
||||
.child(new NoteDetailWidget())
|
||||
.child(new NoteListWidget())
|
||||
.child(new SearchResultWidget())
|
||||
.child(new SqlResultWidget())
|
||||
)
|
||||
.child(new TabCachingWidget(() => new SimilarNotesWidget()))
|
||||
.child(...this.customWidgets.get('center-pane'))
|
||||
)
|
||||
.child(new SidePaneContainer('right')
|
||||
.cssBlock(RIGHT_PANE_CSS)
|
||||
.hideInZenMode()
|
||||
.child(new NoteInfoWidget())
|
||||
.child(new TabCachingWidget(() => new CalendarWidget()))
|
||||
.child(new TabCachingWidget(() => new EditedNotesWidget()))
|
||||
.child(new TabCachingWidget(() => new LinkMapWidget()))
|
||||
.child(new TabCachingWidget(() => new NoteRevisionsWidget()))
|
||||
.child(new TabCachingWidget(() => new WhatLinksHereWidget()))
|
||||
.child(...this.customWidgets.get('right-pane'))
|
||||
)
|
||||
.child(new SidePaneToggles().hideInZenMode())
|
||||
.child(new TabCachingWidget(() => new SimilarNotesWidget()))
|
||||
.child(...this.customWidgets.get('center-pane'))
|
||||
// .child(new SidePaneContainer('right')
|
||||
// .cssBlock(RIGHT_PANE_CSS)
|
||||
// .hideInZenMode()
|
||||
// .child(new NoteInfoWidget())
|
||||
// .child(new TabCachingWidget(() => new CalendarWidget()))
|
||||
// .child(new TabCachingWidget(() => new EditedNotesWidget()))
|
||||
// .child(new TabCachingWidget(() => new LinkMapWidget()))
|
||||
// .child(new TabCachingWidget(() => new NoteRevisionsWidget()))
|
||||
// .child(new TabCachingWidget(() => new WhatLinksHereWidget()))
|
||||
// .child(...this.customWidgets.get('right-pane'))
|
||||
// )
|
||||
// .child(new SidePaneToggles().hideInZenMode())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user