diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentDecorations.scss | 1 | ||||
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 39 | ||||
-rw-r--r-- | src/fields/util.ts | 2 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/client/views/DocumentDecorations.scss b/src/client/views/DocumentDecorations.scss index a5ebe9d58..4d29427a6 100644 --- a/src/client/views/DocumentDecorations.scss +++ b/src/client/views/DocumentDecorations.scss @@ -179,6 +179,7 @@ $resizeHandler: 8px; display: flex; height: 20px; border-radius: 8px; + gap: 2px; outline: none; border: none; opacity: 0.3; diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 8e224a4b6..c82257d1f 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -844,6 +844,25 @@ const dragDocView = SelectionManager.Views()[0]; const radiusHandle = (borderRadius / docMax) * maxDist; 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${shareMode}`}> + <span>{shareSymbolIcon + ' ' + shareMode}</span> + </div> + </div> + ) : ( + <div /> + ); + const titleArea = this._editingTitle ? ( <input ref={this._keyinput} @@ -860,6 +879,7 @@ const dragDocView = SelectionManager.Views()[0]; ) : ( <div className="documentDecorations-title" key="title" onPointerDown={this.onTitleDown}> <span className={`documentDecorations-titleSpan${colorScheme}`}>{`${hideTitle ? '' : this.selectionTitle}`}</span> + {sharingMenu} {!useLock ? null : ( <Tooltip key="lock" title={<div className="dash-tooltip">toggle ability to interact with document</div>} placement="top"> <div className="documentDecorations-lock" style={{ color: seldocview.rootDoc._lockedPosition ? 'red' : undefined }} onPointerDown={this.onLockDown} onContextMenu={e => e.preventDefault()}> @@ -870,24 +890,6 @@ const dragDocView = SelectionManager.Views()[0]; </div> ); - 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${shareMode}`}> - <span>{shareSymbolIcon + ' ' + shareMode}</span> - </div> - </div> - ) : ( - <div /> - ); return ( <div className={`documentDecorations${colorScheme}`} style={{ opacity: this._showNothing ? 0.1 : undefined }}> <div @@ -921,7 +923,6 @@ const dragDocView = SelectionManager.Views()[0]; {hideDeleteButton ? null : topBtn('close', 'times', undefined, e => this.onCloseClick(true), 'Close')} {hideResizers || hideDeleteButton ? null : topBtn('minimize', 'window-maximize', undefined, e => this.onCloseClick(undefined), 'Minimize')} {hideTitle ? null : titleArea} - {sharingMenu} {hideOpenButton ? <div /> : topBtn('open', 'external-link-alt', this.onMaximizeDown, undefined, 'Open in Lightbox (ctrl: as alias, shift: in new collection)')} </div> {hideResizers ? null : ( diff --git a/src/fields/util.ts b/src/fields/util.ts index 6c8758875..5bab701ff 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -218,7 +218,6 @@ function getEffectiveAcl(target: any, user?: string): symbol { effectiveAcl = value as symbol; } } - console.log(targetAcls) } return DocServer?.Control?.isReadOnly?.() && HierarchyMapping.get(effectiveAcl)!.level < aclLevel.editable ? AclEdit : effectiveAcl; @@ -237,7 +236,6 @@ function getEffectiveAcl(target: any, user?: string): symbol { * inheritingFromCollection is not currently being used but could be used if acl assignment defaults change */ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc, inheritingFromCollection?: boolean, visited?: Doc[], isDashboard?: boolean) { - console.log(key,acl,target.title) if (!visited) visited = [] as Doc[]; if (!target || visited.includes(target)) return; if ((target._type_collection === CollectionViewType.Docking && visited.length > 1) || Doc.GetProto(visited[0]) !== Doc.GetProto(target)) { |