From e581928cd39e08b35eba6a2447e7a9ba75101b96 Mon Sep 17 00:00:00 2001 From: srichman333 Date: Fri, 16 Jun 2023 13:22:07 -0400 Subject: DocumentDecorations layout --- src/client/views/DocumentDecorations.scss | 1 + src/client/views/DocumentDecorations.tsx | 39 ++++++++++++++++--------------- src/fields/util.ts | 2 -- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src') 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 ? ( +
+ setupMoveUpEvents( + this, + e, + e => this.onBackgroundMove(true, e), + returnFalse, + action(() => SettingsManager.propertiesWidth =250) + ) + }> +
+ {shareSymbolIcon + ' ' + shareMode} +
+
+ ) : ( +
+ ); + const titleArea = this._editingTitle ? ( {`${hideTitle ? '' : this.selectionTitle}`} + {sharingMenu} {!useLock ? null : ( toggle ability to interact with document
} placement="top">
e.preventDefault()}> @@ -870,24 +890,6 @@ const dragDocView = SelectionManager.Views()[0];
); - const sharingMenu = docShareMode ? ( -
- setupMoveUpEvents( - this, - e, - e => this.onBackgroundMove(true, e), - returnFalse, - action(() => SettingsManager.propertiesWidth =250) - ) - }> -
- {shareSymbolIcon + ' ' + shareMode} -
-
- ) : ( -
- ); return (
this.onCloseClick(true), 'Close')} {hideResizers || hideDeleteButton ? null : topBtn('minimize', 'window-maximize', undefined, e => this.onCloseClick(undefined), 'Minimize')} {hideTitle ? null : titleArea} - {sharingMenu} {hideOpenButton ?
: topBtn('open', 'external-link-alt', this.onMaximizeDown, undefined, 'Open in Lightbox (ctrl: as alias, shift: in new collection)')}
{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)) { -- cgit v1.2.3-70-g09d2