aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-06-16 21:53:34 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-06-16 21:53:34 -0400
commit116961977c69b77d7437a1c1b9719fc977060caf (patch)
treea7c200c3948858df59d2d8c39fd650427691b679 /src/client/views/DocumentDecorations.tsx
parent3be20e0d7555e68662b7b63359082c9f1c3421da (diff)
PropertiesView UI updates and sharing symbol icon in heirarchy mapping
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index c82257d1f..fdbe2f866 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -7,7 +7,7 @@ import { observer } from 'mobx-react';
import { FaUndo } from 'react-icons/fa';
import { Utils, aggregateBounds, emptyFunction, numberValue, returnFalse, setupMoveUpEvents } from '../../Utils';
import { DateField } from '../../fields/DateField';
-import { Doc, DocListCast, Field, HierarchyMapping } from '../../fields/Doc';
+import { Doc, DocListCast, Field, HierarchyMapping, ReverseHierarchyMap } from '../../fields/Doc';
import { AclAdmin, AclAugment, AclEdit, DocData, Height, Width } from '../../fields/DocSymbols';
import { InkField } from '../../fields/InkField';
import { RichTextField } from '../../fields/RichTextField';
@@ -767,27 +767,7 @@ const dragDocView = SelectionManager.Views()[0];
// sharing
const docShareMode = HierarchyMapping.get(GetEffectiveAcl(seldocview.rootDoc))!.name
const shareMode = StrCast(docShareMode);
- var shareSymbolIcon = null;
- switch (shareMode) {
- case SharingPermissions.Admin:
- shareSymbolIcon = '⬢ ';
- break;
- case SharingPermissions.Edit:
- shareSymbolIcon = '⬢ ';
- break;
- case SharingPermissions.Augment:
- shareSymbolIcon = '⬟ ';
- break;
- case SharingPermissions.View:
- shareSymbolIcon = '♦ ';
- break;
- case SharingPermissions.None:
- shareSymbolIcon = '▲ ';
- break;
- default:
- shareSymbolIcon = '';
- break;
- }
+ var shareSymbolIcon = ReverseHierarchyMap.get(shareMode)?.image;
// hide the decorations if the parent chooses to hide it or if the document itself hides it
const hideDecorations = seldocview.props.hideDecorations || seldocview.rootDoc.hideDecorations;