// drover-brutalist.jsx — Variant 4: Brutalist.
// Hard borders, no rounding. Heavy mono. Monochrome + one acid lime accent.
// Block-style "DOS-meets-zine" feeling. All-caps labels.
const BrutTheme = {
d: {
bg: '#0c0c0c', panel: '#0c0c0c', alt: '#161616',
border: '#f4f4f4', borderDim: '#3a3a3a',
text: '#f4f4f4', dim: '#a8a8a8', dimmer: '#6a6a6a',
accent: '#c6ff00', danger: '#ff3a52', warn: '#ffaa00', pass: '#7eff84', skip: '#888',
inputBg: '#0c0c0c', primaryFg: '#0c0c0c',
},
l: {
bg: '#f4f1ea', panel: '#f4f1ea', alt: '#e9e5d8',
border: '#0c0c0c', borderDim: '#bfb9a8',
text: '#0c0c0c', dim: '#3a3a3a', dimmer: '#7a7568',
accent: '#7d8f00', danger: '#b81e34', warn: '#a86c00', pass: '#1a7e2c', skip: '#7a7568',
inputBg: '#f4f1ea', primaryFg: '#f4f1ea',
},
};
function BrutWindow({ mode = 'dark', initial }) {
const t = BrutTheme[mode === 'dark' ? 'd' : 'l'];
const D = window.useDrover(initial);
const palette = { pending: t.dimmer, running: t.accent, passed: t.pass, failed: t.danger, skipped: t.skip };
const isActive = D.phase === 'active';
const fontMono = '"JetBrains Mono","IBM Plex Mono","Space Mono",ui-monospace,monospace';
return (
{/* form */}
{/* status */}
// STATUS
{/* actions */}
);
}
function BrutTitle({ t }) {
const cell = { width: 36, height: 28, display:'flex', alignItems:'center', justifyContent:'center', cursor:'pointer',
borderLeft: `2px solid ${t.border}`, color: t.text };
return (
);
}
function BrutLabel({ t, children }) {
return {children}
;
}
function BField({ t, label, children, style }) {
return ;
}
function brutInput(t, fontMono, disabled) {
return {
background: t.inputBg, color: disabled ? t.dimmer : t.text,
border: `2px solid ${disabled ? t.borderDim : t.border}`, borderRadius: 0,
padding: '7px 9px', fontSize: 12, fontFamily: fontMono, outline:'none',
width:'100%', boxSizing:'border-box',
};
}
function BrutCheckbox({ t, checked, onChange, children }) {
return (
);
}
function BrutPrimary({ t, onClick, disabled, children, style }) {
return (
);
}
function BrutStatus({ t, D, palette }) {
if (D.phase === 'idle') {
return (
READY TO CHECK_
);
}
return (
{D.phase === 'checking'
?
RUNNING DIAGNOSTICS…
:
{D.lastSummary?.failed === 0
? '▮ ALL CHECKS PASSED. READY TO START.'
: `▮ ${D.lastSummary?.failed}/${D.tests.length} FAILED · SOME FEATURES BROKEN`}
}
{D.tests.map((test, i) => {
const r = D.results[test.id];
const state = r?.result || (D.running === test.id ? 'running' : 'pending');
const last = i === D.tests.length - 1;
return (
{test.label}
{r?.metric || (state==='running'?'…':'')}
{r?.result === 'failed' && (
)}
{r?.result === 'failed' && r.expanded && (
! {r.error}
{r.hint}
)}
);
})}
);
}
function BrutStartBtn({ t, D }) {
const allFailed = D.lastSummary && D.lastSummary.failed === D.tests.length;
const ok = D.phase === 'checked' && !allFailed;
const active = D.phase === 'active';
const warning = active && (D.lastSummary?.failed || 0) > 0;
if (active) {
return (
●{warning ? ' ACTIVE / UDP-WARN' : ' ACTIVE'}
);
}
return {'>> START PROXYING'};
}
function BrutStopBtn({ t, D }) {
const enabled = D.phase === 'active';
return (
);
}
function BrutLiveStats({ t, stats }) {
const C = ({ icon, val, lbl }) => (
{icon}{val}
{lbl && {lbl}}
);
return (
} val={window.fmtBytes(stats.up)}/>
} val={window.fmtBytes(stats.down)}/>
);
}
function BrutLogs({ t, D }) {
return (
{D.logsOpen && (
<>
{[['COPY ALL', () => navigator.clipboard?.writeText(D.logs.map(x=>`[${x.level}] ${x.msg}`).join('\n'))],
['CLEAR', D.clearLogs], ['OPEN FILE', null]].map(([l, fn]) => (
))}
el && (el.scrollTop = el.scrollHeight)}
style={{ maxHeight: 130, overflowY: 'auto', padding: '7px 14px', fontSize: 10.5, lineHeight: 1.6, color: t.text }}>
{D.logs.map((l,i) => (
{window.fmtTime(l.t)}{' '}
[{l.level}]{' '}
{l.msg}
))}
>
)}
);
}
window.BrutWindow = BrutWindow;