agent-ecosystem/src/renderer/components/team/editor/EditorErrorState.tsx
iliya f4f02d5536 feat: enhance task management with new file renaming feature and notification settings
- Added a new file renaming functionality in the editor, allowing users to rename files and directories in place.
- Introduced notification settings for team inbox messages and task clarifications, enabling users to receive native OS notifications for important updates.
- Updated the README to reflect the new features and provide a clearer overview of the task management capabilities.
- Improved the application icon handling for notifications across different platforms.
2026-03-01 17:52:54 +02:00

41 lines
1 KiB
TypeScript

/**
* Error state for file read failures (EACCES, ENOENT, etc.).
*/
import { Button } from '@renderer/components/ui/button';
import { AlertTriangle } from 'lucide-react';
interface EditorErrorStateProps {
error: string;
onRetry?: () => void;
onClose?: () => void;
}
export const EditorErrorState = ({
error,
onRetry,
onClose,
}: EditorErrorStateProps): React.ReactElement => {
return (
<div
role="alert"
aria-live="polite"
className="flex h-full flex-col items-center justify-center gap-3 text-text-muted"
>
<AlertTriangle aria-hidden="true" className="size-12 text-yellow-500 opacity-50" />
<p className="max-w-md text-center text-sm text-text-secondary">{error}</p>
<div className="flex gap-2">
{onRetry && (
<Button variant="outline" size="sm" onClick={onRetry}>
Retry
</Button>
)}
{onClose && (
<Button variant="outline" size="sm" onClick={onClose}>
Close Tab
</Button>
)}
</div>
</div>
);
};