fix: API key "Last used" showed date only, not time
Also removes HANDOFF.md, SECURITY_AUDIT.md, TODO.md (stale docs). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,16 @@ function formatDate(iso: string) {
|
||||
});
|
||||
}
|
||||
|
||||
function formatDateTime(iso: string) {
|
||||
return new Date(iso).toLocaleString(undefined, {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "2-digit",
|
||||
});
|
||||
}
|
||||
|
||||
export function ApiKeysManager({ initialKeys }: { initialKeys: ApiKey[] }) {
|
||||
const t = useTranslations("settingsForm");
|
||||
const [keys, setKeys] = useState<ApiKey[]>(initialKeys);
|
||||
@@ -173,7 +183,7 @@ export function ApiKeysManager({ initialKeys }: { initialKeys: ApiKey[] }) {
|
||||
<span>{t("createdOn", { date: formatDate(k.createdAt) })}</span>
|
||||
<span>·</span>
|
||||
{k.lastUsedAt ? (
|
||||
<span>{t("lastUsedOn", { date: formatDate(k.lastUsedAt) })}</span>
|
||||
<span>{t("lastUsedOn", { date: formatDateTime(k.lastUsedAt) })}</span>
|
||||
) : (
|
||||
<Badge variant="secondary" className="text-xs">{t("neverUsed")}</Badge>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user