Files
t5de-hub/apps/web/components/header.tsx
dhkatz efd5d52198
Release / release (push) Successful in 3s
CI / test (push) Successful in 1m2s
CI / image (apps/api/Dockerfile, t5de-hub-api) (push) Successful in 4s
CI / image (apps/web/Dockerfile, t5de-hub-web) (push) Successful in 12s
feat(web): Download link to t5de.dev in the header (#2)
A Download link in the header, beside the account menu or Sign in, to t5de.dev/download: T5DE's website with the latest setup, its version and checksum. Gitea's release pages are confusing for people new to it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

A Download link in the header, beside the account menu or Sign in, to t5de.dev/download: T5DE's website with the latest setup, its version and checksum. Gitea's release pages are confusing for people new to it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: dhkatz <[email protected]>
2026-11-03 10:54:20 +00:00

47 lines
1.7 KiB
TypeScript

import Image from "next/image";
import Link from "next/link";
import { getMe, isModerator } from "@/lib/api";
import { buttonVariants } from "@/components/ui/button";
import { NavLink, ProfileMenu } from "./header-client";
import logo from "./t5de.png";
export function Logo({ className }: { className?: string }) {
return <Image src={logo} alt="T5DE" priority className={className ?? "size-9"} />;
}
export async function Header() {
const me = await getMe();
return (
<header className="border-b">
<div className="mx-auto flex max-w-5xl flex-wrap items-center gap-x-6 gap-y-2 px-4 py-3 sm:px-6">
<Link href="/" aria-label="T5DE Hub home" className="shrink-0">
<Logo />
</Link>
<nav className="order-last flex w-full flex-wrap items-center gap-1 text-sm sm:order-none sm:w-auto">
<NavLink href="/online">Online</NavLink>
<NavLink href="/rooms">Rooms</NavLink>
<NavLink href="/products">Products</NavLink>
<NavLink href="/catalogs">Catalogs</NavLink>
</nav>
<div className="ml-auto flex items-center gap-2 text-sm">
<a href="https://t5de.dev/download" className={buttonVariants({ variant: "ghost" })}>
Download
</a>
{me ? (
<ProfileMenu username={me.username} picture={me.picture} console={isModerator(me)} />
) : (
<>
<Link href="/signin" className={buttonVariants({ variant: "ghost" })}>
Sign in
</Link>
<Link href="/signup" className={buttonVariants()}>
Create account
</Link>
</>
)}
</div>
</div>
</header>
);
}