diff --git a/frontend/src/features/workspace/DocumentEditor.tsx b/frontend/src/features/workspace/DocumentEditor.tsx index 1830ab9..2429168 100644 --- a/frontend/src/features/workspace/DocumentEditor.tsx +++ b/frontend/src/features/workspace/DocumentEditor.tsx @@ -1,12 +1,11 @@ import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react'; import { Pin, - Share2, + Users, Trash2, Download, Folder as FolderIcon, - Wifi, - WifiOff, + Radio, Loader2, ArrowLeft, Hash, @@ -590,16 +589,16 @@ export const DocumentEditor: React.FC = ({ return (
{/* Top Document Action Bar */} -
+
{onBackMobile && ( )} @@ -618,7 +617,7 @@ export const DocumentEditor: React.FC = ({ {showFolderMenu && canEdit && ( -
+
{/* Right Status & Action Buttons */} -
- {/* Active Presence Avatars */} +
+ {/* Active Presence Avatars (Immer rund: rounded-full mit Überlappung) */} {activeUsers.length > 0 && (
{activeUsers.map((u) => { @@ -668,13 +667,13 @@ export const DocumentEditor: React.FC = ({ return (
{initials}
{/* Tooltip */} -
+
{u.userName}
@@ -683,80 +682,109 @@ export const DocumentEditor: React.FC = ({
)} - {/* Sync Status Badge */} - { + const isOwner = doc.isOwner !== false && (doc.userId === currentUser?.id || !doc.userId || currentUser?.role === 'admin'); + const sharesCount = doc.sharedWith?.length || 0; + const isShared = sharesCount > 0 || !isOwner || Boolean(doc.sharedFolderId); + const ownerDisplayName = doc.ownerName || 'Eigentümer'; + + return ( +
+ {isShared && ( + isOwner ? ( + + ) : ( + + ) + )} + + +
+ ); + })()} + + {/* Live Sync Status (1:1 styling from SharedListsView) */} +
- {syncStatus === 'connected' ? ( - <> - - LIVE - - ) : syncStatus === 'connecting' || syncStatus === 'reconnecting' ? ( - <> - - SYNC… - - ) : ( - <> - - OFFLINE - - )} - + +
- {doc && ( - - )} - {canEdit && (doc?.isOwner || doc?.permission === 'owner') && ( )}
@@ -773,7 +801,7 @@ export const DocumentEditor: React.FC = ({ {breadcrumbs.length > 0 && (