aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TreeView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-03 10:16:21 -0500
committerbobzel <zzzman@gmail.com>2020-12-03 10:16:21 -0500
commit2770f8609818b11b3073ded0bec437abc333f37f (patch)
tree68e1d262d0eccc5485526b444837663527490745 /src/client/views/collections/TreeView.tsx
parent3b045d03656383df81515485032bfda9e2b16409 (diff)
fixed default textbox background color. added icons to treevie displays
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
-rw-r--r--src/client/views/collections/TreeView.tsx21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index cb521ea75..b850ea2c5 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -422,6 +422,7 @@ export class TreeView extends React.Component<TreeViewProps> {
@computed get renderBullet() {
TraceMobx();
+ const iconType = Doc.toIcon(this.doc);
const checked = this.onCheckedClick ? (this.doc.treeViewChecked ?? "unchecked") : undefined;
return <div className={`bullet${this.outlineMode ? "-outline" : ""}`} key={"bullet"}
title={this.childDocs?.length ? `click to see ${this.childDocs?.length} items` : "view fields"}
@@ -430,12 +431,20 @@ export class TreeView extends React.Component<TreeViewProps> {
color: StrCast(this.doc.color, checked === "unchecked" ? "white" : "inherit"),
opacity: checked === "unchecked" ? undefined : 0.4
}}>
- {this.outlineMode && !(this.doc.text as RichTextField)?.Text ? (null) :
- <FontAwesomeIcon icon={this.outlineMode ? [this.childDocs?.length && !this.treeViewOpen ? "fas" : "far", "circle"] :
- checked === "check" ? "check" :
- (checked === "x" ? "times" : checked === "unchecked" ? "square" :
- !this.treeViewOpen ? (this.childDocs?.length ? "caret-square-right" : "caret-right") :
- (this.childDocs?.length ? "caret-square-down" : "caret-down"))} />}
+ {this.outlineMode ?
+ !(this.doc.text as RichTextField)?.Text ? (null) :
+ <FontAwesomeIcon size="sm" icon={[this.childDocs?.length && !this.treeViewOpen ? "fas" : "far", "circle"]} /> :
+ <div className="treeView-bulletIcons" >
+ <div className="treeView-expandIcon">
+ <FontAwesomeIcon size="sm" icon={this.outlineMode ? [this.childDocs?.length && !this.treeViewOpen ? "fas" : "far", "circle"] :
+ checked === "check" ? "check" :
+ (checked === "x" ? "times" : checked === "unchecked" ? "square" :
+ !this.treeViewOpen ? "caret-right" :
+ "caret-down")} />
+ </div>
+ <FontAwesomeIcon icon={iconType} />
+ </div>
+ }
</div>;
}
@computed get showTitleEditorControl() { return ["*", this._uniqueId, this.props.treeView._uniqueId].includes(Doc.GetT(this.doc, "editTitle", "string", true) || ""); }