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.tsx53
1 files changed, 25 insertions, 28 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 9c327b3f1..6b208f25e 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -1,6 +1,6 @@
import React = require('react');
import { IconLookup } from '@fortawesome/fontawesome-svg-core';
-import { faAnchor, faArrowRight, faWindowMaximize } from '@fortawesome/free-solid-svg-icons';
+import { faAnchor, faArrowRight, faListNumeric, faWindowMaximize } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Checkbox, Icon, Tooltip } from '@material-ui/core';
import { intersection } from 'lodash';
@@ -37,6 +37,7 @@ import { DefaultStyleProvider } from './StyleProvider';
import { RichTextField } from '../../fields/RichTextField';
import { AiFillFileText } from "react-icons/ai" //* as Icons from "react-icons/ai" //
import * as Icons from "react-icons/bs" //{BsCollectionFill, BsFillFileEarmarkImageFill} from "react-icons/bs"
+import { GrCircleInformation } from 'react-icons/gr'
import { CgBrowser} from "react-icons/cg"
import { ImageField, VideoField, WebField } from '../../fields/URLField';
import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa"; //
@@ -114,6 +115,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@observable inOptions: boolean = false;
@observable _controlButton: boolean = false;
+
+ @observable allClose: boolean = false;
+
componentDidMount() {
this.selectedDocListenerDisposer?.();
// this.selectedDocListenerDisposer = autorun(() => this.openFilters && this.selectedDoc && this.checkFilterDoc());
@@ -504,7 +508,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
}
@computed get currentType() {
- console.log("current type " + this.selectedDoc?.type)
+ // console.log("current type " + this.selectedDoc?.type)
const documentType = StrCast(this.selectedDoc?.type)
var currentType: string = documentType;
@@ -1201,37 +1205,23 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
);
}
- @computed get doubleClickClose() {
- //action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = !this.openTransform))
- //console.log(this.openContexts + " hello " + this.openOptions + this.openTransform + this.openLinks + this.openFields)
- if (this.openContexts || this.openOptions || this.openTransform || this.openLinks || this.openFields){
- this.openContexts = false;
- this.openOptions = false;
- this.openTransform = false;
- this.openLinks = false;
- this.openFields = false;
-
- } else if (!this.openContexts && !this.openOptions && !this.openTransform && !this.openLinks && !this.openFields){
- this.openContexts = true;
- this.openOptions = true;
- this.openTransform = true;
- this.openLinks = true;
- this.openFields = true;
- }
-
- return (
- console.log("made")
- )
- }
+// create observable with current property
+// if everyother one is closed, set allClsoe = true
+// on double click close all except current
+// if everything is closed on double clikc then open everythigng
+
+// if everythign is closed except current property ==> double click = open all
+// else ==> double click = close except current property
@computed get linksSubMenu() {
// onPointerDown={action(() => (this.openLinks = !this.openLinks))}
-
+ //(this.openContexts = false, this.openOptions = false, this.openTransform = false))} onClick={action(() => (this.openLinks = !this.openLinks))
+ //this.allClose == false ? (this.openContexts = false , this.allClose = true ): (this.openContexts = true, this.allClose = false)
return (
<div className="propertiesView-contexts">
- <div className="propertiesView-contexts-title" onDoubleClick={action(() => ( this.doubleClickClose, this.openLinks = true))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}>
+ <div className="propertiesView-contexts-title" 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" />
@@ -1492,9 +1482,16 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
minWidth: this.props.width,
//overflowY: this.scrolling ? "scroll" : "visible"
}}>
- <div className="propertiesView-title" style={{ width: this.props.width }}>
- Properties
+ <div className = "propertiesView-propAndInfoGrouping">
+ <div className="propertiesView-title" style={{ width: this.props.width }}>
+ Properties
+ </div>
+ <div className = "propertiesView-info" onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/')}>
+ <GrCircleInformation/> </div>
+
</div>
+
+
<div className="propertiesView-name">{this.editableTitle}</div>
<div className = "propertiesView-type"> {this.currentType} </div>