feat: Add moment dependency and update release notes page
This commit adds the moment dependency to the project by updating the package-lock.json and package.json files. It also updates the release notes page by modifying the layout and adding a paragraph to thank users for their feedback.
This commit is contained in:
9
package-lock.json
generated
9
package-lock.json
generated
@@ -31,6 +31,7 @@
|
|||||||
"feed": "^4.2.2",
|
"feed": "^4.2.2",
|
||||||
"framer-motion": "^11.3.24",
|
"framer-motion": "^11.3.24",
|
||||||
"lucide-react": "^0.400.0",
|
"lucide-react": "^0.400.0",
|
||||||
|
"moment": "^2.30.1",
|
||||||
"next": "14.2.4",
|
"next": "14.2.4",
|
||||||
"next-themes": "^0.3.0",
|
"next-themes": "^0.3.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
@@ -14115,6 +14116,14 @@
|
|||||||
"mkdirp": "bin/cmd.js"
|
"mkdirp": "bin/cmd.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/moment": {
|
||||||
|
"version": "2.30.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
||||||
|
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mri": {
|
"node_modules/mri": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
"feed": "^4.2.2",
|
"feed": "^4.2.2",
|
||||||
"framer-motion": "^11.3.24",
|
"framer-motion": "^11.3.24",
|
||||||
"lucide-react": "^0.400.0",
|
"lucide-react": "^0.400.0",
|
||||||
|
"moment": "^2.30.1",
|
||||||
"next": "14.2.4",
|
"next": "14.2.4",
|
||||||
"next-themes": "^0.3.0",
|
"next-themes": "^0.3.0",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
[data-theme='dark'], .dark {
|
[data-theme='dark'], .dark {
|
||||||
--background: 0 0% 0%;
|
--background: 5 5 5;
|
||||||
--foreground: 0 0% 98%;
|
--foreground: 0 0% 98%;
|
||||||
|
|
||||||
--surface: rgb(23, 23, 23);
|
--surface: rgb(23, 23, 23);
|
||||||
|
|||||||
@@ -9,8 +9,11 @@ import Link from "next/link";
|
|||||||
export default function ReleaseNotes() {
|
export default function ReleaseNotes() {
|
||||||
return (
|
return (
|
||||||
<main className="flex min-h-screen flex-col items-center justify-start">
|
<main className="flex min-h-screen flex-col items-center justify-start">
|
||||||
<div className="min-h-screen py-42 flex justify-center flex-col px-10 lg:px-0 md:w-2/3 lg:w-1/2">
|
<div className="min-h-screen py-42 flex justify-center flex-col px-10 lg:px-0 lg:w-4/5 xl:w-3/5">
|
||||||
<h1 className="text-4xl text-center font-bold mt-24">Release Notes</h1>
|
<h1 className="text-4xl font-bold mt-36">Release Notes</h1>
|
||||||
|
<p className="mt-8 text-lg text-muted-foreground">
|
||||||
|
Stay up to date with the latest changes to Zen Browser! Since the <a className="text-blue-500" href="#1.0.0-a.1">first release</a> till <a className="text-blue-500" href={`/release-notes/${releaseNotes[0].version}`}>{releaseNotes[0].version}</a>, we've been working hard to make Zen Browser the best it can be.<br /><br /> Thanks everyone for your feedback! ❤️
|
||||||
|
</p>
|
||||||
{releaseNotes.map((releaseNote) => (
|
{releaseNotes.map((releaseNote) => (
|
||||||
<ReleaseNoteElement key={releaseNote.version} data={releaseNote} />
|
<ReleaseNoteElement key={releaseNote.version} data={releaseNote} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
import { ReleaseNote } from "@/lib/release-notes";
|
import { ReleaseNote, releaseNotes } from "@/lib/release-notes";
|
||||||
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
|
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
|
||||||
import { CheckCheckIcon, StarIcon } from "lucide-react";
|
import { CheckCheckIcon, StarIcon } from "lucide-react";
|
||||||
import StickyBox from "react-sticky-box";
|
import StickyBox from "react-sticky-box";
|
||||||
|
|
||||||
|
import moment from "moment";
|
||||||
|
import { Accordion, AccordionItem } from "@radix-ui/react-accordion";
|
||||||
|
import { AccordionContent, AccordionTrigger } from "./ui/accordion";
|
||||||
|
import { ny } from "@/lib/utils";
|
||||||
|
|
||||||
export default function ReleaseNoteElement({ data }: { data: ReleaseNote }) {
|
export default function ReleaseNoteElement({ data }: { data: ReleaseNote }) {
|
||||||
|
const splitDate = data.date.split("/");
|
||||||
return (
|
return (
|
||||||
<div className="flex border-t relative pt-36 mt-36">
|
<section className={ny("flex flex-col lg:flex-row border-t relative", data.version == releaseNotes[0].version ? "mt-24 pt-24" : "pt-36 mt-36")} id={data.version}>
|
||||||
<StickyBox className="mt-1 mx-12 text-muted-foreground text-sm h-fit" offsetTop={120}>
|
<StickyBox className="mb-6 lg:mb-0 mt-1 mr-24 ml-10 text-muted-foreground text-xs min-w-52 h-fit" offsetTop={120}>
|
||||||
{data.date}
|
{moment({
|
||||||
|
year: parseInt(splitDate[2]),
|
||||||
|
month: parseInt(splitDate[1]) - 1,
|
||||||
|
day: parseInt(splitDate[0]),
|
||||||
|
}).format('MMMM Do, YYYY')}
|
||||||
</StickyBox>
|
</StickyBox>
|
||||||
<div className="px-10 md:px-0">
|
<div className="px-5 md:px-10 md:px-0 md:pr-32">
|
||||||
<h1 className="text-4xl font-bold">
|
<h1 className="text-3xl font-bold">
|
||||||
Release notes for {data.version} 🎉
|
Release notes for {data.version} 🎉
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-md mt-4 text-muted-foreground">
|
<p className="text-md mt-4 text-muted-foreground">
|
||||||
@@ -25,76 +35,87 @@ export default function ReleaseNoteElement({ data }: { data: ReleaseNote }) {
|
|||||||
</p>
|
</p>
|
||||||
{data.extra && (
|
{data.extra && (
|
||||||
<p
|
<p
|
||||||
className="text-md mt-8"
|
className="text-md text-muted-foreground mt-8"
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: data.extra.replace(/(\n)/g, "<br />"),
|
__html: data.extra.replace(/(\n)/g, "<br />"),
|
||||||
}}
|
}}
|
||||||
></p>
|
></p>
|
||||||
)}
|
)}
|
||||||
{data.breakingChanges && (
|
<Accordion type="single" collapsible className="mt-8">
|
||||||
<>
|
{data.breakingChanges && (
|
||||||
<h2 className="text-2xl font-bold mt-8 flex items-center">
|
<AccordionItem value="breaking-changes" title="Breaking Changes">
|
||||||
<ExclamationTriangleIcon className="w-6 h-6 mr-4" />
|
<AccordionTrigger>
|
||||||
Breaking changes
|
<div className="flex items-center">
|
||||||
</h2>
|
<ExclamationTriangleIcon className="text-red-500 mr-2 mt-1 size-5 opacity-50" />
|
||||||
<p className="text-md mt-4">
|
<span className="ml-2">Breaking Changes</span>
|
||||||
The following changes may break existing functionality:
|
</div>
|
||||||
</p>
|
</AccordionTrigger>
|
||||||
<ul className="list-disc list-inside mt-2">
|
<AccordionContent>
|
||||||
{data.breakingChanges?.map((change, index) => (
|
<ul className="ml-6" style={{ listStyleType: "initial" }}>
|
||||||
<li key={index} className="mt-1 text-muted-foreground">
|
{data.breakingChanges.map((change) => (
|
||||||
{change}
|
<li key={change} className="mt-4 text-md text-muted-foreground">
|
||||||
</li>
|
<span className="ml-1">
|
||||||
))}
|
{change}
|
||||||
</ul>
|
</span>
|
||||||
</>
|
</li>
|
||||||
)}
|
))}
|
||||||
{data.features && (
|
</ul>
|
||||||
<>
|
</AccordionContent>
|
||||||
<h2 className="text-2xl font-bold mt-8 flex items-center">
|
</AccordionItem>
|
||||||
<StarIcon className="w-6 h-6 mr-4" />
|
)
|
||||||
Features
|
}
|
||||||
</h2>
|
{data.fixes && (
|
||||||
<p className="text-md mt-2">
|
<AccordionItem value="fixes" title="Fixes">
|
||||||
The following features have been added:
|
<AccordionTrigger>
|
||||||
</p>
|
<div className="flex items-center">
|
||||||
<ul className="list-disc list-inside mt-4">
|
<CheckCheckIcon className="mr-2 mt-1 size-5 opacity-50" />
|
||||||
{data.features?.map((feature, index) => (
|
<span className="ml-2">Fixes</span>
|
||||||
<li key={index} className="text-md mt-1 text-muted-foreground">
|
</div>
|
||||||
{feature}
|
</AccordionTrigger>
|
||||||
</li>
|
<AccordionContent>
|
||||||
))}
|
<ul className="ml-6" style={{ listStyleType: "initial" }}>
|
||||||
</ul>
|
{data.fixes.map((fix) => (
|
||||||
</>
|
<li key={fix.description} className="mt-4 text-md text-muted-foreground">
|
||||||
)}
|
<span className="ml-1">
|
||||||
{data.fixes && (
|
{fix.description}
|
||||||
<>
|
</span>
|
||||||
<h2 className="text-2xl flex items-center font-bold mt-8">
|
{fix.issue && (
|
||||||
<CheckCheckIcon className="w-6 h-6 mr-4" />
|
<a
|
||||||
Fixes
|
href={`https://github.com/zen-browser/desktop/issues/${fix.issue}`}
|
||||||
</h2>
|
className="text-blue-500 ml-1 text-underline"
|
||||||
<p className="text-md mt-2">
|
>
|
||||||
The following issues have been fixed:
|
#{fix.issue}
|
||||||
</p>
|
</a>
|
||||||
<ul className="list-disc list-inside mt-2">
|
)}
|
||||||
{data.fixes?.map((fix, index) => (
|
</li>
|
||||||
<li key={index} className="mt-1 text-muted-foreground">
|
))}
|
||||||
{fix.description}
|
</ul>
|
||||||
{fix.issue && (
|
</AccordionContent>
|
||||||
<a
|
</AccordionItem>
|
||||||
href={`https://github.com/zen-browser/desktop/issues/${fix.issue}`}
|
)}
|
||||||
target="_blank"
|
{data.features && (
|
||||||
className="ml-1 text-blue-500"
|
<AccordionItem value="features" title="Features">
|
||||||
>
|
<AccordionTrigger>
|
||||||
issue #{fix.issue}
|
<div className="flex items-center">
|
||||||
</a>
|
<StarIcon className="text-yellow-700 mr-2 mt-1 size-5 opacity-50" />
|
||||||
)}
|
<span className="ml-2">Features</span>
|
||||||
</li>
|
</div>
|
||||||
))}
|
</AccordionTrigger>
|
||||||
</ul>
|
<AccordionContent>
|
||||||
</>
|
<ul className="ml-6" style={{ listStyleType: "initial" }}>
|
||||||
)}
|
{data.features.map((feature) => (
|
||||||
|
<li key={feature} className="mt-4 text-md text-muted-foreground">
|
||||||
|
<span className="ml-1">
|
||||||
|
{feature}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</AccordionContent>
|
||||||
|
</AccordionItem>
|
||||||
|
)}
|
||||||
|
</Accordion>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user