diff options
author | bobzel <zzzman@gmail.com> | 2021-04-30 15:03:45 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-04-30 15:03:45 -0400 |
commit | c1a664b55ff39c3f1697249e6a712c741efc2458 (patch) | |
tree | ed780cc1ab524d30b22893cdf9e22f892ba5896f /src/client/views/MainView.tsx | |
parent | bdf4ca9e31bd3000aff87d3a4c3db3fda1b47967 (diff) |
cleaned up rightbuttons in treeView and fixed so that they show up in dashboard. fixed filters to gatherfield values correctly.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index e54d84a6c..4eeb1fc95 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -309,32 +309,6 @@ export class MainView extends React.Component { } - /** - * add lock and hide button decorations for the "Dashboards" flyout TreeView - */ - DashboardStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps | DocumentViewProps>, property: string) { - const toggleField = undoBatch(action((e: React.MouseEvent, doc: Doc, field: string) => { - e.stopPropagation(); - doc[field] = doc[field] ? undefined : true; - })); - switch (property.split(":")[0]) { - case StyleProp.Decorations: - return !doc || property.includes(":afterHeader") || // bcz: Todo: afterHeader should be generalized into a renderPath that is a list of the documents rendered so far which would mimic much of CSS property selectors - DocListCast((Doc.UserDoc().myDashboards as Doc).data).some(dash => dash === doc || - DocListCast(dash.data).some(tabset => tabset === doc)) ? (null) : - <> - <div className={`styleProvider-treeView-hide${doc.hidden ? "-active" : ""}`} onClick={e => toggleField(e, doc, "hidden")}> - <FontAwesomeIcon icon={doc.hidden ? "eye-slash" : "eye"} size="sm" /> - </div> - <div className={`styleProvider-treeView-lock${doc._lockedPosition ? "-active" : ""}`} onClick={e => toggleField(e, doc, "_lockedPosition")}> - <FontAwesomeIcon icon={doc._lockedPosition ? "lock" : "unlock"} size="sm" /> - </div> - </>; - } - return DefaultStyleProvider(doc, props, property); - } - - @computed get flyout() { return !this._flyoutWidth ? <div key="flyout" className={`mainView-libraryFlyout-out`}> {this.docButtons} @@ -349,7 +323,7 @@ export class MainView extends React.Component { pinToPres={emptyFunction} docViewPath={returnEmptyDoclist} layerProvider={undefined} - styleProvider={this._sidebarContent.proto === Doc.UserDoc().myDashboards ? this.DashboardStyleProvider : DefaultStyleProvider} + styleProvider={this._sidebarContent.proto === Doc.UserDoc().myDashboards ? DashboardStyleProvider : DefaultStyleProvider} rootSelected={returnTrue} removeDocument={returnFalse} ScreenToLocalTransform={this.mainContainerXf} |