refactor(outliner): make bullet point the drag handle and remove separate grip icon
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m2s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m2s
This commit is contained in:
1 parent
e7eb94be45
commit
122ebccf8d
1 file changed
+11
-16
@@ -4,7 +4,6 @@ import {
|
|||||||
ChevronDown,
|
ChevronDown,
|
||||||
Check,
|
Check,
|
||||||
X,
|
X,
|
||||||
GripVertical,
|
|
||||||
Code,
|
Code,
|
||||||
Heading1,
|
Heading1,
|
||||||
Heading2,
|
Heading2,
|
||||||
@@ -444,20 +443,8 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{/* Bullet Controls: Drag Handle, Collapse Toggle, Bullet / Checkbox */}
|
{/* Bullet Controls: Collapse Toggle & Bullet (Drag-Handle & Zoom) / Checkbox */}
|
||||||
<div className="flex items-center gap-0.5 pt-1 select-none shrink-0">
|
<div className="flex items-center gap-0.5 pt-1 select-none shrink-0">
|
||||||
{canEdit && (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
draggable
|
|
||||||
onDragStart={() => onDragStartBlock?.(index)}
|
|
||||||
title="Block ziehen oder umwandeln"
|
|
||||||
className="opacity-0 group-hover:opacity-100 focus:opacity-100 p-0.5 text-faint hover:text-main cursor-grab active:cursor-grabbing transition-opacity"
|
|
||||||
>
|
|
||||||
<GripVertical className="w-3.5 h-3.5" />
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{hasChildren ? (
|
{hasChildren ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -496,9 +483,17 @@ export const OutlinerBlock: React.FC<OutlinerBlockProps> = ({
|
|||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
draggable={canEdit}
|
||||||
|
onDragStart={() => canEdit && onDragStartBlock?.(index)}
|
||||||
onClick={() => onZoomBlock?.(block.id)}
|
onClick={() => onZoomBlock?.(block.id)}
|
||||||
className="w-4 h-4 flex items-center justify-center rounded-btn hover:bg-panel-hover group/bullet transition-transform"
|
className={`w-4 h-4 flex items-center justify-center rounded-btn hover:bg-panel-hover group/bullet transition-transform ${
|
||||||
title="Klick: In diesen Ast hineinzoomen (Fokus-Modus)"
|
canEdit ? 'cursor-grab active:cursor-grabbing' : 'cursor-pointer'
|
||||||
|
}`}
|
||||||
|
title={
|
||||||
|
canEdit
|
||||||
|
? 'Ziehen zum Verschieben • Klick: Ast hineinzoomen (Fokus-Modus)'
|
||||||
|
: 'Klick: In diesen Ast hineinzoomen (Fokus-Modus)'
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className={`w-1.5 h-1.5 rounded-full transition-all ${
|
className={`w-1.5 h-1.5 rounded-full transition-all ${
|
||||||
|
|||||||
Reference in new issue
Block a user