update: ....
This commit is contained in:
@@ -52,14 +52,14 @@
|
||||
<h2 class="text-sm font-semibold text-gray-300 mb-4">Invoices</h2>
|
||||
<div class="space-y-2">
|
||||
<% it.invoices.forEach(function(inv) {
|
||||
const statusColors = { paid: 'green', confirming: 'blue', pending: 'yellow' };
|
||||
const statusColors = { paid: 'green', confirming: 'blue', pending: 'yellow', underpaid: 'orange' };
|
||||
const statusColor = statusColors[inv.status] || 'gray';
|
||||
const date = new Date(inv.created_at).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' });
|
||||
const planLabel = inv.plan === 'lifetime' ? 'Lifetime' : `Pro × ${inv.months}mo`;
|
||||
%>
|
||||
<div class="flex items-center justify-between p-3 bg-gray-800/50 rounded-lg border border-gray-700/50">
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="w-2 h-2 rounded-full bg-<%= statusColor %>-500 <%= inv.status === 'pending' || inv.status === 'confirming' ? 'animate-pulse' : '' %>"></span>
|
||||
<span class="w-2 h-2 rounded-full bg-<%= statusColor %>-500 <%= inv.status !== 'paid' ? 'animate-pulse' : '' %>"></span>
|
||||
<div>
|
||||
<span class="text-sm text-gray-200"><%= planLabel %></span>
|
||||
<span class="text-xs text-gray-600 ml-2">$<%= Number(inv.amount_usd).toFixed(2) %> · <%= inv.coin.toUpperCase() %></span>
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="text-xs text-gray-500"><%= date %></span>
|
||||
<% if (inv.status === 'pending' || inv.status === 'confirming') { %>
|
||||
<% if (inv.status === 'pending' || inv.status === 'underpaid' || inv.status === 'confirming') { %>
|
||||
<a href="/dashboard/checkout/<%= inv.id %>" class="text-xs text-blue-400 hover:text-blue-300">View</a>
|
||||
<% } else if (inv.status === 'paid' && inv.txid) { %>
|
||||
<span class="text-xs text-green-500/70">Paid</span>
|
||||
|
||||
Reference in New Issue
Block a user