aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorMichael Foiani <sotech117@michaels-mbp-3.devices.brown.edu>2022-04-28 17:31:27 -0400
committerMichael Foiani <sotech117@michaels-mbp-3.devices.brown.edu>2022-04-28 17:31:27 -0400
commit813ac366831c95f3fa11e01b9588cf18cbe466bc (patch)
tree24a98e427543ff57c9396918ff12ae1cf81a5a92 /src/client/views/PropertiesView.tsx
parentf8503355ff82930e640369637c33d989fd7eaff3 (diff)
parent22fe2791b6a6e92cc4d0ad953363120b51bd6e2c (diff)
Handle merge conflicts with jenny work
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 47a5cd07e..21c688421 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -34,6 +34,7 @@ import "./PropertiesView.scss";
import { DefaultStyleProvider } from "./StyleProvider";
import { PresBox } from "./nodes/trails";
import { IconLookup } from "@fortawesome/fontawesome-svg-core";
+import { PropertiesDocBacklinksSelector } from "./PropertiesDocBacklinksSelector";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -43,6 +44,7 @@ interface PropertiesViewProps {
width: number;
height: number;
styleProvider?: StyleProviderFunc;
+ addDocTab: (doc: Doc, where: string) => boolean;
}
@observer
@@ -72,6 +74,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@observable openFields: boolean = true;
@observable openLayout: boolean = false;
@observable openContexts: boolean = true;
+ @observable openLinks: boolean = true;
@observable openAppearance: boolean = true;
@observable openTransform: boolean = true;
@observable openFilters: boolean = true; // should be false
@@ -277,7 +280,11 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
}
@computed get contexts() {
- return !this.selectedDoc ? (null) : <PropertiesDocContextSelector Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddSplit(doc, "right")} />;
+ return !this.selectedDoc ? (null) : <PropertiesDocContextSelector DocView={this.selectedDocumentView} hideTitle={true} addDocTab={this.props.addDocTab} />;
+ }
+
+ @computed get links() {
+ return !this.selectedDoc ? (null) : <PropertiesDocBacklinksSelector Document={this.selectedDoc} hideTitle={true} addDocTab={this.props.addDocTab} />;
}
@computed get layoutPreview() {
@@ -1071,7 +1078,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="propertiesView-contexts-title"
onPointerDown={action(() => this.openContexts = !this.openContexts)}
style={{ backgroundColor: this.openContexts ? "black" : "" }}>
- Contexts
+ Other Contexts
<div className="propertiesView-contexts-title-icon">
<FontAwesomeIcon icon={this.openContexts ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
@@ -1080,6 +1087,20 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
}
+ @computed get linksSubMenu() {
+ return <div className="propertiesView-contexts">
+ <div className="propertiesView-contexts-title"
+ onPointerDown={action(() => this.openLinks = !this.openLinks)}
+ style={{ backgroundColor: this.openLinks ? "black" : "" }}>
+ Linked To
+ <div className="propertiesView-contexts-title-icon">
+ <FontAwesomeIcon icon={this.openLinks ? "caret-down" : "caret-right"} size="lg" color="white" />
+ </div>
+ </div>
+ {this.openLinks ? <div className="propertiesView-contexts-content" >{this.links}</div> : null}
+ </div>;
+ }
+
@computed get layoutSubMenu() {
return <div className="propertiesView-layout">
<div className="propertiesView-layout-title"
@@ -1331,17 +1352,19 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{this.editableTitle}
</div>
+ {this.contextsSubMenu}
+
+ {this.linksSubMenu}
+
{this.inkSubMenu}
{this.optionsSubMenu}
- {this.sharingSubMenu}
+ {this.fieldsSubMenu}
- {isNovice ? null : this.filtersSubMenu}
-
- {isNovice ? null : this.fieldsSubMenu}
+ {isNovice ? null : this.sharingSubMenu}
- {isNovice ? null : this.contextsSubMenu}
+ {isNovice ? null : this.filtersSubMenu}
{isNovice ? null : this.layoutSubMenu}
</div>;