aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/button/FontIconBadge.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-14 13:00:27 -0400
committerbobzel <zzzman@gmail.com>2022-06-14 13:00:27 -0400
commitda6283875ec7f59af602e14ed19fcab93533f377 (patch)
tree570e95405a8f8bd06a44c2130acf6f866d700cec /src/client/views/nodes/button/FontIconBadge.tsx
parent263f1c04f7177bad20800f7ae13e04fbd5a20b30 (diff)
made shared with me doc count decrement when a document is viewed (double-clicked, dragged out)
Diffstat (limited to 'src/client/views/nodes/button/FontIconBadge.tsx')
-rw-r--r--src/client/views/nodes/button/FontIconBadge.tsx30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/client/views/nodes/button/FontIconBadge.tsx b/src/client/views/nodes/button/FontIconBadge.tsx
index cf86b5e07..3b5aac221 100644
--- a/src/client/views/nodes/button/FontIconBadge.tsx
+++ b/src/client/views/nodes/button/FontIconBadge.tsx
@@ -7,30 +7,30 @@ import { DragManager } from "../../../util/DragManager";
import "./FontIconBadge.scss";
interface FontIconBadgeProps {
- collection: Doc | undefined;
+ value: string | undefined;
}
@observer
export class FontIconBadge extends React.Component<FontIconBadgeProps> {
_notifsRef = React.createRef<HTMLDivElement>();
- onPointerDown = (e: React.PointerEvent) => {
- setupMoveUpEvents(this, e,
- (e: PointerEvent) => {
- const dragData = new DragManager.DocumentDragData([this.props.collection!]);
- DragManager.StartDocumentDrag([this._notifsRef.current!], dragData, e.x, e.y);
- return true;
- },
- returnFalse, emptyFunction, false);
- }
+ // onPointerDown = (e: React.PointerEvent) => {
+ // setupMoveUpEvents(this, e,
+ // (e: PointerEvent) => {
+ // const dragData = new DragManager.DocumentDragData([this.props.collection!]);
+ // DragManager.StartDocumentDrag([this._notifsRef.current!], dragData, e.x, e.y);
+ // return true;
+ // },
+ // returnFalse, emptyFunction, false);
+ // }
render() {
- if (!(this.props.collection instanceof Doc)) return (null);
- const length = DocListCast(this.props.collection.data).filter(d => GetEffectiveAcl(d) !== AclPrivate).length; // Object.keys(d).length).length; // filter out any documents that we can't read
+ if (this.props.value === undefined) return (null);
return <div className="fontIconBadge-container" ref={this._notifsRef}>
- <div className="fontIconBadge" style={length > 0 ? { "display": "initial" } : { "display": "none" }}
- onPointerDown={this.onPointerDown} >
- {length}
+ <div className="fontIconBadge" style={{ "display": "initial" }}
+ // onPointerDown={this.onPointerDown}
+ >
+ {this.props.value}
</div>
</div>;
}