// drover-minimal.jsx — Variant 2: Minimal / Fluent-aligned.
// Windows 11 Mica feel. Generous spacing. Subtle accents. Segoe UI Variable.
// Soft cards on a tinted background, accent: a calm slate-blue.
const MinTheme = {
d: {
bg: '#1e1f23', mica: 'rgba(255,255,255,0.02)', chrome: 'rgba(255,255,255,0.03)',
panel: 'rgba(255,255,255,0.04)', panel2: 'rgba(255,255,255,0.06)',
border: 'rgba(255,255,255,0.08)', borderStrong: 'rgba(255,255,255,0.14)',
text: '#f3f3f3', dim: '#b0b3ba', dimmer: '#7a7d85',
accent: '#76b3ff', accentBg: 'rgba(118,179,255,0.16)',
danger: '#ff7a7a', warn: '#ffb86b', pass: '#7ad29c', skip: '#9aa0aa',
inputBg: 'rgba(255,255,255,0.04)', inputBorder: 'rgba(255,255,255,0.16)',
primaryBg: '#76b3ff', primaryFg: '#0d1722',
},
l: {
bg: '#f6f6f8', mica: 'rgba(255,255,255,0.5)', chrome: 'rgba(255,255,255,0.65)',
panel: '#ffffff', panel2: '#fafafc',
border: 'rgba(0,0,0,0.06)', borderStrong: 'rgba(0,0,0,0.14)',
text: '#1c1d20', dim: '#4f5460', dimmer: '#8a8f97',
accent: '#3a72c7', accentBg: 'rgba(58,114,199,0.10)',
danger: '#c0463f', warn: '#9c6a14', pass: '#2c8a5a', skip: '#7c8088',
inputBg: '#ffffff', inputBorder: 'rgba(0,0,0,0.18)',
primaryBg: '#3a72c7', primaryFg: '#ffffff',
},
};
function MinimalWindow({ mode = 'light', initial }) {
const t = MinTheme[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 fontUI = '"Segoe UI Variable","Segoe UI",system-ui,-apple-system,sans-serif';
const fontMono = '"Cascadia Mono","Consolas",ui-monospace,monospace';
return (
{/* title */}
{/* Logs */}
);
}
function MinTitle({ t }) {
const cell = { width: 46, height: 32, display:'flex', alignItems:'center', justifyContent:'center', cursor:'pointer', color: t.dim };
return (
Drover-Go
0.4.2
{ e.currentTarget.style.background = '#c0463f'; e.currentTarget.style.color = 'white'; }}
onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; e.currentTarget.style.color = t.dim; }}>
);
}
function Card({ t, children, style }) {
return {children}
;
}
function CardHeader({ t, children }) {
return {children}
;
}
function MinField({ t, label, children, style }) {
return ;
}
function minInput(t, fontUI, disabled) {
return {
background: t.inputBg, color: disabled ? t.dimmer : t.text,
border: `1px solid ${t.inputBorder}`, borderRadius: 5, padding: '8px 10px',
fontSize: 13, fontFamily: fontUI, outline:'none', width:'100%', boxSizing:'border-box',
};
}
function MinToggle({ t, checked, onChange, children }) {
return (
);
}
function MinStatus({ t, D, palette, fontMono }) {
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} of {D.tests.length} checks failed. Some features won't work.}
{D.tests.map(test => {
const r = D.results[test.id];
const state = r?.result || (D.running === test.id ? 'running' : 'pending');
return (
{test.label}
{r?.metric}
{r?.result === 'failed' && (
)}
{r?.result === 'failed' && r.expanded && (
{r.error}
{r.hint}
)}
);
})}
);
}
function SummaryPill({ t, kind, children }) {
const c = kind === 'ok' ? t.pass : t.warn;
return {children}
;
}
function MinStartBtn({ t, D, fontUI }) {
const phase = D.phase;
const allFailed = D.lastSummary && D.lastSummary.failed === D.tests.length;
const checkedOk = phase === 'checked' && !allFailed;
const active = phase === 'active';
const warning = active && (D.lastSummary?.failed || 0) > 0;
if (active) {
const c = warning ? t.warn : t.pass;
return (
Active{warning ? ' · UDP fallback' : ''}
);
}
return (
);
}
function MinStopBtn({ t, D, fontUI }) {
const enabled = D.phase === 'active';
return (
);
}
function MinLiveStats({ t, stats, fontMono }) {
const Cell = ({ icon, val, lbl }) => (
{icon}
{val}
{lbl && {lbl}}
);
return (
} val={window.fmtBytes(stats.up)}/>
} val={window.fmtBytes(stats.down)}/>
|
|
|
| |
);
}
function MinLogs({ t, D, fontMono }) {
return (
{D.logsOpen && (
<>
{['Copy all','Clear','Open log file'].map((l,i) => (
))}
el && (el.scrollTop = el.scrollHeight)}
style={{ maxHeight: 130, overflowY: 'auto', padding: '8px 16px',
fontFamily: fontMono, fontSize: 11, lineHeight: 1.6, color: t.dim, background: t.panel }}>
{D.logs.map((l,i) => (
{window.fmtTime(l.t)}{' '}
[{l.level}]{' '}
{l.msg}
))}
>
)}
);
}
window.MinimalWindow = MinimalWindow;