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.tsx26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 47a5cd07e..92b52ed5b 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;
@@ -72,6 +73,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@observable openFields: boolean = true;
@observable openLayout: boolean = false;
@observable openContexts: boolean = true;
+ @observable openBacklinks: boolean = true;
@observable openAppearance: boolean = true;
@observable openTransform: boolean = true;
@observable openFilters: boolean = true; // should be false
@@ -280,6 +282,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
return !this.selectedDoc ? (null) : <PropertiesDocContextSelector Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddSplit(doc, "right")} />;
}
+ @computed get backlinks() {
+ return !this.selectedDoc ? (null) : <PropertiesDocBacklinksSelector Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddSplit(doc, "right")} />;
+ }
+
@computed get layoutPreview() {
if (SelectionManager.Views().length > 1) {
return "-- multiple selected --";
@@ -1080,6 +1086,20 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
}
+ @computed get backlinksSubMenu() {
+ return <div className="propertiesView-contexts">
+ <div className="propertiesView-contexts-title"
+ onPointerDown={action(() => this.openBacklinks = !this.openBacklinks)}
+ style={{ backgroundColor: this.openBacklinks ? "black" : "" }}>
+ Backlinks
+ <div className="propertiesView-contexts-title-icon">
+ <FontAwesomeIcon icon={this.openBacklinks ? "caret-down" : "caret-right"} size="lg" color="white" />
+ </div>
+ </div>
+ {this.openBacklinks ? <div className="propertiesView-contexts-content" >{this.backlinks}</div> : null}
+ </div>;
+ }
+
@computed get layoutSubMenu() {
return <div className="propertiesView-layout">
<div className="propertiesView-layout-title"
@@ -1331,6 +1351,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{this.editableTitle}
</div>
+ {this.contextsSubMenu}
+
+ {this.backlinksSubMenu}
+
{this.inkSubMenu}
{this.optionsSubMenu}
@@ -1341,8 +1365,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{isNovice ? null : this.fieldsSubMenu}
- {isNovice ? null : this.contextsSubMenu}
-
{isNovice ? null : this.layoutSubMenu}
</div>;
}