Skip to content

Commit 7919578

Browse files
committed
fix: add missing build page components
1 parent 6772fdd commit 7919578

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { CheckCircle2, Download, Package, FileCode, ShieldCheck } from 'lucide-react';
2+
3+
const phaseConfig: Record<string, { icon: typeof Download; label: string }> = {
4+
opencore: { icon: Download, label: 'Downloading OpenCore' },
5+
kexts: { icon: Package, label: 'Downloading Kexts' },
6+
config: { icon: FileCode, label: 'Generating Config' },
7+
validate: { icon: ShieldCheck, label: 'Validating' },
8+
};
9+
10+
interface BuildPhaseRowProps {
11+
phase: string;
12+
active: boolean;
13+
completed: boolean;
14+
message?: string;
15+
}
16+
17+
export function BuildPhaseRow({ phase, active, completed, message }: BuildPhaseRowProps) {
18+
const meta = phaseConfig[phase];
19+
if (!meta) return null;
20+
21+
return (
22+
<div className="flex items-center gap-3 px-4 py-2.5">
23+
<div className="shrink-0">
24+
{completed ? (
25+
<CheckCircle2 size={15} className="text-[--color-green-5]" />
26+
) : active ? (
27+
<span className="relative flex size-[15px] items-center justify-center">
28+
<span className="absolute size-full rounded-full bg-[--accent] opacity-30 animate-ping" />
29+
<span className="relative size-2 rounded-full bg-[--accent]" />
30+
</span>
31+
) : (
32+
<span className="block size-[15px] rounded-full border border-[--border] bg-transparent" />
33+
)}
34+
</div>
35+
<div className="flex-1 min-w-0">
36+
<p
37+
className={`text-[0.8125rem] leading-snug ${
38+
active
39+
? 'text-[--text-primary] font-medium'
40+
: completed
41+
? 'text-[--text-secondary]'
42+
: 'text-[--text-tertiary]'
43+
}`}
44+
>
45+
{meta.label}
46+
</p>
47+
{active && message && (
48+
<p className="text-[0.6875rem] text-[--text-tertiary] mt-0.5 truncate">{message}</p>
49+
)}
50+
</div>
51+
</div>
52+
);
53+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { Badge } from '../ui/Badge';
2+
import type { KextResult } from '../../bridge/types';
3+
4+
interface KextStatusRowProps {
5+
kext: KextResult;
6+
}
7+
8+
export function KextStatusRow({ kext }: KextStatusRowProps) {
9+
const variant =
10+
kext.status === 'downloaded' || kext.status === 'cached'
11+
? 'success'
12+
: kext.status === 'failed'
13+
? 'danger'
14+
: ('warning' as const);
15+
16+
return (
17+
<div className="flex items-center gap-3 px-4 py-2">
18+
<span className="text-[0.8125rem] text-[--text-primary] flex-1 truncate">{kext.name}</span>
19+
{kext.version && (
20+
<span className="text-[0.6875rem] text-[--text-tertiary] shrink-0">{kext.version}</span>
21+
)}
22+
<Badge variant={variant} size="sm">
23+
{kext.status}
24+
</Badge>
25+
</div>
26+
);
27+
}

0 commit comments

Comments
 (0)