aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 47a5cd07e..91cf83619 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,6 +1352,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{this.editableTitle}
</div>
+ {this.contextsSubMenu}
+
+ {this.linksSubMenu}
+
{this.inkSubMenu}
{this.optionsSubMenu}
@@ -1341,8 +1366,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{isNovice ? null : this.fieldsSubMenu}
- {isNovice ? null : this.contextsSubMenu}
-
{isNovice ? null : this.layoutSubMenu}
</div>;
}