Open History to see the last commit
1import { XIcon } from "lucide-react";
2import { isElectron } from "../env";
3import { useStore } from "../store";
4import { Button } from "./ui/button";
5
6export default function DiffPanel() {
7 const { dispatch } = useStore();
8
9 return (
10 <aside className="flex h-full w-[400px] shrink-0 flex-col border-l border-border bg-card">
11 {/* Header */}
12 <div
13 className={`flex items-center justify-between border-b border-border px-4 ${isElectron ? "drag-region h-[52px]" : "py-3"}`}
14 >
15 <h3 className="text-xs font-medium text-foreground">Uncommitted changes</h3>
16 <Button
17 type="button"
18 size="icon-xs"
19 variant="ghost"
20 onClick={() => dispatch({ type: "TOGGLE_DIFF" })}
21 >
22 <XIcon />
23 </Button>
24 </div>
25
26 {/* Placeholder content */}
27 <div className="flex-1 overflow-y-auto p-4">
28 <div className="space-y-3">
29 <div className="rounded-lg border border-border/80 bg-muted p-3">
30 <div className="mb-2 flex items-center gap-2">
31 <span className="rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] font-medium text-emerald-400">
32 M
33 </span>
34 <span className="font-mono text-xs text-muted-foreground/80">src/App.tsx</span>
35 </div>
36 <div className="space-y-0.5 font-mono text-[11px]">
37 <div className="text-red-400/60">- const oldValue = "hello";</div>
38 <div className="text-emerald-400/60">+ const newValue = "world";</div>
39 </div>
40 </div>
41
42 <div className="rounded-lg border border-border/80 bg-muted p-3">
43 <div className="flex items-center gap-2">
44 <span className="rounded bg-blue-500/20 px-1.5 py-0.5 text-[9px] font-medium text-blue-400">
45 A
46 </span>
47 <span className="font-mono text-xs text-muted-foreground/80">src/utils.ts</span>
48 </div>
49 </div>
50 </div>
51
52 <p className="mt-6 text-center text-[10px] text-muted-foreground/30">
53 Diff integration coming soon
54 </p>
55 </div>
56 </aside>
57 );
58}