This commit is contained in:
nate 2026-03-25 23:09:08 +04:00
parent d636bcb3e7
commit cfd7e8173a
1 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@
<span class="w-1.5 h-1.5 rounded-full <%= inv.status === 'underpaid' ? 'bg-yellow-500' : 'bg-blue-500' %> animate-pulse"></span>
<span class="text-xs <%= inv.status === 'underpaid' ? 'text-yellow-400' : 'text-gray-400' %>"><%= inv.status === 'underpaid' ? 'Underpaid, send the rest' : 'Waiting for payment' %></span>
</div>
<span id="timer" class="text-xs text-gray-500 font-mono" data-expires="<%= expiresAt.toISOString() %>"><%= mins %>:<%= String(secs).padStart(2, '0') %></span>
<span id="timer" class="text-xs text-gray-500 font-mono" data-left="<%= remainingSec %>"><%= mins %>:<%= String(secs).padStart(2, '0') %></span>
</div>
<% } else if (inv.status === 'confirming') { %>
@ -268,7 +268,7 @@
// Countdown timer
const timerEl = document.getElementById('timer');
if (timerEl) {
let left = <%= remainingSec %>;
let left = parseInt(timerEl.dataset.left);
setInterval(() => {
left = Math.max(0, left - 1);
timerEl.textContent = Math.floor(left / 60) + ':' + String(left % 60).padStart(2, '0');