From dd16695b0c5fe8c54bc276a230381ae36e19e5ac Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 7 Jul 2022 13:02:33 -0400
Subject: trying to fix errors in compiles

---
 src/client/util/CaptureManager.tsx | 157 +++++++++++++++++++------------------
 1 file changed, 80 insertions(+), 77 deletions(-)

(limited to 'src/client/util/CaptureManager.tsx')

diff --git a/src/client/util/CaptureManager.tsx b/src/client/util/CaptureManager.tsx
index c247afa26..0b5957fac 100644
--- a/src/client/util/CaptureManager.tsx
+++ b/src/client/util/CaptureManager.tsx
@@ -1,17 +1,17 @@
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { action, computed, observable, runInAction } 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 { 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");
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { action, computed, observable, runInAction } 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 { 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;
 
@@ -22,32 +22,31 @@ export class CaptureManager extends React.Component<{}> {
     @observable _document: any;
     @observable isOpen: boolean = false; // whether the CaptureManager is to be displayed or not.
 
-
     constructor(props: {}) {
         super(props);
         CaptureManager.Instance = this;
     }
 
-    public close = action(() => this.isOpen = false);
+    public close = action(() => (this.isOpen = false));
     public open = action((doc: Doc) => {
         this.isOpen = true;
         this._document = doc;
     });
 
-
     @computed get visibilityContent() {
-
-        return <div className="capture-block">
-            <div className="capture-block-title">Visibility</div>
-            <div className="capture-block-radio">
-                <div className="radio-container">
-                    <input type="radio" value="private" name="visibility" style={{ margin: 0, marginRight: 5 }} /> Private
-                </div>
-                <div className="radio-container">
-                    <input type="radio" value="public" name="visibility" style={{ margin: 0, marginRight: 5 }} /> Public
+        return (
+            <div className="capture-block">
+                <div className="capture-block-title">Visibility</div>
+                <div className="capture-block-radio">
+                    <div className="radio-container">
+                        <input type="radio" value="private" name="visibility" style={{ margin: 0, marginRight: 5 }} /> Private
+                    </div>
+                    <div className="radio-container">
+                        <input type="radio" value="public" name="visibility" style={{ margin: 0, marginRight: 5 }} /> Public
+                    </div>
                 </div>
             </div>
-        </div>;
+        );
     }
 
     @computed get linksContent() {
@@ -66,75 +65,79 @@ export class CaptureManager extends React.Component<{}> {
                     order.push(
                         <div className="list-item">
                             <div className="number">{i}</div>
-                            {(l.anchor1 as Doc).title}
+                            {StrCast((l.anchor1 as Doc).title)}
                         </div>
                     );
                 }
             });
         }
 
-        return <div className="capture-block">
-            <div className="capture-block-title">Links</div>
-            <div className="capture-block-list">
-                {order}
+        return (
+            <div className="capture-block">
+                <div className="capture-block-title">Links</div>
+                <div className="capture-block-list">{order}</div>
             </div>
-        </div>;
+        );
     }
 
     @computed get closeButtons() {
-        return <div className="capture-block">
-            <div className="buttons">
-                <div className="save" onClick={() => {
-                    LightboxView.SetLightboxDoc(this._document);
-                    this.close();
-                }}>
-                    Save
-                </div>
-                <div className="cancel" onClick={() => {
-                    const selected = SelectionManager.Views().slice();
-                    SelectionManager.DeselectAll();
-                    selected.map(dv => dv.props.removeDocument?.(dv.props.Document));
-                    this.close();
-                }}>
-                    Cancel
+        return (
+            <div className="capture-block">
+                <div className="buttons">
+                    <div
+                        className="save"
+                        onClick={() => {
+                            LightboxView.SetLightboxDoc(this._document);
+                            this.close();
+                        }}>
+                        Save
+                    </div>
+                    <div
+                        className="cancel"
+                        onClick={() => {
+                            const selected = SelectionManager.Views().slice();
+                            SelectionManager.DeselectAll();
+                            selected.map(dv => dv.props.removeDocument?.(dv.props.Document));
+                            this.close();
+                        }}>
+                        Cancel
+                    </div>
                 </div>
             </div>
-        </div>;
+        );
     }
 
-
-
     private get captureInterface() {
-        return <div className="capture-interface">
-            <div className="capture-t1">
-                <div className="recordButtonOutline" style={{}}>
-                    <div className="recordButtonInner" style={{}}>
+        return (
+            <div className="capture-interface">
+                <div className="capture-t1">
+                    <div className="recordButtonOutline" style={{}}>
+                        <div className="recordButtonInner" style={{}}></div>
                     </div>
+                    Conversation Capture
                 </div>
-                Conversation Capture
-            </div>
-            <div className="capture-t2">
-
-            </div>
-            {this.visibilityContent}
-            {this.linksContent}
-            <div className="close-button" onClick={this.close}>
-                <FontAwesomeIcon icon={"times"} color="black" size={"lg"} />
+                <div className="capture-t2"></div>
+                {this.visibilityContent}
+                {this.linksContent}
+                <div className="close-button" onClick={this.close}>
+                    <FontAwesomeIcon icon={'times'} color="black" size={'lg'} />
+                </div>
+                {this.closeButtons}
             </div>
-            {this.closeButtons}
-        </div>;
-
+        );
     }
 
     render() {
-        return <MainViewModal
-            contents={this.captureInterface}
-            isDisplayed={this.isOpen}
-            interactive={true}
-            closeOnExternalClick={this.close}
-            dialogueBoxStyle={{ width: "500px", height: "350px", border: "none", background: "whitesmoke" }}
-            overlayStyle={{ background: "black" }}
-            overlayDisplayedOpacity={0.6}
-        />;
+        return (
+            <MainViewModal
+                contents={this.captureInterface}
+                isDisplayed={this.isOpen}
+                interactive={true}
+                closeOnExternalClick={this.close}
+                dialogueBoxStyle={{ width: '500px', height: '350px', border: 'none', background: 'whitesmoke' }}
+                overlayStyle={{ background: 'black' }}
+                overlayDisplayedOpacity={0.6}
+            />
+        );
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.2.3-70-g09d2

