fix: 2
This commit is contained in:
parent
d636bcb3e7
commit
cfd7e8173a
|
|
@ -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="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>
|
<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>
|
</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>
|
</div>
|
||||||
|
|
||||||
<% } else if (inv.status === 'confirming') { %>
|
<% } else if (inv.status === 'confirming') { %>
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
// Countdown timer
|
// Countdown timer
|
||||||
const timerEl = document.getElementById('timer');
|
const timerEl = document.getElementById('timer');
|
||||||
if (timerEl) {
|
if (timerEl) {
|
||||||
let left = <%= remainingSec %>;
|
let left = parseInt(timerEl.dataset.left);
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
left = Math.max(0, left - 1);
|
left = Math.max(0, left - 1);
|
||||||
timerEl.textContent = Math.floor(left / 60) + ':' + String(left % 60).padStart(2, '0');
|
timerEl.textContent = Math.floor(left / 60) + ':' + String(left % 60).padStart(2, '0');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue