aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-09-11 22:58:56 -0400
committerbobzel <zzzman@gmail.com>2023-09-11 22:58:56 -0400
commit3a048ae3acbbf63611bfbb7cded772fc3decd526 (patch)
tree810e69e2c1e96a4fa38d638194f4e9f5f30a80df /src/client/views/PropertiesView.tsx
parent507cdb40d5553c8a325ddb158b9a1f4e5672ac15 (diff)
usercolor cleanup
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index b25ac7903..699aafe80 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -368,7 +368,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<IconButton
icon={<FontAwesomeIcon icon={'ellipsis-h'} />}
size={Size.XSMALL}
- color={StrCast(Doc.UserDoc().userColor)}
+ color={SettingsManager.userColor}
onClick={action(() => {
if (this.selectedDocumentView || this.selectedDoc) {
SharingManager.Instance.open(this.selectedDocumentView?.props.Document === this.selectedDoc ? this.selectedDocumentView : undefined, this.selectedDoc);
@@ -518,7 +518,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div>
<br></br> Individuals with Access to this Document
</div>
- <div className="propertiesView-sharingTable" style={{ background: StrCast(Doc.UserDoc().userBackgroundColor), color: StrCast(Doc.UserDoc().userColor) }}>
+ <div className="propertiesView-sharingTable" style={{ background: SettingsManager.userBackgroundColor, color: SettingsManager.userColor }}>
{<div> {individualTableEntries}</div>}
</div>
{groupTableEntries.length > 0 ? (
@@ -526,7 +526,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div>
<br></br> Groups with Access to this Document
</div>
- <div className="propertiesView-sharingTable" style={{ background: StrCast(Doc.UserDoc().userBackgroundColor), color: StrCast(Doc.UserDoc().userColor) }}>
+ <div className="propertiesView-sharingTable" style={{ background: SettingsManager.userBackgroundColor, color: SettingsManager.userColor }}>
{<div> {groupTableEntries}</div>}
</div>
</div>
@@ -546,15 +546,15 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
toggleCheckbox = () => (this.layoutFields = !this.layoutFields);
@computed get color() {
- return StrCast(Doc.UserDoc().userColor);
+ return SettingsManager.userColor;
}
@computed get backgroundColor() {
- return StrCast(Doc.UserDoc().userBackgroundColor);
+ return SettingsManager.userBackgroundColor;
}
@computed get variantColor() {
- return StrCast(Doc.UserDoc().userVariantColor);
+ return SettingsManager.userVariantColor;
}
@computed get editableTitle() {
@@ -585,8 +585,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 = Utils.cleanDocumentType(currentType as DocumentType);
@@ -610,9 +608,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
if (iconName) {
const Icon = Icons[iconName as keyof typeof Icons];
return <Icon />;
- } else {
- return <Icons.BsFillCollectionFill />;
}
+ return <Icons.BsFillCollectionFill />;
}
@undoBatch
@@ -1683,8 +1680,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div
className="propertiesView"
style={{
- background: StrCast(Doc.UserDoc().userBackgroundColor),
- color: StrCast(Doc.UserDoc().userColor),
+ background: SettingsManager.userBackgroundColor,
+ color: SettingsManager.userColor,
width: this.props.width,
minWidth: this.props.width,
}}>