aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-06-26 18:52:47 -0400
committersrichman333 <sarah_n_richman@brown.edu>2023-06-26 18:52:47 -0400
commit06c8f315ff25c1298ce6a6e712027cd57a73e1e3 (patch)
tree45500ca84009690b8644cc0efa07f166d8b927df /src/client/views/DocumentDecorations.tsx
parent68e791512551261fd805f841fd88aba373df845a (diff)
DocumentDecorations layout acl checkbox
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx26
1 files changed, 13 insertions, 13 deletions
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 ? (
- <div className='documentDecorations-share'
- onPointerDown={e =>
- setupMoveUpEvents(
- this,
- e,
- e => this.onBackgroundMove(true, e),
- returnFalse,
- action(() => SettingsManager.propertiesWidth =250)
- )
- }>
+ <div className='documentDecorations-share' >
<div className={`documentDecorations-share${shareMode}`}>
&nbsp;
<span>{shareSymbolIcon + ' ' + shareMode}</span>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+ <div className='checkbox'>
+ <div className='checkbox-box'>
+ <input type="checkbox" checked={this.showLayoutAcl} onChange={action(() => (this.showLayoutAcl = !this.showLayoutAcl))} />
+ </div>
+ <div className='checkbox-text'> Layout </div>
+ </div>
&nbsp;
</div>
</div>
@@ -858,8 +858,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
onPointerDown={e => e.stopPropagation()}
/>
) : (
- <div className="documentDecorations-title" key="title" onPointerDown={this.onTitleDown}>
- <span className={`documentDecorations-titleSpan${colorScheme}`}>{`${hideTitle ? '' : this.selectionTitle}`}</span>
+ <div className="documentDecorations-title" key="title" onPointerDown={e => {e.stopPropagation}}>
+ <span className={`documentDecorations-titleSpan${colorScheme}`} onPointerDown={this.onTitleDown}>{`${hideTitle ? '' : this.selectionTitle}`}</span>
{sharingMenu}
{!useLock ? null : (
<Tooltip key="lock" title={<div className="dash-tooltip">toggle ability to interact with document</div>} placement="top">