style(web/swarm): align Swarm pages with shared page-header primitive
This commit is contained in:
@@ -91,9 +91,14 @@ const AgentEnrollment: React.FC = () => {
|
|||||||
const ss = (remainingSecs % 60).toString().padStart(2, '0');
|
const ss = (remainingSecs % 60).toString().padStart(2, '0');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashboard">
|
<div className="dashboard swarm-root">
|
||||||
<div className="dashboard-header">
|
<div className="page-header">
|
||||||
<h1><UserPlus size={28} /> Agent Enrollment</h1>
|
<div className="page-title-group">
|
||||||
|
<h1><UserPlus size={18} /> AGENT ENROLLMENT</h1>
|
||||||
|
<span className="page-sub">
|
||||||
|
issue a one-shot bootstrap URL for a new swarm worker
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!result ? (
|
{!result ? (
|
||||||
|
|||||||
@@ -166,29 +166,21 @@ const RemoteUpdates: React.FC = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashboard">
|
<div className="dashboard swarm-root">
|
||||||
<div
|
<div className="page-header">
|
||||||
className="section-header"
|
<div className="page-title-group">
|
||||||
style={{
|
<h1><Package size={18} /> REMOTE UPDATES</h1>
|
||||||
display: 'flex', justifyContent: 'space-between', alignItems: 'center',
|
<span className="page-sub">
|
||||||
border: '1px solid var(--border-color)', backgroundColor: 'var(--secondary-color)',
|
push updater bundles to enrolled workers · {hosts.length} WORKER{hosts.length === 1 ? '' : 'S'}
|
||||||
marginBottom: '24px',
|
</span>
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
||||||
<Package size={20} />
|
|
||||||
<h2 style={{ margin: 0 }}>REMOTE UPDATES — WORKER FLEET</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowFleetModal(true)}
|
onClick={() => setShowFleetModal(true)}
|
||||||
disabled={fleetBusy || hosts.length === 0}
|
disabled={fleetBusy || hosts.length === 0}
|
||||||
style={{
|
className="control-btn primary"
|
||||||
display: 'flex', alignItems: 'center', gap: '8px',
|
|
||||||
border: '1px solid var(--accent-color)', color: 'var(--accent-color)',
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{fleetBusy ? <RefreshCw size={14} className="spin" /> : <Upload size={14} />}
|
{fleetBusy ? <RefreshCw size={14} className="spin" /> : <Upload size={14} />}
|
||||||
{fleetBusy ? 'PUSHING...' : 'PUSH TO ALL'}
|
{fleetBusy ? 'PUSHING…' : 'PUSH TO ALL'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,34 @@
|
|||||||
.dashboard-header {
|
.swarm-root .page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-end;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
gap: 24px;
|
||||||
|
padding-bottom: 16px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
border-bottom: 1px solid var(--panel-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-header h1 {
|
.swarm-root .page-title-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swarm-root .page-header h1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 10px;
|
||||||
font-size: 1.4rem;
|
font-size: 1.3rem;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 4px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
|
color: var(--matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swarm-root .page-sub {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
opacity: 0.5;
|
||||||
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
|
|||||||
@@ -90,12 +90,19 @@ const SwarmHosts: React.FC = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const online = hosts.filter((h) => h.status === 'online').length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashboard">
|
<div className="dashboard swarm-root">
|
||||||
<div className="dashboard-header">
|
<div className="page-header">
|
||||||
<h1><HardDrive size={28} /> SWARM Hosts</h1>
|
<div className="page-title-group">
|
||||||
|
<h1><HardDrive size={18} /> SWARM HOSTS</h1>
|
||||||
|
<span className="page-sub">
|
||||||
|
{loading ? 'LOADING…' : `${hosts.length} ENROLLED · ${online} ONLINE`}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<button onClick={fetchHosts} className="control-btn" disabled={loading}>
|
<button onClick={fetchHosts} className="control-btn" disabled={loading}>
|
||||||
<RefreshCw size={16} /> Refresh
|
<RefreshCw size={14} /> REFRESH
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user