diff options
author | bobzel <zzzman@gmail.com> | 2022-06-09 17:25:55 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-09 17:25:55 -0400 |
commit | 43968431d3c94cea07f06421d29ac0f190c55cde (patch) | |
tree | b136335b28e07acff9b3e1738000911a8efc232c /src/client/views/MainView.tsx | |
parent | d1f268c1788f54c62c0779aba224b5b7d30edb01 (diff) |
added activePage field for choosing dash page layout.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index ad041384c..5fd76c388 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -662,16 +662,17 @@ export class MainView extends React.Component { {DocumentLinksButton.LinkEditorDocView ? <LinkMenu clearLinkEditor={action(() => DocumentLinksButton.LinkEditorDocView = undefined)} docView={DocumentLinksButton.LinkEditorDocView} /> : (null)} {LinkDocPreview.LinkInfo ? <LinkDocPreview {...LinkDocPreview.LinkInfo} /> : (null)} - {Doc.UserDoc().activeDashboard ? - <> - <div style={{ position: "relative", display: LightboxView.LightboxDoc ? "none" : undefined, zIndex: 1999 }} > - <CollectionMenu panelWidth={this.topMenuWidth} panelHeight={this.topMenuHeight} /> - </div> - <GestureOverlay > - {this.mainDashboardArea} - </GestureOverlay> - </> : - <DashboardView/> + {((page:string) => { + switch (page) { + case "dashboard": + default:return <> + <div style={{ position: "relative", display: LightboxView.LightboxDoc ? "none" : undefined, zIndex: 1999 }} > + <CollectionMenu panelWidth={this.topMenuWidth} panelHeight={this.topMenuHeight} /> + </div> + <GestureOverlay> {this.mainDashboardArea} </GestureOverlay> + </>; + case "home": return <DashboardView/>; + } })(StrCast(Doc.UserDoc().activePage)) } <PreviewCursor /> |