aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/MainView.tsx2
-rw-r--r--src/client/views/PropertiesButtons.tsx20
-rw-r--r--src/client/views/collections/ParentDocumentSelector.scss15
-rw-r--r--src/client/views/nodes/FontIconBox.tsx13
4 files changed, 40 insertions, 10 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 0bfbc41ca..09980ce97 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -480,6 +480,8 @@ export class MainView extends React.Component {
@action @undoBatch
closeFlyout = () => {
+ // this._lastButton && (this._lastButton.color = "white");
+ // this._lastButton && (this._lastButton._backgroundColor = "");
this.panelContent = "none";
this.flyoutWidth = 0;
}
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 68969b413..d46c03470 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -550,6 +550,23 @@ export class PropertiesButtons extends React.Component<{}, {}> {
</Tooltip>;
}
+ @computed
+ get contextButton() {
+ if (this.selectedDoc) {
+ return <Tooltip title={<><div className="dash-tooltip">Show Context</div></>}>
+ <div className={"propertiesButtons-linkButton-empty"}>
+ <ParentDocSelector Document={this.selectedDoc} addDocTab={(doc, where) => {
+ where === "onRight" ? CollectionDockingView.AddRightSplit(doc) :
+ this.selectedDocumentView?.props.addDocTab(doc, "onRight");
+ return true;
+ }} />
+ </div>
+ </Tooltip>;
+ } else {
+ return false;
+ }
+
+ }
// @computed
// get importButton() {
@@ -605,6 +622,9 @@ export class PropertiesButtons extends React.Component<{}, {}> {
<div className="propertiesButtons-button">
{this.onClickButton}
</div>
+ {/* <div className="propertiesButtons-button">
+ {this.contextButton}
+ </div> */}
<div className="propertiesButtons-button">
{this.sharingButton}
</div>
diff --git a/src/client/views/collections/ParentDocumentSelector.scss b/src/client/views/collections/ParentDocumentSelector.scss
index 4e704b58f..bc9cf4848 100644
--- a/src/client/views/collections/ParentDocumentSelector.scss
+++ b/src/client/views/collections/ParentDocumentSelector.scss
@@ -2,11 +2,13 @@
div {
overflow: visible !important;
}
+
.metadataEntry-outerDiv {
overflow: hidden !important;
pointer-events: all;
}
}
+
.parentDocumentSelector-flyout {
position: relative;
z-index: 9999;
@@ -31,26 +33,31 @@
border-left: 0px;
}
}
+
.parentDocumentSelector-button {
- pointer-events: all;
+ pointer-events: all;
position: relative;
display: inline-block;
+
svg {
- width:20px !important;
- height:20px;
+ // width:20px !important;
+ //height:20px;
}
}
+
.parentDocumentSelector-metadata {
pointer-events: auto;
padding-right: 5px;
width: 25px;
display: inline-block;
}
+
.buttonSelector {
div {
overflow: visible !important;
}
- display: inline-block;
+
+ display: inline-block;
width:100%;
height:100%;
} \ No newline at end of file
diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx
index 98522b2dd..3561d22b6 100644
--- a/src/client/views/nodes/FontIconBox.tsx
+++ b/src/client/views/nodes/FontIconBox.tsx
@@ -6,12 +6,13 @@ import { DocComponent } from '../DocComponent';
import './FontIconBox.scss';
import { FieldView, FieldViewProps } from './FieldView';
import { StrCast, Cast, NumCast } from '../../../fields/Types';
-import { Utils } from "../../../Utils";
+import { Utils, emptyFunction } from "../../../Utils";
import { runInAction, observable, reaction, IReactionDisposer } from 'mobx';
import { Doc } from '../../../fields/Doc';
import { ContextMenu } from '../ContextMenu';
import { ScriptField } from '../../../fields/ScriptField';
import { Tooltip } from '@material-ui/core';
+import { CurrentUserUtils } from '../../util/CurrentUserUtils';
const FontIconSchema = createSchema({
icon: "string",
});
@@ -65,11 +66,11 @@ export class FontIconBox extends DocComponent<FieldViewProps, FontIconDocument>(
const shape = StrCast(this.layoutDoc.iconShape, "round");
const button = <>
<button className={`menuButton-${shape}`} ref={this._ref} onContextMenu={this.specificContextMenu}
- style={{ boxShadow: this.layoutDoc.ischecked ? `4px 4px 12px black` : undefined, backgroundColor }}>
- <div className="menuButton-wrap">
- {<FontAwesomeIcon className={`menuButton-icon-${shape}`} icon={StrCast(this.dataDoc.icon, "user") as any} color={color} size="lg" />}
- {!label ? (null) : <div className="fontIconBox-label" style={{ color, backgroundColor }}> {label} </div>}
- </div>
+ style={{ boxShadow: this.layoutDoc.ischecked ? `4px 4px 12px black` : undefined, }}>
+ {<FontAwesomeIcon className={`menuButton-icon-${shape}`}
+ icon={StrCast(this.dataDoc.icon, "user") as any} color={color}
+ size={this.layoutDoc.iconShape === "square" ? "sm" : "lg"} />}
+ {!label ? (null) : <div className="fontIconBox-label" style={{ color, backgroundColor }}> {label} </div>}
</button>
</>;
return !this.layoutDoc.toolTip ? button :