basic support for custom widgets

This commit is contained in:
zadam
2020-03-16 21:16:09 +01:00
parent 8ae78a9e23
commit 173030e02e
14 changed files with 99 additions and 22 deletions

View File

@@ -99,6 +99,10 @@ const RIGHT_PANE_CSS = `
</style>`;
export default class DesktopLayout {
constructor(customWidgets) {
this.customWidgets = customWidgets;
}
getRootWidget(appContext) {
appContext.mainTreeWidget = new NoteTreeWidget();
@@ -144,6 +148,7 @@ export default class DesktopLayout {
.child(new TabCachingWidget(() => new NoteRevisionsWidget()))
.child(new TabCachingWidget(() => new SimilarNotesWidget()))
.child(new TabCachingWidget(() => new WhatLinksHereWidget()))
.addChildren(this.customWidgets['right-pane'])
)
.child(new SidePaneToggles().hideInZenMode())
);