aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesDocBacklinksSelector.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-11-17 14:35:13 -0500
committerbobzel <zzzman@gmail.com>2022-11-17 14:35:13 -0500
commitb7d4f932d826d48aca4c7c058e05ceaea9c43057 (patch)
tree53ca37a39061bb00ecf4f0fb40a26dd10c8035ba /src/client/views/PropertiesDocBacklinksSelector.tsx
parent30e7fc1b2cb4b5c5f8d5f5e4f808b91e69629245 (diff)
mostly changing strings to enums
Diffstat (limited to 'src/client/views/PropertiesDocBacklinksSelector.tsx')
-rw-r--r--src/client/views/PropertiesDocBacklinksSelector.tsx45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/client/views/PropertiesDocBacklinksSelector.tsx b/src/client/views/PropertiesDocBacklinksSelector.tsx
index 4ead8eaf0..25ac44078 100644
--- a/src/client/views/PropertiesDocBacklinksSelector.tsx
+++ b/src/client/views/PropertiesDocBacklinksSelector.tsx
@@ -1,20 +1,21 @@
-import { computed } from "mobx";
-import { observer } from "mobx-react";
-import * as React from "react";
-import { Doc, DocListCast } from "../../fields/Doc";
-import { Cast } from "../../fields/Types";
-import { emptyFunction } from "../../Utils";
-import { DocumentType } from "../documents/DocumentTypes";
-import { LinkManager } from "../util/LinkManager";
-import { SelectionManager } from "../util/SelectionManager";
-import { LinkMenu } from "./linking/LinkMenu";
+import { computed } from 'mobx';
+import { observer } from 'mobx-react';
+import * as React from 'react';
+import { Doc, DocListCast } from '../../fields/Doc';
+import { Cast } from '../../fields/Types';
+import { emptyFunction } from '../../Utils';
+import { DocumentType } from '../documents/DocumentTypes';
+import { LinkManager } from '../util/LinkManager';
+import { SelectionManager } from '../util/SelectionManager';
+import { LinkMenu } from './linking/LinkMenu';
+import { OpenWhere, OpenWhereMod } from './nodes/DocumentView';
import './PropertiesDocBacklinksSelector.scss';
type PropertiesDocBacklinksSelectorProps = {
- Document: Doc,
- Stack?: any,
- hideTitle?: boolean,
- addDocTab(doc: Doc, location: string): void
+ Document: Doc;
+ Stack?: any;
+ hideTitle?: boolean;
+ addDocTab(doc: Doc, location: OpenWhere): void;
};
@observer
@@ -40,14 +41,16 @@ export class PropertiesDocBacklinksSelector extends React.Component<PropertiesDo
if (otherdoc) {
otherdoc.hidden = false;
- this.props.addDocTab(Doc.IsPrototype(otherdoc) ? Doc.MakeDelegate(otherdoc) : otherdoc, "toggle:right");
+ this.props.addDocTab(Doc.IsPrototype(otherdoc) ? Doc.MakeDelegate(otherdoc) : otherdoc, (OpenWhere.toggle + ':' + OpenWhereMod.right) as OpenWhere);
}
- }
+ };
render() {
- return !SelectionManager.Views().length ? (null) : <div>
- {this.props.hideTitle ? (null) : <p key="contexts">Contexts:</p>}
- <LinkMenu docView={SelectionManager.Views().lastElement()} clearLinkEditor={emptyFunction} itemHandler={this.getOnClick} position={{ x: 0 }} />
- </div>;
+ return !SelectionManager.Views().length ? null : (
+ <div>
+ {this.props.hideTitle ? null : <p key="contexts">Contexts:</p>}
+ <LinkMenu docView={SelectionManager.Views().lastElement()} clearLinkEditor={emptyFunction} itemHandler={this.getOnClick} position={{ x: 0 }} />
+ </div>
+ );
}
-} \ No newline at end of file
+}