From 1f3511b45510b80c84e29ae20501d5f18c3ba2f0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 21 Dec 2025 22:21:03 +0000 Subject: [PATCH] Refactor version history display and styling Co-authored-by: mathieumoran1 --- public/control.html | 12 ++++++------ public/css/app.css | 14 ++++++++++++++ public/js/app_control.js | 34 +++++++++++++++++++++------------- 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/public/control.html b/public/control.html index 2cc8060..31ab13b 100644 --- a/public/control.html +++ b/public/control.html @@ -65,11 +65,6 @@ Réglages - +
@@ -204,7 +204,7 @@
Historique
-
—
+
—
diff --git a/public/css/app.css b/public/css/app.css index 544ca01..fb487db 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -126,4 +126,18 @@ footer { display: flex; justify-content: flex-end; gap: 10px; + } + + /* Admin → Version: keep history rows clean and readable */ + .app-version-list .list-group-item { + border-left: 0; + border-right: 0; + } + + .app-version-list .list-group-item:first-child { + border-top: 0; + } + + .app-version-list .list-group-item:last-child { + border-bottom: 0; } \ No newline at end of file diff --git a/public/js/app_control.js b/public/js/app_control.js index 23fc6b0..0dd0cab 100644 --- a/public/js/app_control.js +++ b/public/js/app_control.js @@ -304,25 +304,33 @@ window.onload = async function () { return; } - appVersionListEl.innerHTML = versions.map((v) => { + const rows = versions.map((v) => { const id = String(v?.id || ''); const isActive = activeId && id === activeId; const dateLabel = v?.dateISO ? formatDateTime(v.dateISO) : '—'; const msg = escapeHtml(String(v?.message || '').trim()); - return ` -
-
-
- ${escapeHtml(String(v?.version || '—'))} - ${isActive ? 'Active' : ''} -
-
${escapeHtml(dateLabel)}${msg ? ` — ${msg}` : ''}
-
- -
- `; + const versionLabel = escapeHtml(String(v?.version || '—')); + const activeBadge = isActive ? 'Active' : ''; + + // IMPORTANT: keep markup compact (no preserved whitespace surprises). + return ( + `
` + + `
` + + `
` + + `${versionLabel}` + + `${activeBadge}` + + `
` + + `
${escapeHtml(dateLabel)}${msg ? ` — ${msg}` : ''}
` + + `
` + + `
` + + `` + + `
` + + `
` + ); }).join(''); + appVersionListEl.innerHTML = `
${rows}
`; + appVersionListEl.querySelectorAll('button[data-app-version-delete]').forEach((btn) => { btn.addEventListener('click', async () => { const id = btn.getAttribute('data-app-version-delete'); -- 2.54.0