diff --git a/frontend-modern/src/components/Backups/Backups.tsx b/frontend-modern/src/components/Backups/Backups.tsx index 86a606d..da0ea9a 100644 --- a/frontend-modern/src/components/Backups/Backups.tsx +++ b/frontend-modern/src/components/Backups/Backups.tsx @@ -6,7 +6,7 @@ import UnifiedBackups from './UnifiedBackups'; import { ProxmoxSectionNav } from '@/components/Proxmox/ProxmoxSectionNav'; const Backups: Component = () => { - const { state, connected, initialDataReceived } = useWebSocket(); + const { state, connected, initialDataReceived, reconnecting, reconnect } = useWebSocket(); const hasBackupData = () => Boolean( @@ -75,8 +75,22 @@ const Backups: Component = () => { } title="Connection lost" - description="Unable to connect to the backend server. Attempting to reconnect..." + description={ + reconnecting() + ? 'Attempting to reconnect…' + : 'Unable to connect to the backend server' + } tone="danger" + actions={ + !reconnecting() ? ( + + ) : undefined + } /> diff --git a/frontend-modern/src/components/Replication/Replication.tsx b/frontend-modern/src/components/Replication/Replication.tsx index 88eef06..f5b69ad 100644 --- a/frontend-modern/src/components/Replication/Replication.tsx +++ b/frontend-modern/src/components/Replication/Replication.tsx @@ -33,7 +33,7 @@ function formatRate(limit?: number): string { } const Replication: Component = () => { - const { state, connected } = useWebSocket(); + const { state, connected, reconnecting, reconnect } = useWebSocket(); const replicationJobs = createMemo(() => { const jobs = state.replicationJobs ?? []; @@ -59,8 +59,22 @@ const Replication: Component = () => { } title="Connection lost" - description="Unable to connect to the backend server. Attempting to reconnect..." + description={ + reconnecting() + ? 'Attempting to reconnect…' + : 'Unable to connect to the backend server' + } tone="danger" + actions={ + !reconnecting() ? ( + + ) : undefined + } /> }>