fix: hide circle button on locked portals

This commit is contained in:
Konstantinos Kaloutas
2023-04-18 13:31:34 +03:00
committed by Tienson Qin
parent 865f0ac4e5
commit 64f5c59c9f

View File

@@ -347,7 +347,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
})
ReactComponent = observer((componentProps: TLComponentProps) => {
const { events, isErasing, isEditing, isBinding } = componentProps
const { events, isErasing, isEditing, isBinding, isLocked } = componentProps
const {
props: { opacity, pageId, fill, scaleLevel, strokeWidth, size },
} = this
@@ -518,7 +518,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
{targetNotFound && <div className="tl-target-not-found">Target not found</div>}
{showingPortal && <PortalComponent {...componentProps} />}
</div>
{!app.readOnly && (
{!app.readOnly && isLocked && (
<CircleButton
active={!!this.collapsed}
style={{ opacity: isSelected ? 1 : 0 }}