From b89d86bf66f6a89faa43dd2238b3c2a069337250 Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Thu, 8 Jan 2026 14:30:19 +0100 Subject: [PATCH] Auto-commit local changes before build (2026-01-08 14:30:19) --- .last-branch | 2 +- .../src/templates/main/run_checks.html | 29 +++++++++++++++++-- docs/changelog.md | 8 +++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.last-branch b/.last-branch index 0783501..bad35ef 100644 --- a/.last-branch +++ b/.last-branch @@ -1 +1 @@ -v20260108-31-inbox-empty-body-attachment-render +v20260108-32-runchecks-ticket-copy-button diff --git a/containers/backupchecks/src/templates/main/run_checks.html b/containers/backupchecks/src/templates/main/run_checks.html index 171b4ca..58b2d11 100644 --- a/containers/backupchecks/src/templates/main/run_checks.html +++ b/containers/backupchecks/src/templates/main/run_checks.html @@ -661,12 +661,14 @@ table.addEventListener('change', function (e) { html += '
Tickets
'; tickets.forEach(function (t) { var status = t.resolved_at ? 'Resolved' : 'Active'; + var ticketCode = (t.ticket_code || '').toString(); html += '
' + '
' + '
' + '
' + '🎫' + - '' + escapeHtml(t.ticket_code || '') + '' + + '' + escapeHtml(ticketCode) + '' + + '' + '' + status + '' + '
' + '
' + @@ -709,7 +711,30 @@ table.addEventListener('change', function (e) { ev.preventDefault(); var action = btn.getAttribute('data-action'); var id = btn.getAttribute('data-id'); - if (!action || !id) return; + if (!action) return; + + if (action === 'copy-ticket') { + var code = btn.getAttribute('data-code') || ''; + if (!code) return; + if (navigator.clipboard && navigator.clipboard.writeText) { + navigator.clipboard.writeText(code) + .then(function () { + var original = btn.textContent; + btn.textContent = '✓'; + setTimeout(function () { btn.textContent = original; }, 800); + }) + .catch(function () { + // Fallback: select/copy via prompt + window.prompt('Copy ticket number:', code); + }); + } else { + window.prompt('Copy ticket number:', code); + } + return; + } + + if (!id) return; + if (action === 'resolve-ticket') { if (!confirm('Mark ticket as resolved?')) return; apiJson('/api/tickets/' + encodeURIComponent(id) + '/resolve', {method: 'POST', body: '{}'}) diff --git a/docs/changelog.md b/docs/changelog.md index 034ccf0..1149530 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -45,6 +45,14 @@ - Inbox import: when the Graph body is effectively empty and an EML is stored, extract the first HTML attachment and store it as html_body. - Inbox message detail: for already-stored messages with effectively empty bodies, dynamically fall back to extracting the HTML attachment from the stored EML so the Inbox popup shows the report without requiring a reset. +--- + +## v20260108-32-runchecks-ticket-copy-button + +- Added a small copy icon next to the ticket number in the Run Checks popup. +- Implemented copy-to-clipboard functionality to copy only the ticket number. +- Prevented accidental selection of the appended status text (e.g. “Active”) when copying tickets. + ================================================================================================================================================ ## v0.1.18 -- 2.45.2