feat: add plan stacking
This commit is contained in:
@@ -51,8 +51,18 @@
|
||||
</div>
|
||||
<% } else if ((plan === 'pro' || plan === 'pro2x' || plan === 'pro4x') && it.account.plan_expires_at) { %>
|
||||
<div class="mt-4 pt-4 border-t divider text-xs text-gray-500">
|
||||
Pro plan expires <%= new Date(it.account.plan_expires_at).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) %>.
|
||||
<%= planLabel %> expires <%= new Date(it.account.plan_expires_at).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) %>.
|
||||
<a href="/dashboard/checkout" class="text-blue-400 hover:text-blue-300 ml-1">Extend or upgrade to Lifetime</a>
|
||||
<% const stack = it.account.plan_stack || [];
|
||||
if (stack.length > 0) {
|
||||
const planNames = { free: 'Free', pro: 'Pro', pro2x: 'Pro 2x', pro4x: 'Pro 4x', lifetime: 'Lifetime' };
|
||||
const parts = stack.map(function(s) {
|
||||
const name = planNames[s.plan] || s.plan;
|
||||
return s.remaining_days == null ? name : name + ' (' + s.remaining_days + 'd)';
|
||||
});
|
||||
%>
|
||||
<div class="mt-1 text-gray-600">Then: <%= parts.join(' → ') %></div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user