style(web/topologies): align page header with shared style, center empty state

- TopologyList header now uses .page-header + .page-title-group +
  .page-sub like Dashboard/Attackers/DeckyFleet; title typography and
  separator match the rest of the app.
- Pluralisation fix: '0 topologyies' → '0 TOPOLOGIES', singular '1
  TOPOLOGY'.
- When the list is empty the EmptyState renders in its own flex
  container that fills the viewport so the card is centered both
  axes, with bumped icon/title/hint sizing for the hero treatment.
This commit is contained in:
2026-04-22 17:53:35 -04:00
parent 5704e8fcce
commit f94887393c
2 changed files with 46 additions and 25 deletions

View File

@@ -2,20 +2,38 @@
padding: 16px 20px;
color: var(--text-color);
font-family: var(--font-mono);
display: flex;
flex-direction: column;
gap: 24px;
min-height: calc(100vh - 80px);
}
.tlist-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 16px;
margin-bottom: 14px;
border-bottom: 1px solid var(--panel-border);
padding-bottom: 10px;
.tlist-root .page-header { gap: 24px; }
.tlist-root .page-title-group { display: flex; flex-direction: column; gap: 6px; }
.tlist-root .page-header h1 {
font-size: 1.3rem;
letter-spacing: 4px;
font-weight: 700;
margin: 0;
color: var(--matrix);
}
.tlist-header h1 { margin: 0; font-size: 18px; letter-spacing: 2px; }
.tlist-sub { font-size: 11px; color: var(--dim-color); margin-top: 3px; }
.tlist-actions { display: flex; gap: 8px; }
.tlist-root .page-sub { font-size: 0.7rem; opacity: 0.5; letter-spacing: 1px; }
.tlist-actions { display: flex; gap: 8px; align-items: center; }
.tlist-empty-wrap {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.tlist-empty-wrap .empty-state {
min-height: 0;
padding: 60px 24px;
gap: 14px;
}
.tlist-empty-wrap .empty-state-icon { width: 48px; height: 48px; }
.tlist-empty-wrap .empty-state-title { font-size: 1rem; letter-spacing: 3px; }
.tlist-empty-wrap .empty-state-hint { font-size: 0.75rem; letter-spacing: 1.5px; }
.tlist-btn {
display: inline-flex; align-items: center; gap: 6px;

View File

@@ -149,15 +149,15 @@ const TopologyList: React.FC = () => {
};
return (
<div className="tlist-page">
<div className="tlist-header">
<div>
<div className="tlist-root tlist-page">
<div className="page-header">
<div className="page-title-group">
<h1>TOPOLOGIES</h1>
<div className="tlist-sub">
{loading ? 'loading…' : `${rows.length} topology${rows.length === 1 ? '' : 'ies'}`}
<span className="page-sub">
{loading ? 'LOADING…' : `${rows.length} ${rows.length === 1 ? 'TOPOLOGY' : 'TOPOLOGIES'}`}
{err && <span className="alert-text"> · {err}</span>}
{reapMsg && <span className="alert-text"> · reap: {reapMsg}</span>}
</div>
</span>
</div>
<div className="tlist-actions">
<button type="button" className="tlist-btn ghost" onClick={fetchRows} title="Refresh">
@@ -186,6 +186,16 @@ const TopologyList: React.FC = () => {
onCreated={onCreated}
/>
{!loading && rows.length === 0 ? (
<div className="tlist-empty-wrap">
<EmptyState
icon={Network}
title="NO TOPOLOGIES YET"
hint="spin one up to deploy a honeynet"
cta={{ label: 'NEW TOPOLOGY', icon: Plus, onClick: () => setCreating(true) }}
/>
</div>
) : (
<div className="tlist-grid">
{rows.map((r) => (
<div key={r.id} className="tlist-card" onClick={() => navigate(`/mazenet?topology=${r.id}`)}>
@@ -237,15 +247,8 @@ const TopologyList: React.FC = () => {
</div>
</div>
))}
{!loading && rows.length === 0 && (
<EmptyState
icon={Network}
title="NO TOPOLOGIES YET"
hint="spin one up to deploy a honeynet"
cta={{ label: 'NEW TOPOLOGY', icon: Plus, onClick: () => setCreating(true) }}
/>
)}
</div>
)}
</div>
);
};