diff options
author | bobzel <zzzman@gmail.com> | 2023-01-13 10:04:53 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-01-13 10:04:53 -0500 |
commit | 603d3c0d500fd14dd732040d588fec0e91768729 (patch) | |
tree | 497e4e30cfe544ab45d912609e44f13e24be8a99 /src/client/util/CaptureManager.tsx | |
parent | bb185ceffcac42af373faf40e0bc2225150c243d (diff) |
cleaned up linkmanager a little. maded myshareddocs a folder in myfilesystem. fixed setting author on copied documents to current user.
Diffstat (limited to 'src/client/util/CaptureManager.tsx')
-rw-r--r-- | src/client/util/CaptureManager.tsx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/client/util/CaptureManager.tsx b/src/client/util/CaptureManager.tsx index 0b5957fac..735b06f6d 100644 --- a/src/client/util/CaptureManager.tsx +++ b/src/client/util/CaptureManager.tsx @@ -1,19 +1,14 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { action, computed, observable, runInAction } from 'mobx'; +import { action, computed, observable } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; -import { convertToObject } from 'typescript'; import { Doc, DocListCast } from '../../fields/Doc'; -import { BoolCast, StrCast, Cast } from '../../fields/Types'; -import { addStyleSheet, addStyleSheetRule, Utils } from '../../Utils'; +import { StrCast } from '../../fields/Types'; +import { addStyleSheet } from '../../Utils'; import { LightboxView } from '../views/LightboxView'; import { MainViewModal } from '../views/MainViewModal'; import './CaptureManager.scss'; import { SelectionManager } from './SelectionManager'; -import { undoBatch } from './UndoManager'; -const higflyout = require('@hig/flyout'); -export const { anchorPoints } = higflyout; -export const Flyout = higflyout.default; @observer export class CaptureManager extends React.Component<{}> { @@ -53,15 +48,8 @@ export class CaptureManager extends React.Component<{}> { const doc = this._document; const order: JSX.Element[] = []; if (doc) { - console.log('title', doc.title); - console.log('links', doc.links); - const linkDocs = DocListCast(doc.links); - const firstDocs = linkDocs.filter(linkDoc => Doc.AreProtosEqual(linkDoc.anchor1 as Doc, doc) || Doc.AreProtosEqual((linkDoc.anchor1 as Doc).annotationOn as Doc, doc)); // link docs where 'doc' is anchor1 - const secondDocs = linkDocs.filter(linkDoc => Doc.AreProtosEqual(linkDoc.anchor2 as Doc, doc) || Doc.AreProtosEqual((linkDoc.anchor2 as Doc).annotationOn as Doc, doc)); // link docs where 'doc' is anchor2 - linkDocs.forEach((l, i) => { + DocListCast(doc.links).forEach((l, i) => { if (l) { - console.log(i, (l.anchor1 as Doc).title); - console.log(i, (l.anchor2 as Doc).title); order.push( <div className="list-item"> <div className="number">{i}</div> |