Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : ORIX App Universe8 * File : src/app/admin/(panel)/releases/page.tsx9 * Module : app10 * Repository : https://git.spboucher.ai/orix-spboucher-ai11 * Project Website : https://www.orixlab.dev12 * Created : 2026-11-2113 * Last Modified : 2026-11-2114 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: support@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import { ReleaseActions } from "@/components/admin/Panels";44import { allReleases, signatureOf } from "@/lib/releases/store";4546const COLOR: Record<string, string> = { published: "var(--ok)", validated: "var(--info)", held: "var(--warn)", invalid: "var(--bad)", withdrawn: "var(--ink-3)", note: "var(--ink-3)", discovered: "var(--ink-3)" };4748export default function Releases() {49 const releases = allReleases();50 return (51 <div className="grid gap-6" data-testid="admin-releases">52 <h1 className="h2">Releases</h1>53 <p className="max-w-3xl text-ink2">Records discovered on SPB Git. Nothing becomes downloadable until it is approved here: approval mirrors the image, recomputes its SHA-256 against the forge’s, checks notarization with Apple’s tools on this Mac, and applies the publication policy.</p>54 {releases.length === 0 && <p className="card p-8 text-ink2">No release record yet.</p>}55 <ul className="grid gap-4">{releases.map((r) => {56 const sig = signatureOf(r);57 return (58 <li key={r.id} className="card grid gap-4 p-5 lg:grid-cols-[1fr_22rem]" data-testid="release-row" data-state={r.state}>59 <div className="min-w-0">60 <p className="flex flex-wrap items-center gap-3"><b>{r.slug}</b><span className="mono">{r.tag}</span><span className="tag" style={{ color: COLOR[r.state] }}>{r.state}</span>{r.prerelease ? <span className="tag">pre-release</span> : null}{r.reason && <span className="mono text-[0.8rem] text-[var(--warn)]">{r.reason}</span>}</p>61 <p className="mt-1 text-[0.92rem] text-ink2">{r.subject}</p>62 {r.asset_name && <p className="mono mt-2 break-all text-[0.78rem] text-ink3">{r.asset_name} · {r.asset_size?.toLocaleString("en-CA")} bytes<br />declared {r.sha256_declared ?? "—"}<br />computed {r.sha256_computed ?? "—"}{sig ? <><br />notarized: {String(sig.notarized)}{sig.teamId ? ` · team ${sig.teamId}` : ""}</> : null}</p>}63 </div>64 {r.state !== "note" && <ReleaseActions id={r.id} state={r.state} notes={r.notes ? JSON.parse(r.notes) : { en: "", fr: "" }} />}65 </li>66 );67 })}</ul>68 </div>69 );70}71