import Link from "next/link" import { PageHeader } from "@/components/page-header" import { OpsPanel } from "@/components/ops-panel" import { buttonVariants } from "@/components/ui/button" import { formatAppVersionLabel, getAppVersion, getReleaseUrl } from "@/lib/app-version" import { formatCommitSubject, getReleaseCommitPreview, RELEASE_COMMIT_PREVIEW_LIMIT, } from "@/lib/release-commits" import { readReleaseManifest } from "@/lib/release-manifest" import { cn } from "@/lib/utils" import { ExternalLinkIcon } from "lucide-react" export const dynamic = "force-dynamic" function formatPublishedAt(value: string | null, isProdBuild: boolean): string { if (value) { return new Intl.DateTimeFormat("ru-RU", { dateStyle: "long", timeStyle: "short", }).format(new Date(value)) } return isProdBuild ? "Прод-сборка" : "Локальная сборка" } export default function ReleasesPage() { const manifest = readReleaseManifest() const version = getAppVersion() const isProdBuild = !version.endsWith("-dev") const releaseUrl = getReleaseUrl() || manifest.releaseUrl || null const commits = getReleaseCommitPreview(manifest.commits) return (
Открыть в Gitea ) : null } />
{formatAppVersionLabel(version)} {formatPublishedAt(manifest.publishedAt, isProdBuild)}

Версия формируется автоматически от базы v1.0.0 по Conventional Commits.

0 ? `Последние ${RELEASE_COMMIT_PREVIEW_LIMIT} коммитов в сборке ${formatAppVersionLabel(manifest.version)}.` : "Для локальной разработки список коммитов пуст. В прод-сборке он заполняется CI." } contentClassName="px-5 pb-5" > {commits.length === 0 ? (

Коммитов для отображения пока нет.

) : (
    {commits.map((commit) => (
  • {commit.type} {commit.shortSha} {commit.author}

    {formatCommitSubject(commit.subject)}

  • ))}
)}
) }