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.tsx72
1 files changed, 30 insertions, 42 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 31c03de4c..cb0663554 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -575,19 +575,29 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
);
}
- @computed get type() {
- const type = Utils.cleanDocumentType(StrCast(this.selectedDoc?.type) as DocumentType);
- return (
- <Button
- formLabel={"Type"}
- text={type}
- type={Type.SEC}
- color={this.color}
- align='flex-start'
- fillWidth
- />
- );
- }
+ @computed get currentType() {
+ // console.log("current type " + this.selectedDoc?.type)
+
+ const documentType = StrCast(this.selectedDoc?.type)
+ var currentType: string = documentType;
+ var capitalizedDocType = Utils.cleanDocumentType(currentType as DocumentType);
+
+ return (
+ <div>
+ <div className = "propertiesView-wordType">Type</div>
+ <div className= "currentType">
+ <div className='currentType-icon'>
+ {this.currentComponent}
+ </div>
+
+ {capitalizedDocType}
+
+ </div>
+
+ </div>
+
+ )
+ }
@computed get currentComponent() {
@@ -607,30 +617,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
}
}
- @computed get currentType() {
- // console.log("current type " + this.selectedDoc?.type)
-
- const documentType = StrCast(this.selectedDoc?.type)
- var currentType: string = documentType;
- var capitalizedDocType = currentType.charAt(0).toUpperCase() + currentType.slice(1)
-
- return (
- <div>
- <div className = "propertiesView-wordType">Type</div>
- <div className= "currentType">
- <div className='currentType-icon'>
- {this.currentComponent}
- </div>
-
- {capitalizedDocType}
-
- </div>
-
- </div>
-
- )
- }
-
@undoBatch
@action
setTitle = (value: string | number) => {
@@ -1183,6 +1169,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</>}
isOpen={this.openSharing}
setIsOpen={(bool) => this.openSharing = bool}
+ onDoubleClick={() => this.onDoubleClick()}
/>
}
@@ -1218,7 +1205,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>}
isOpen={this.openFilters}
setIsOpen={(bool) => this.openFilters = bool}
- onDoubleClick={() => this.onDoubleClick()}
+ onDoubleClick={() => this.onDoubleClick()}
/>
}
@@ -1232,7 +1219,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
content={this.isInk ? this.appearanceEditor : null}
isOpen={this.openAppearance}
setIsOpen={(bool) => this.openAppearance = bool}
- onDoubleClick={() => this.onDoubleClick()}
+ onDoubleClick={() => this.onDoubleClick()}
/>
<PropertiesSection
title="Transform"
@@ -1260,7 +1247,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get contextsSubMenu() {
return <PropertiesSection
title="Other Contexts"
- content={this.contexts}
+ content={this.contextCount > 0 ? this.contexts : "There are no other contexts."}
isOpen={this.openContexts}
setIsOpen={(bool) => this.openContexts = bool}
onDoubleClick={() => this.onDoubleClick()}
@@ -1269,10 +1256,12 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
+
+
@computed get linksSubMenu() {
return <PropertiesSection
title="Linked To"
- content={this.links}
+ content={this.linkCount > 0 ? this.links : "There are no current links." }
isOpen={this.openLinks}
setIsOpen={(bool) => this.openLinks = bool}
onDoubleClick={() => this.onDoubleClick()}
@@ -1753,7 +1742,6 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="propertiesView-name">{this.editableTitle}</div>
<div className = "propertiesView-type"> {this.currentType} </div>
- <div className="propertiesView-type">{this.type}</div>
{this.contextsSubMenu}
{this.linksSubMenu}
{!this.selectedDoc || !LinkManager.currentLink || (!hasSelectedAnchor && this.selectedDoc !== LinkManager.currentLink) ? null : (