Fix topup page: resolve JS error, improve styling, remove redundant buttons

This commit is contained in:
southseact-3d
2026-02-11 18:27:02 +00:00
parent 277ee351bf
commit e2a2dff301

View File

@@ -75,9 +75,9 @@
} }
.shell { .shell {
max-width: 1180px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding: 32px 20px 48px; padding: 0 24px 64px;
} }
.topbar { .topbar {
@@ -195,16 +195,26 @@
} }
.btn.primary { .btn.primary {
background: var(--shopify-green); background: linear-gradient(135deg, #008060 0%, #004c3f 100%);
color: #fff; color: #fff;
border: none; border: none;
box-shadow: 0 4px 12px rgba(0, 128, 96, 0.15); box-shadow: 0 4px 14px rgba(0, 128, 96, 0.25);
font-weight: 600;
padding: 14px 24px;
margin-top: auto;
} }
.btn.primary:hover { .btn.primary:hover {
background: var(--shopify-green-dark); background: linear-gradient(135deg, #00664d 0%, #003d33 100%);
box-shadow: 0 6px 16px rgba(0, 128, 96, 0.25); box-shadow: 0 6px 20px rgba(0, 128, 96, 0.35);
transform: translateY(-1px); transform: translateY(-2px);
}
.btn.primary:disabled {
background: #9ca3af;
cursor: not-allowed;
transform: none;
box-shadow: none;
} }
.btn.ghost { .btn.ghost {
@@ -219,61 +229,76 @@
.grid { .grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-template-columns: repeat(2, 1fr);
gap: 16px; gap: 24px;
max-width: 900px;
margin: 0 auto;
}
@media (max-width: 768px) {
.grid {
grid-template-columns: 1fr;
gap: 20px;
}
} }
.card { .card {
background: #fff; background: #fff;
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 14px; border-radius: 16px;
padding: 24px; padding: 28px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 12px;
position: relative; position: relative;
transition: all 0.2s ease; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
} }
.card:hover { .card:hover {
transform: translateY(-2px); transform: translateY(-4px);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08); box-shadow: 0 20px 25px -5px rgba(0, 128, 96, 0.1), 0 10px 10px -5px rgba(0, 128, 96, 0.04);
border-color: rgba(0, 128, 96, 0.2); border-color: rgba(0, 128, 96, 0.3);
} }
.pill { .pill {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
padding: 6px 12px; padding: 6px 14px;
border-radius: 999px; border-radius: 999px;
font-size: 12px; font-size: 11px;
font-weight: 700; font-weight: 700;
letter-spacing: 0.02em; letter-spacing: 0.05em;
background: var(--shopify-green-light); text-transform: uppercase;
color: var(--shopify-green); background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
border: 1px solid rgba(0, 128, 96, 0.15); color: #15803d;
border: 1px solid rgba(0, 128, 96, 0.2);
width: fit-content;
} }
.muted { .muted {
color: var(--muted); color: #4b5563;
font-size: 14px; font-size: 15px;
line-height: 1.5; line-height: 1.5;
font-weight: 500;
} }
.price { .price {
font-size: 36px; font-size: 42px;
font-weight: 700; font-weight: 800;
letter-spacing: -0.01em; letter-spacing: -0.03em;
color: #0f172a; color: #0f172a;
line-height: 1;
margin: 8px 0;
} }
.old-price { .old-price {
color: var(--muted); color: #9ca3af;
text-decoration: line-through; text-decoration: line-through;
font-weight: 500; font-weight: 500;
font-size: 20px; font-size: 22px;
margin-left: 8px;
} }
.status { .status {
@@ -310,16 +335,18 @@
} }
.discount { .discount {
color: #166534; color: #15803d;
font-weight: 700; font-weight: 600;
font-size: 13px; font-size: 13px;
margin-top: 4px;
} }
.products-label { .products-label {
font-size: 18px; font-size: 20px;
font-weight: 700; font-weight: 700;
margin-bottom: 20px; margin-bottom: 24px;
color: #0f172a; color: #0f172a;
text-align: center;
} }
.payment-modal-overlay { .payment-modal-overlay {
@@ -433,9 +460,12 @@
.nav-bar { .nav-bar {
background: white; background: white;
border-bottom: 1px solid #e9ecef; border-bottom: 1px solid #e5e7eb;
padding: 16px 24px; padding: 16px 24px;
margin-bottom: 32px; margin-bottom: 40px;
position: sticky;
top: 0;
z-index: 100;
} }
.nav-content { .nav-content {
@@ -1110,10 +1140,7 @@
<h1 class="title">Token Top-ups</h1> <h1 class="title">Token Top-ups</h1>
<p class="subtitle">Purchase additional AI credits with automatic plan discounts (Professional: 2.5% off, Enterprise: 5% off)</p> <p class="subtitle">Purchase additional AI credits with automatic plan discounts (Professional: 2.5% off, Enterprise: 5% off)</p>
</div> </div>
<div class="actions">
<a class="btn ghost" href="/builder">Back to builder</a>
<a class="btn ghost" href="/settings">Account</a>
</div>
</div> </div>
<div id="status" class="status"></div> <div id="status" class="status"></div>
@@ -1143,6 +1170,25 @@
<div id="cards" class="grid"></div> <div id="cards" class="grid"></div>
</div> </div>
<!-- Custom Checkout Modal -->
<div id="custom-checkout-overlay" class="custom-checkout-modal-overlay">
<div class="custom-checkout-modal" id="custom-checkout-modal">
<div class="custom-checkout-header">
<h3 id="checkout-title">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect>
<line x1="1" y1="10" x2="23" y2="10"></line>
</svg>
Complete Payment
</h3>
<button class="custom-checkout-close" id="custom-checkout-close">&times;</button>
</div>
<div class="custom-checkout-body" id="custom-checkout-body">
<!-- Content will be dynamically inserted -->
</div>
</div>
</div>
<script> <script>
const statusEl = document.getElementById('status'); const statusEl = document.getElementById('status');
const cardsEl = document.getElementById('cards'); const cardsEl = document.getElementById('cards');
@@ -2085,33 +2131,6 @@
} }
}; };
</script> </script>
<footer style="margin-top: 80px; padding: 40px 24px; border-top: 1px solid #e1e3e5; text-align: center; color: #6d7175; font-size: 0.875rem;">
<p>&copy; 2026 Plugin Compass. All rights reserved.</p>
<div style="margin-top: 12px; display: flex; justify-content: center; gap: 16px;">
<a href="/terms" style="color: #008060; text-decoration: none;">Terms</a>
<a href="/privacy" style="color: #008060; text-decoration: none;">Privacy</a>
<a href="/contact" style="color: #008060; text-decoration: none;">Contact Us</a>
</div>
</footer>
<!-- Custom Checkout Modal -->
<div id="custom-checkout-overlay" class="custom-checkout-modal-overlay">
<div class="custom-checkout-modal" id="custom-checkout-modal">
<div class="custom-checkout-header">
<h3 id="checkout-title">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect>
<line x1="1" y1="10" x2="23" y2="10"></line>
</svg>
Complete Payment
</h3>
<button class="custom-checkout-close" id="custom-checkout-close">&times;</button>
</div>
<div class="custom-checkout-body" id="custom-checkout-body">
<!-- Content will be dynamically inserted -->
</div>
</div>
</div>
</body> </body>
</html> </html>