feat(web): retrofit empty states to shared EmptyState primitive

Replace ad-hoc empty-state markup across Dashboard, TopologyList,
LiveLogs, Attackers, Bounty, AttackerDetail, SwarmHosts, RemoteUpdates
and CommandPalette with the new <EmptyState> component. Themed icons
+ hints improve discoverability; TopologyList and SwarmHosts gain
CTAs to their respective creation flows.
This commit is contained in:
2026-04-22 17:22:07 -04:00
parent de63a0ab5c
commit ecb813ad38
9 changed files with 82 additions and 50 deletions

View File

@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react';
import api from '../utils/api';
import EmptyState from './EmptyState/EmptyState';
import './Dashboard.css';
import {
Upload, RefreshCw, RotateCcw, Package, AlertTriangle, CheckCircle,
@@ -222,11 +223,11 @@ const RemoteUpdates: React.FC = () => {
)}
{hosts.length === 0 ? (
<div style={{ padding: '24px', color: 'var(--dim-color)' }}>
<Server size={16} style={{ verticalAlign: 'middle', marginRight: '8px' }} />
No workers with an updater bundle are enrolled. Run{' '}
<code>decnet swarm enroll --host &lt;name&gt; --updater</code> to add one.
</div>
<EmptyState
icon={Server}
title="NO UPDATER-ENABLED WORKERS"
hint="run `decnet swarm enroll --host <name> --updater` to add one"
/>
) : (
<div style={{ display: 'grid', gap: '16px' }}>
{hosts.map((h) => {