Seed: developer-tools template (15 files)
This commit is contained in:
@@ -0,0 +1,177 @@
|
||||
import { useState } from "react";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Rocket, Bug, AlertTriangle, TrendingUp, Mail } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
type ChangeType = "feature" | "fix" | "breaking" | "improvement";
|
||||
|
||||
interface Release {
|
||||
version: string;
|
||||
date: string;
|
||||
title: string;
|
||||
description: string;
|
||||
changes: ChangeType[];
|
||||
}
|
||||
|
||||
const releases: Release[] = [
|
||||
{
|
||||
version: "2.4.0",
|
||||
date: "Apr 2, 2024",
|
||||
title: "Edge Functions & Global Deployments",
|
||||
description: "Deploy serverless functions to 30+ edge regions with automatic geo-routing. Includes new SDK methods for managing edge deployments and improved cold start times.",
|
||||
changes: ["feature", "improvement"],
|
||||
},
|
||||
{
|
||||
version: "2.3.1",
|
||||
date: "Mar 25, 2024",
|
||||
title: "Fix: Webhook Retry Logic",
|
||||
description: "Fixed an issue where webhook retries could fire duplicate events. Improved idempotency key handling and added exponential backoff.",
|
||||
changes: ["fix"],
|
||||
},
|
||||
{
|
||||
version: "2.3.0",
|
||||
date: "Mar 18, 2024",
|
||||
title: "v2 Authentication API",
|
||||
description: "New authentication API with support for OAuth 2.0, API key scopes, and token rotation. Breaking: v1 auth endpoints deprecated and will be removed in v3.",
|
||||
changes: ["feature", "breaking"],
|
||||
},
|
||||
{
|
||||
version: "2.2.2",
|
||||
date: "Mar 5, 2024",
|
||||
title: "Dashboard Performance & Bug Fixes",
|
||||
description: "Reduced dashboard load time by 40%. Fixed pagination bug on project listing and resolved timezone display issues in analytics.",
|
||||
changes: ["fix", "improvement"],
|
||||
},
|
||||
{
|
||||
version: "2.2.0",
|
||||
date: "Feb 20, 2024",
|
||||
title: "Real-Time Logs & Streaming",
|
||||
description: "Stream deployment logs in real time via the CLI or dashboard. New log filtering, search, and export capabilities with structured JSON output.",
|
||||
changes: ["feature", "improvement"],
|
||||
},
|
||||
];
|
||||
|
||||
const typeConfig: Record<ChangeType, { label: string; color: string; icon: typeof Rocket }> = {
|
||||
feature: { label: "Feature", color: "bg-emerald-500/10 text-emerald-400 border-emerald-500/20", icon: Rocket },
|
||||
fix: { label: "Fix", color: "bg-sky-500/10 text-sky-400 border-sky-500/20", icon: Bug },
|
||||
breaking: { label: "Breaking", color: "bg-red-500/10 text-red-400 border-red-500/20", icon: AlertTriangle },
|
||||
improvement: { label: "Improvement", color: "bg-amber-500/10 text-amber-400 border-amber-500/20", icon: TrendingUp },
|
||||
};
|
||||
|
||||
const filterOptions: { label: string; value: string }[] = [
|
||||
{ label: "All", value: "all" },
|
||||
{ label: "Features", value: "feature" },
|
||||
{ label: "Fixes", value: "fix" },
|
||||
{ label: "Breaking", value: "breaking" },
|
||||
];
|
||||
|
||||
export default function ChangelogPage() {
|
||||
const [filter, setFilter] = useState("all");
|
||||
const [email, setEmail] = useState("");
|
||||
|
||||
const filtered = filter === "all"
|
||||
? releases
|
||||
: releases.filter((r) => r.changes.includes(filter as ChangeType));
|
||||
|
||||
const handleSubscribe = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (!email) return;
|
||||
toast.success("Subscribed to changelog updates!");
|
||||
setEmail("");
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-950 text-white antialiased">
|
||||
<Header />
|
||||
|
||||
<div className="pt-32 pb-24 mx-auto max-w-3xl px-6">
|
||||
{/* Header */}
|
||||
<div className="text-center mb-12">
|
||||
<Badge className="mb-4 bg-emerald-500/10 text-emerald-400 border-emerald-500/20">Changelog</Badge>
|
||||
<h1 className="text-3xl font-bold tracking-tight sm:text-4xl animate-fade-up">What is new in DevStack</h1>
|
||||
<p className="mt-4 text-slate-400">All the latest updates, improvements, and fixes.</p>
|
||||
</div>
|
||||
|
||||
{/* Subscribe */}
|
||||
<Card className="bg-slate-900/60 border-slate-800 mb-10">
|
||||
<CardContent className="p-6">
|
||||
<form onSubmit={handleSubscribe} className="flex flex-col sm:flex-row gap-3">
|
||||
<div className="flex items-center gap-2 flex-1">
|
||||
<Mail className="h-5 w-5 text-slate-500 flex-shrink-0" />
|
||||
<Input
|
||||
type="email"
|
||||
placeholder="you@company.com"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
className="bg-slate-950 border-slate-700 text-white placeholder:text-slate-600 focus:border-emerald-500"
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit" className="rounded-full bg-emerald-500 hover:bg-emerald-400 text-slate-950 font-semibold active:scale-[0.98]">
|
||||
Subscribe to updates
|
||||
</Button>
|
||||
</form>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Filters */}
|
||||
<div className="flex flex-wrap gap-2 mb-10">
|
||||
{filterOptions.map((opt) => (
|
||||
<button
|
||||
key={opt.value}
|
||||
onClick={() => setFilter(opt.value)}
|
||||
className={`px-4 py-1.5 rounded-full text-sm font-medium transition-all \${
|
||||
filter === opt.value
|
||||
? "bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/30"
|
||||
: "text-slate-400 hover:text-white hover:bg-slate-800"
|
||||
}`}
|
||||
>
|
||||
{opt.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Release entries */}
|
||||
<div className="space-y-8 stagger">
|
||||
{filtered.map((release) => (
|
||||
<Card key={release.version} className="bg-slate-900/60 border-slate-800 hover:border-emerald-500/20 transition-all">
|
||||
<CardContent className="p-6">
|
||||
<div className="flex flex-wrap items-center gap-3 mb-4">
|
||||
<Badge className="bg-emerald-500/10 text-emerald-400 border-emerald-500/20 font-mono">
|
||||
v{release.version}
|
||||
</Badge>
|
||||
<span className="text-sm text-slate-500">{release.date}</span>
|
||||
<div className="flex gap-2 ml-auto">
|
||||
{release.changes.map((type) => {
|
||||
const cfg = typeConfig[type];
|
||||
return (
|
||||
<Badge key={type} className={`text-xs \${cfg.color}`}>
|
||||
<cfg.icon className="h-3 w-3 mr-1" />
|
||||
{cfg.label}
|
||||
</Badge>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<h3 className="text-lg font-semibold text-white mb-2">{release.title}</h3>
|
||||
<p className="text-sm text-slate-400 leading-relaxed">{release.description}</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{filtered.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<p className="text-slate-500">No entries matching this filter.</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user