aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-24 18:09:48 -0400
committerbobzel <zzzman@gmail.com>2020-08-24 18:09:48 -0400
commit2e4ab06f38323bba06a4d77c04da1507bac5657f (patch)
tree26daaa5b4f8c76a7e990a9ad81d6cdcae9108e71 /src/client/views/collections/collectionFreeForm
parent385fc8bbcb36b5f062f0202a4fb74bcfba00b150 (diff)
moved contexts from properties button to properties view section
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.scss34
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.tsx18
2 files changed, 52 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.scss b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
index e3ced887d..254afeb0a 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.scss
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
@@ -394,6 +394,40 @@
cursor: auto;
}
}
+ .propertiesView-contexts {
+
+ .propertiesView-contexts-title {
+ font-weight: bold;
+ font-size: 12.5px;
+ padding: 4px;
+ display: flex;
+ color: white;
+ padding-left: 8px;
+ background-color: rgb(51, 51, 51);
+
+ &:hover {
+ cursor: pointer;
+ }
+
+ .propertiesView-contexts-title-icon {
+ float: right;
+ justify-items: right;
+ align-items: flex-end;
+ margin-left: auto;
+ margin-right: 9px;
+
+ &:hover {
+ cursor: pointer;
+ }
+ }
+ }
+
+ .propertiesView-contexts-content {
+ overflow: hidden;
+ padding: 10px;
+ }
+
+ }
.propertiesView-layout {
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
index c5d396859..f3e3c77f7 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
@@ -25,6 +25,8 @@ import { PropertiesButtons } from "../../PropertiesButtons";
import { FormatShapePane } from "./FormatShapePane";
import "./FormatShapePane.scss";
import "./PropertiesView.scss";
+import { CollectionDockingView } from "../CollectionDockingView";
+import { ParentDocSelector, SelectorContextMenu } from "../ParentDocumentSelector";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -64,6 +66,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@observable openSharing: boolean = true;
@observable openFields: boolean = true;
@observable openLayout: boolean = true;
+ @observable openContexts: boolean = true;
@observable openAppearance: boolean = true;
@observable openTransform: boolean = true;
// @observable selectedUser: string = "";
@@ -251,6 +254,10 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
ref && observer.observe(ref);
}
+ @computed get contexts() {
+ return !this.selectedDoc ? (null) : <SelectorContextMenu Document={this.selectedDoc} hideTitle={true} addDocTab={(doc, where) => CollectionDockingView.AddRightSplit(doc)} />;
+ }
+
previewBackground = () => "lightgrey";
@computed get layoutPreview() {
if (this.selectedDoc) {
@@ -959,6 +966,17 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
{novice ? this.noviceFields : this.expandedField}
</div>}
</div>
+ <div className="propertiesView-contexts">
+ <div className="propertiesView-contexts-title"
+ onPointerDown={action(() => this.openContexts = !this.openContexts)}
+ style={{ backgroundColor: this.openContexts ? "black" : "" }}>
+ Contexts
+ <div className="propertiesView-contexts-title-icon">
+ <FontAwesomeIcon icon={this.openContexts ? "caret-down" : "caret-right"} size="lg" color="white" />
+ </div>
+ </div>
+ {this.openContexts ? <div className="propertiesView-contexts-content" >{this.contexts}</div> : null}
+ </div>
<div className="propertiesView-layout">
<div className="propertiesView-layout-title"
onPointerDown={action(() => this.openLayout = !this.openLayout)}