aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
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;