From 06c8f315ff25c1298ce6a6e712027cd57a73e1e3 Mon Sep 17 00:00:00 2001 From: srichman333 Date: Mon, 26 Jun 2023 18:52:47 -0400 Subject: DocumentDecorations layout acl checkbox --- src/client/views/DocumentDecorations.scss | 19 +++++++++++++++++++ src/client/views/DocumentDecorations.tsx | 26 +++++++++++++------------- 2 files changed, 32 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index 0a690f751..d1b6c5772 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -228,6 +228,25 @@ $resizeHandler: 8px; &:hover { opacity: 1; } + + .checkbox{ + position: fixed; + display: inline; + margin-top: -2px; + margin-left: -5px; + font-size: 7px; + + .checkbox-box{ + transform: scale(.7); + } + + .checkbox-text{ + font-size: 7px; + margin-top: 10px; + margin-left: -20px; + } + } + .documentDecorations-shareNone{ width: calc(100% + 10px); background: grey; diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index b9fef5cf8..3b51f8c61 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -65,6 +65,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P @observable private _isRotating: boolean = false; @observable private _isRounding: boolean = false; @observable private _isResizing: boolean = false; + @observable private showLayoutAcl: boolean = false; constructor(props: any) { super(props); @@ -764,7 +765,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P } // sharing - const docShareMode = HierarchyMapping.get(GetEffectiveAcl(seldocview.rootDoc))!.name + const acl = this.showLayoutAcl ? GetEffectiveLayoutAcl(seldocview.rootDoc) : GetEffectiveAcl(seldocview.rootDoc); + const docShareMode = HierarchyMapping.get(acl)!.name const shareMode = StrCast(docShareMode); var shareSymbolIcon = ReverseHierarchyMap.get(shareMode)?.image; @@ -824,19 +826,17 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P const radiusHandleLocation = Math.min(radiusHandle, maxDist); const sharingMenu = docShareMode ? ( -
- setupMoveUpEvents( - this, - e, - e => this.onBackgroundMove(true, e), - returnFalse, - action(() => SettingsManager.propertiesWidth =250) - ) - }> +
  {shareSymbolIcon + ' ' + shareMode} +           +
+
+ (this.showLayoutAcl = !this.showLayoutAcl))} /> +
+
Layout
+
 
@@ -858,8 +858,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P onPointerDown={e => e.stopPropagation()} /> ) : ( -
- {`${hideTitle ? '' : this.selectionTitle}`} +
{e.stopPropagation}}> + {`${hideTitle ? '' : this.selectionTitle}`} {sharingMenu} {!useLock ? null : ( toggle ability to interact with document
} placement="top"> -- cgit v1.2.3-70-g09d2