Fix doctitle to mirror reimburse: correct SVG sizing, lowercase app name

Replace fragile viewBox string-replace with proper width/height injection
so the 24px icon renders at the right size. Use non-breaking space in
.meta when no invoice number is set (preserves row height).

https://claude.ai/code/session_01MkM7p8Us3L8YAfLKGA13NS
This commit is contained in:
Claude 2026-06-08 16:30:10 +00:00
parent f47f524a84
commit ad2aa079a9
No known key found for this signature in database

View file

@ -625,16 +625,17 @@ function buildHeader() {
// Right: app name h1 (icon + lowercase app name) // Right: app name h1 (icon + lowercase app name)
const titleEl = document.getElementById("inv-title"); const titleEl = document.getElementById("inv-title");
titleEl.innerHTML = LOGO_SVG.replace("48 48", "24 24") + " invoice"; // Right h1: 24×24 icon inline + lowercase app name (mirrors reimburse/timesheet)
titleEl.innerHTML = LOGO_SVG.replace('<svg ', '<svg width="24" height="24" ') + "invoice";
// Meta: invoice number (updated live) // Meta: invoice number, non-breaking space when empty to preserve row height
updateInvMeta(); updateInvMeta();
} }
function updateInvMeta() { function updateInvMeta() {
const el = document.getElementById("inv-meta"); const el = document.getElementById("inv-meta");
const ino = (document.getElementById("ino")?.value || "").trim(); const ino = (document.getElementById("ino")?.value || "").trim();
if (el) el.textContent = ino || ""; if (el) el.textContent = ino || " ";
} }
// ── Font-size accessibility ──────────────────────────────────────────────────── // ── Font-size accessibility ────────────────────────────────────────────────────