// SPDX-FileCopyrightText: 2026 Progmasoft // SPDX-License-Identifier: AGPL-3.0-or-later import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { getGitMessages } from "@/lib/git-messages"; import { type GitRef, gitRefs, gitRepository } from "@/lib/git.server"; import { getLocale } from "@/lib/locale.server"; import type { Locale } from "@/lib/localization"; import { GitFrame, gitDate, gitHref } from "../../GitFrame"; import type { RepositoryProps } from "../../params"; export async function generateMetadata({ params, }: RepositoryProps): Promise { const { repo } = await params; const text = getGitMessages(await getLocale()); return { title: `${text.refs} · ${repo} · Progmasoft Git`, robots: { index: false, follow: true }, }; } function RefTable({ locale, name, heading, refs, }: Readonly<{ locale: Locale; name: string; heading: string; refs: GitRef[]; }>) { const text = getGitMessages(locale); return (

{heading}

{refs.map((ref) => ( ))}
{text.name} {text.commit} {text.date}
{ref.name} {ref.subject}
); } /** git.progmasoft.com//refs: the branches and the tags. */ export default async function RefsPage({ params }: RepositoryProps) { const { repo } = await params; const locale = await getLocale(); const text = getGitMessages(locale); const repository = await gitRepository(repo); const refs = repository ? await gitRefs(repo) : null; if (!repository || !refs) { notFound(); } return ( {refs.tags.length > 0 ? ( ) : null} ); }