fix: PIN copy shows inline Copied! feedback for 30 seconds
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 16s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 31s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled

- Wrap PIN text in .mokosuiteclient-pin-text span for all badge contexts
- Change revert timeout from 1.5s to 30s so PIN is readable during support calls
- Fix post-request badge rebuild to include text span for copy feedback
This commit is contained in:
2026-06-25 11:45:43 -05:00
parent c4391e50a3
commit 5811dac4aa
@@ -150,7 +150,7 @@ class SupportPinHelper
else
{
$html .= '<span class="badge bg-dark mokosuiteclient-pin-copy" style="font-family:monospace;letter-spacing:0.08em;cursor:pointer;" title="Click to copy" data-pin="' . $escaped . '">';
$html .= '<span class="icon-key small me-1" aria-hidden="true"></span>' . $escaped . '</span>';
$html .= '<span class="icon-key small me-1" aria-hidden="true"></span><span class="mokosuiteclient-pin-text">' . $escaped . '</span></span>';
}
}
else
@@ -193,7 +193,7 @@ document.addEventListener('DOMContentLoaded', function() {
if (textEl) {
var orig = textEl.textContent;
textEl.textContent = 'Copied!';
setTimeout(function() { textEl.textContent = orig; }, 1500);
setTimeout(function() { textEl.textContent = orig; }, 30000);
} else {
Joomla.renderMessages({message: ['PIN copied: ' + pin]});
}
@@ -225,14 +225,14 @@ document.addEventListener('DOMContentLoaded', function() {
} else {
btn.className = 'badge bg-dark mokosuiteclient-pin-copy';
btn.style = 'font-family:monospace;letter-spacing:0.08em;cursor:pointer;';
btn.innerHTML = '<span class="icon-key small me-1" aria-hidden="true"></span>' + data.pin;
btn.innerHTML = '<span class="icon-key small me-1" aria-hidden="true"></span><span class="mokosuiteclient-pin-text">' + data.pin + '</span>';
}
btn.addEventListener('click', function(ev) {
ev.preventDefault();
ev.stopPropagation();
navigator.clipboard.writeText(data.pin).then(function() {
var t = btn.querySelector('.mokosuiteclient-pin-text');
if (t) { var o = t.textContent; t.textContent = 'Copied!'; setTimeout(function() { t.textContent = o; }, 1500); }
if (t) { var o = t.textContent; t.textContent = 'Copied!'; setTimeout(function() { t.textContent = o; }, 30000); }
else { Joomla.renderMessages({message: ['PIN copied: ' + data.pin]}); }
});
});