feat: add version tag

This commit is contained in:
hamster1963 2024-10-24 12:00:27 +08:00
parent f2211a418c
commit 7656bbe319
2 changed files with 10 additions and 1 deletions

View File

@ -1,7 +1,9 @@
import pack from "@/package.json";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
export default function Footer() { export default function Footer() {
const t = useTranslations("Footer"); const t = useTranslations("Footer");
const version = pack.version;
return ( return (
<footer className="mx-auto w-full max-w-5xl"> <footer className="mx-auto w-full max-w-5xl">
<section className="flex flex-col"> <section className="flex flex-col">
@ -14,6 +16,13 @@ export default function Footer() {
> >
{t("a_303-585_GitHub")} {t("a_303-585_GitHub")}
</a> </a>
<a
href={`https://github.com/hamster1963/nezha-dash/releases/tag/v${version}`}
target="_blank"
className="cursor-pointer font-normal underline decoration-yellow-500 decoration-2 underline-offset-2 dark:decoration-yellow-500/50"
>
v{version}
</a>
</p> </p>
<section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50"> <section className="mt-1 flex items-center gap-2 text-[13px] font-light tracking-tight text-neutral-600/50 dark:text-neutral-300/50">
{t("section_607-869_2020")} {t("section_607-869_2020")}

View File

@ -1,6 +1,6 @@
{ {
"name": "nezha-dash", "name": "nezha-dash",
"version": "0.1.0", "version": "0.7.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -p 3020", "dev": "next dev -p 3020",