feat: add changelog and versioning, surface it in admin
Bumps version to 0.2.0 (root + apps/web package.json) and adds CHANGELOG.md as the canonical human-readable history, mirrored by apps/web/lib/changelog.ts as the in-app data source (single ChangelogList component renders both). - /changelog: user-facing page, linked from the account dropdown. - /admin/changelog: same list, plus a "Version" card on the admin overview dashboard linking to it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import type { Metadata } from "next";
|
||||
import { ChangelogList } from "@/components/shared/changelog-list";
|
||||
import { APP_VERSION } from "@/lib/changelog";
|
||||
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
export default function AdminChangelogPage() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Changelog</h1>
|
||||
<p className="text-muted-foreground mt-1">Currently running v{APP_VERSION}. Edit apps/web/lib/changelog.ts to update.</p>
|
||||
</div>
|
||||
<ChangelogList />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { headers } from "next/headers";
|
||||
import { auth } from "@/lib/auth/server";
|
||||
import { db, users, eq } from "@epicure/db";
|
||||
import Link from "next/link";
|
||||
import { Shield, Users, BookOpen, Settings, BarChart3, ClipboardList, HardDrive, Bot, ArrowLeft, Gauge, Mail, Flag } from "lucide-react";
|
||||
import { Shield, Users, BookOpen, Settings, BarChart3, ClipboardList, HardDrive, Bot, ArrowLeft, Gauge, Mail, Flag, History } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const adminNav = [
|
||||
@@ -17,6 +17,7 @@ const adminNav = [
|
||||
{ href: "/admin/storage", label: "Storage", icon: HardDrive },
|
||||
{ href: "/admin/ai-config", label: "AI Config", icon: Bot },
|
||||
{ href: "/admin/settings", label: "Settings", icon: Settings },
|
||||
{ href: "/admin/changelog", label: "Changelog", icon: History },
|
||||
];
|
||||
|
||||
export default async function AdminLayout({ children }: { children: React.ReactNode }) {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { db } from "@epicure/db";
|
||||
import { users, recipes, userUsage, recipePhotos } from "@epicure/db";
|
||||
import { count, eq, sql } from "@epicure/db";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Users, BookOpen, Sparkles, Image } from "lucide-react";
|
||||
import { Users, BookOpen, Sparkles, Image, History } from "lucide-react";
|
||||
import { APP_VERSION, CHANGELOG } from "@/lib/changelog";
|
||||
|
||||
export const metadata: Metadata = {};
|
||||
|
||||
@@ -46,6 +48,22 @@ export default async function AdminPage() {
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-sm font-medium text-muted-foreground">Version</CardTitle>
|
||||
<History className="h-4 w-4 text-muted-foreground" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="text-2xl font-bold">v{APP_VERSION}</div>
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
Released {CHANGELOG[0]?.date} ·{" "}
|
||||
<Link href="/admin/changelog" className="underline hover:text-foreground">
|
||||
View changelog
|
||||
</Link>
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user