From ee8d586e2f2d0bc4e189ed833521bdb644afe02e Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 27 Oct 2026 15:33:38 +0100 Subject: [PATCH] style(collab): right-align lock badge without shifting lines and highlight locked block with grey background --- .../src/features/workspace/OutlinerBlock.tsx | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/frontend/src/features/workspace/OutlinerBlock.tsx b/frontend/src/features/workspace/OutlinerBlock.tsx index dd0307f..2ef876e 100644 --- a/frontend/src/features/workspace/OutlinerBlock.tsx +++ b/frontend/src/features/workspace/OutlinerBlock.tsx @@ -455,24 +455,40 @@ export const OutlinerBlock: React.FC = ({ return (
onDragOverBlock?.(e, index)} onDrop={() => onDropBlock?.(index)} > + {/* Right-aligned Lock Indicator (Zero vertical height impact, keeps bullet & line aligned) */} + {isLockedByOther && ( +
+ + {lockedByName || 'Gesperrt'} +
+ )} + {/* Remote Cursors Floating Name Badges on Block */} {activeRemoteCursors.length > 0 && (
@@ -569,16 +585,6 @@ export const OutlinerBlock: React.FC = ({ {/* Main Block Content */}
- {isLockedByOther && ( -
- - {lockedByName || 'Gesperrt'} -
- )} {block.type === 'divider' ? (

@@ -610,7 +616,9 @@ export const OutlinerBlock: React.FC = ({ onSelect={handleSelect} onChange={handleContentChange} onKeyDown={handleKeyDown} - className="w-full resize-none font-mono text-xs bg-transparent text-status-ok border-0 focus:outline-none focus:ring-0 leading-relaxed" + className={`w-full resize-none font-mono text-xs bg-transparent text-status-ok border-0 focus:outline-none focus:ring-0 leading-relaxed ${ + isLockedByOther ? 'pr-28 cursor-not-allowed opacity-90' : '' + }`} />
) : block.type === 'callout' ? ( @@ -630,7 +638,9 @@ export const OutlinerBlock: React.FC = ({ onSelect={handleSelect} onChange={handleContentChange} onKeyDown={handleKeyDown} - className="w-full resize-none bg-transparent text-sm text-main border-0 focus:outline-none focus:ring-0 leading-relaxed italic" + className={`w-full resize-none bg-transparent text-sm text-main border-0 focus:outline-none focus:ring-0 leading-relaxed italic ${ + isLockedByOther ? 'pr-28 cursor-not-allowed opacity-90' : '' + }`} />
) : ( @@ -656,6 +666,8 @@ export const OutlinerBlock: React.FC = ({ : '' } className={`w-full resize-none overflow-hidden bg-transparent border-0 focus:outline-none focus:ring-0 leading-relaxed whitespace-pre-wrap break-words ${ + isLockedByOther ? 'pr-28 cursor-not-allowed opacity-90' : '' + } ${ block.type === 'h1' ? 'text-lg font-bold text-main tracking-tight' : block.type === 'h2'