Dev #7
@@ -107,10 +107,10 @@ const FolderTreeItem: React.FC<FolderTreeItemProps> = ({
|
|||||||
}}
|
}}
|
||||||
onDrop={(e) => handleDropOnFolder(node.fullPath, e)}
|
onDrop={(e) => handleDropOnFolder(node.fullPath, e)}
|
||||||
style={{ paddingLeft: `${depth * 12 + 8}px` }}
|
style={{ paddingLeft: `${depth * 12 + 8}px` }}
|
||||||
className={`group flex items-center justify-between pr-2 py-1 rounded-btn text-xs cursor-pointer transition-colors ${
|
className={`group flex items-center justify-between pr-1.5 h-7 rounded-btn text-xs cursor-pointer border-l-2 transition-colors ${
|
||||||
isDragOver
|
isDragOver
|
||||||
? 'bg-accent/20 border-l-2 border-accent text-main font-semibold'
|
? 'bg-accent/20 border-accent text-main font-semibold'
|
||||||
: 'hover:bg-panel-elevated text-muted'
|
: 'border-transparent hover:bg-panel-elevated text-muted'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
@@ -121,7 +121,7 @@ const FolderTreeItem: React.FC<FolderTreeItemProps> = ({
|
|||||||
[node.fullPath]: !prev[node.fullPath],
|
[node.fullPath]: !prev[node.fullPath],
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
className="flex items-center gap-1.5 flex-1 min-w-0 text-left cursor-pointer"
|
className="flex items-center gap-1.5 flex-1 min-w-0 text-left h-full cursor-pointer"
|
||||||
>
|
>
|
||||||
{hasContent ? (
|
{hasContent ? (
|
||||||
isExpanded ? (
|
isExpanded ? (
|
||||||
@@ -146,19 +146,25 @@ const FolderTreeItem: React.FC<FolderTreeItemProps> = ({
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div className="hidden group-hover:flex items-center gap-0.5">
|
<div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 pointer-events-none group-hover:pointer-events-auto transition-opacity shrink-0">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleCreateDocument(node.fullPath)}
|
onClick={(e) => {
|
||||||
className="p-1 rounded-btn hover:bg-canvas text-muted hover:text-main cursor-pointer"
|
e.stopPropagation();
|
||||||
|
handleCreateDocument(node.fullPath);
|
||||||
|
}}
|
||||||
|
className="p-1 h-6 w-6 flex items-center justify-center rounded-btn hover:bg-canvas text-muted hover:text-main cursor-pointer"
|
||||||
title="Notiz in diesem Ordner erstellen"
|
title="Notiz in diesem Ordner erstellen"
|
||||||
>
|
>
|
||||||
<Plus className="w-3 h-3" />
|
<Plus className="w-3 h-3" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleShareFolderClick(node.fullPath, node.sharedFolderObj)}
|
onClick={(e) => {
|
||||||
className={`p-1 rounded-btn hover:bg-canvas cursor-pointer ${
|
e.stopPropagation();
|
||||||
|
handleShareFolderClick(node.fullPath, node.sharedFolderObj);
|
||||||
|
}}
|
||||||
|
className={`p-1 h-6 w-6 flex items-center justify-center rounded-btn hover:bg-canvas cursor-pointer ${
|
||||||
node.sharedFolderObj ? 'text-accent' : 'text-faint hover:text-accent'
|
node.sharedFolderObj ? 'text-accent' : 'text-faint hover:text-accent'
|
||||||
}`}
|
}`}
|
||||||
title="Ordner teilen und Berechtigungen"
|
title="Ordner teilen und Berechtigungen"
|
||||||
@@ -167,8 +173,11 @@ const FolderTreeItem: React.FC<FolderTreeItemProps> = ({
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleDeleteFolder(node.fullPath)}
|
onClick={(e) => {
|
||||||
className="p-1 rounded-btn hover:bg-status-err/20 text-faint hover:text-status-err cursor-pointer"
|
e.stopPropagation();
|
||||||
|
handleDeleteFolder(node.fullPath);
|
||||||
|
}}
|
||||||
|
className="p-1 h-6 w-6 flex items-center justify-center rounded-btn hover:bg-status-err/20 text-faint hover:text-status-err cursor-pointer"
|
||||||
title="Ordner löschen"
|
title="Ordner löschen"
|
||||||
>
|
>
|
||||||
<Trash2 className="w-3 h-3" />
|
<Trash2 className="w-3 h-3" />
|
||||||
|
|||||||
Reference in new issue
Block a user