diff --git a/src/app/release-notes/[version]/page.tsx b/src/app/release-notes/[version]/page.tsx index 4696b36..9a00dfc 100644 --- a/src/app/release-notes/[version]/page.tsx +++ b/src/app/release-notes/[version]/page.tsx @@ -1,14 +1,35 @@ 'use client' +import Footer from '@/components/footer'; +import { Navigation } from '@/components/navigation'; +import ReleaseNote from '@/components/release-note'; +import { Button } from '@/components/ui/button'; +import { releaseNotes } from '@/lib/release-notes'; +import Link from 'next/link'; import { useParams } from 'next/navigation' export default function() { const params = useParams<{ version: string }>() const { version } = params; + const releaseNote = releaseNotes.find((note) => note.version === version); + if (!releaseNote) { + return ( +
+
+

Release note not found

+ +
+
+ ); + } return ( -
-

{version}

-
+
+ +
) } diff --git a/src/app/release-notes/page.tsx b/src/app/release-notes/page.tsx index c0b92b0..822bb28 100644 --- a/src/app/release-notes/page.tsx +++ b/src/app/release-notes/page.tsx @@ -1,7 +1,33 @@ -import { releaseNotes } from "@/lib/release-notes"; -import { redirect } from "next/navigation"; +import Footer from "@/components/footer"; +import { Navigation } from "@/components/navigation"; +import { releaseNoteIsAlpha, releaseNotes } from "@/lib/release-notes"; +import Link from "next/link"; export default function() { - // "0" is the latest release - redirect(`/release-notes/${releaseNotes[0].version}`); + return ( +
+
+

Release Notes

+
+ {releaseNotes.map((releaseNote) => ( + +
+ {releaseNote.version} +
+
+ Check out the new features and improvements for {releaseNote.version} +
+ {releaseNoteIsAlpha(releaseNote) && ( +
+ Alpha Release +
+ )} + + ))} +
+
+
+ ) } diff --git a/src/components/navigation.tsx b/src/components/navigation.tsx index 171d63a..e4e6e4c 100644 --- a/src/components/navigation.tsx +++ b/src/components/navigation.tsx @@ -35,7 +35,7 @@ export function Navigation() { - + diff --git a/src/components/release-note.tsx b/src/components/release-note.tsx new file mode 100644 index 0000000..a8ac2d3 --- /dev/null +++ b/src/components/release-note.tsx @@ -0,0 +1,72 @@ +import { ReleaseNote } from "@/lib/release-notes"; +import { ExclamationTriangleIcon } from "@radix-ui/react-icons"; +import { CheckCheckIcon, StarIcon } from "lucide-react"; +import { Button } from "./ui/button"; + +export default function ReleaseNote({ data }: { data: ReleaseNote }) { + return ( +
+
+

Release notes for {data.version} 🎉

+

{data.date}

+ {data.extra && ( +

{data.extra}

+ )} + {data.breakingChanges && ( + <> +

+ + Breaking changes +

+

The following changes may break existing functionality:

+
    + {data.breakingChanges?.map((change, index) => ( +
  • {change}
  • + ))} +
+ + )} + {data.features && ( + <> +

+ + Features +

+

The following features have been added:

+
    + {data.features?.map((feature, index) => ( +
  • {feature}
  • + ))} +
+ + )} + {data.fixes && ( + <> +

+ + Fixes +

+

The following issues have been fixed:

+ + + )} +
+ +
+ ); +} \ No newline at end of file diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts index 8a4f9fe..29a7e76 100644 --- a/src/lib/release-notes.ts +++ b/src/lib/release-notes.ts @@ -1,9 +1,14 @@ +interface Fix { + description: string; + issue?: number; +} + export interface ReleaseNote { version: string; date: string; extra?: string; - fixes?: string[]; + fixes?: Fix[]; features?: string[]; breakingChanges?: string[]; } @@ -12,13 +17,34 @@ export const releaseNotes: ReleaseNote[] = [ { version: "0.0.0-a.3", date: "11/07/2024", - extra: "This is a test release.", + extra: "This release will be the first release considered as stable. It's still in alpha, but it's the first release that we consider to be stable enough for daily use. You can start using it as your main browser right now if you are reading this!", features: [ - "Added a new feature.", + "Stable support for split views.", + "Updated firefox to version 128.0", + "Vertical tabs are now supported.", + "Better profile management system.", + "Full support for sidebar web panels.", + "Other minor UI additions and improvements.", + "Added support for an automatic update system.", ], fixes: [ - "Fixed a bug.", - ], + { + description: "Fixed a bug where the browser would crash when opening any extension.", + issue: 34, + }, + { + description: "Fixed extension icon resolution on the toolbar.", + issue: 35, + }, + { + description: "Applied a fix for that affected some linux users.", + issue: 36, + } + ] }, ]; +export function releaseNoteIsAlpha(note: ReleaseNote) { + return note.version.includes("-a."); +} +