feat: apikey alias field + markdown/patch authorship display
- ApiKeyCreationModal: required Alias input (reuse alias = renew, with banner); align roles to backend allowlist (guest -> user, default user); fix copy bug (generatedKey.key). - MarkdownContent + PatchCards: show author / created / last modified (+ by whom); formatDateTime helper (null -> "—"). Branched off fix/buildconfig-cachebust (carries the contenthash + BuildConfig fix already deployed to prod). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,3 +5,17 @@ import { twMerge } from "tailwind-merge";
|
||||
export function cn(...inputs) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
/** Format a backend datetime string for display; '—' when missing/invalid. */
|
||||
export function formatDateTime(value) {
|
||||
if (!value) return "—";
|
||||
const d = new Date(value);
|
||||
if (isNaN(d.getTime())) return "—";
|
||||
return d.toLocaleString(undefined, {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user