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:
@@ -2,20 +2,38 @@
|
|||||||
padding: 16px 20px;
|
padding: 16px 20px;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 24px;
|
||||||
|
min-height: calc(100vh - 80px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tlist-header {
|
.tlist-root .page-header { gap: 24px; }
|
||||||
display: flex;
|
.tlist-root .page-title-group { display: flex; flex-direction: column; gap: 6px; }
|
||||||
justify-content: space-between;
|
.tlist-root .page-header h1 {
|
||||||
align-items: flex-end;
|
font-size: 1.3rem;
|
||||||
gap: 16px;
|
letter-spacing: 4px;
|
||||||
margin-bottom: 14px;
|
font-weight: 700;
|
||||||
border-bottom: 1px solid var(--panel-border);
|
margin: 0;
|
||||||
padding-bottom: 10px;
|
color: var(--matrix);
|
||||||
}
|
}
|
||||||
.tlist-header h1 { margin: 0; font-size: 18px; letter-spacing: 2px; }
|
.tlist-root .page-sub { font-size: 0.7rem; opacity: 0.5; letter-spacing: 1px; }
|
||||||
.tlist-sub { font-size: 11px; color: var(--dim-color); margin-top: 3px; }
|
.tlist-actions { display: flex; gap: 8px; align-items: center; }
|
||||||
.tlist-actions { display: flex; gap: 8px; }
|
|
||||||
|
.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 {
|
.tlist-btn {
|
||||||
display: inline-flex; align-items: center; gap: 6px;
|
display: inline-flex; align-items: center; gap: 6px;
|
||||||
|
|||||||
@@ -149,15 +149,15 @@ const TopologyList: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="tlist-page">
|
<div className="tlist-root tlist-page">
|
||||||
<div className="tlist-header">
|
<div className="page-header">
|
||||||
<div>
|
<div className="page-title-group">
|
||||||
<h1>TOPOLOGIES</h1>
|
<h1>TOPOLOGIES</h1>
|
||||||
<div className="tlist-sub">
|
<span className="page-sub">
|
||||||
{loading ? 'loading…' : `${rows.length} topology${rows.length === 1 ? '' : 'ies'}`}
|
{loading ? 'LOADING…' : `${rows.length} ${rows.length === 1 ? 'TOPOLOGY' : 'TOPOLOGIES'}`}
|
||||||
{err && <span className="alert-text"> · {err}</span>}
|
{err && <span className="alert-text"> · {err}</span>}
|
||||||
{reapMsg && <span className="alert-text"> · reap: {reapMsg}</span>}
|
{reapMsg && <span className="alert-text"> · reap: {reapMsg}</span>}
|
||||||
</div>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="tlist-actions">
|
<div className="tlist-actions">
|
||||||
<button type="button" className="tlist-btn ghost" onClick={fetchRows} title="Refresh">
|
<button type="button" className="tlist-btn ghost" onClick={fetchRows} title="Refresh">
|
||||||
@@ -186,6 +186,16 @@ const TopologyList: React.FC = () => {
|
|||||||
onCreated={onCreated}
|
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">
|
<div className="tlist-grid">
|
||||||
{rows.map((r) => (
|
{rows.map((r) => (
|
||||||
<div key={r.id} className="tlist-card" onClick={() => navigate(`/mazenet?topology=${r.id}`)}>
|
<div key={r.id} className="tlist-card" onClick={() => navigate(`/mazenet?topology=${r.id}`)}>
|
||||||
@@ -237,15 +247,8 @@ const TopologyList: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user