diff options
| author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-14 03:04:14 +0800 |
|---|---|---|
| committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-14 03:04:14 +0800 |
| commit | 4c412452ea9886ca72af5efda4caa646aebe4f8a (patch) | |
| tree | 4e236cfe556d91aa897ca85b21689541d22b01ef /src/client/views/MainViewNotifs.tsx | |
| parent | 71b813b51f8e5d4e566eee5cac195f94c02f9ee1 (diff) | |
| parent | 122642c8f53ae37f67c92313490b247f0af154ba (diff) | |
Merge branch 'master' into presentation_updates
Diffstat (limited to 'src/client/views/MainViewNotifs.tsx')
| -rw-r--r-- | src/client/views/MainViewNotifs.tsx | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/client/views/MainViewNotifs.tsx b/src/client/views/MainViewNotifs.tsx deleted file mode 100644 index 89006ebc8..000000000 --- a/src/client/views/MainViewNotifs.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { observable } from 'mobx'; -import { observer } from 'mobx-react'; -import "normalize.css"; -import * as React from 'react'; -import { Doc, DocListCast, Opt } from '../../fields/Doc'; -import { returnFalse, setupMoveUpEvents } from '../../Utils'; -import { DragManager } from '../util/DragManager'; -import "./MainViewNotifs.scss"; -import { MainView } from './MainView'; -import { NumCast } from '../../fields/Types'; - - -@observer -export class MainViewNotifs extends React.Component { - @observable static NotifsCol: Opt<Doc>; - _notifsRef = React.createRef<HTMLDivElement>(); - - onPointerDown = (e: React.PointerEvent) => { - setupMoveUpEvents(this, e, - (e: PointerEvent) => { - const dragData = new DragManager.DocumentDragData([MainViewNotifs.NotifsCol!]); - DragManager.StartDocumentDrag([this._notifsRef.current!], dragData, e.x, e.y); - return true; - }, - returnFalse, - () => MainViewNotifs.NotifsCol && MainView.Instance.selectMenu(MainViewNotifs.NotifsCol, "Sharing")); - } - - render() { - const length = MainViewNotifs.NotifsCol ? DocListCast(MainViewNotifs.NotifsCol.data).length : 0; - return <div className="mainNotifs-container" style={{ width: 15, height: 15, top: 12 + NumCast(MainViewNotifs.NotifsCol?.position) * 60 }} ref={this._notifsRef}> - <button className="mainNotifs-badge" style={length > 0 ? { "display": "initial" } : { "display": "none" }} - onPointerDown={this.onPointerDown} > - {length} - </button> - </div>; - } -} |
