From cce99a8fc2fc2b6395326ee7041dcb3e7eabe71f Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Wed, 24 Sep 2025 18:23:01 -0400 Subject: [PATCH] Add mps-button-red CSS class and use it for crypto page buttons - Add mps-button-red class with #bc2131 color and 0.8 opacity - Replace inline button styles with CSS classes on crypto checkout - Use mps-button-green for copy/wallet buttons - Use mps-button-red for cancel button - Fix TypeError by converting Decimal fee_buffer to float - Update JavaScript invoice link to use mps-button-blue class --- make_post_sell/static/css/common.css | 5 +++++ make_post_sell/templates/crypto_checkout.j2 | 10 +++++----- make_post_sell/views/crypto.py | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/make_post_sell/static/css/common.css b/make_post_sell/static/css/common.css index 55ef6ad..f74871e 100644 --- a/make_post_sell/static/css/common.css +++ b/make_post_sell/static/css/common.css @@ -292,6 +292,11 @@ a.mps-button-green, button.mps-button-green { background-color: #a3c765; } +a.mps-button-red, +button.mps-button-red { + background-color: #bc2131; + opacity: 0.8; +} a.product-edit-button { background-color: #98b6fa; diff --git a/make_post_sell/templates/crypto_checkout.j2 b/make_post_sell/templates/crypto_checkout.j2 index 9e90f36..6136b24 100644 --- a/make_post_sell/templates/crypto_checkout.j2 +++ b/make_post_sell/templates/crypto_checkout.j2 @@ -19,11 +19,11 @@
{{ address }}
- - - Open in Wallet + + + Open in Wallet {% if status == 'pending' %} - + {% endif %}
@@ -200,7 +200,7 @@ const invoiceLink = document.createElement('a'); invoiceLink.href = invoiceUrl || '/u/purchases'; invoiceLink.className = 'mps-button'; - invoiceLink.style.background = '#17a2b8'; + invoiceLink.classList.add('mps-button-blue'); invoiceLink.style.textAlign = 'center'; invoiceLink.style.display = 'block'; invoiceLink.textContent = invoiceUrl ? 'View Invoice' : 'View Purchases'; diff --git a/make_post_sell/views/crypto.py b/make_post_sell/views/crypto.py index af4478e..122d3f9 100644 --- a/make_post_sell/views/crypto.py +++ b/make_post_sell/views/crypto.py @@ -584,7 +584,7 @@ def crypto_quote(request): * 2 ) - amount_crypto_base = amount_crypto_with_fee - fee_buffer + amount_crypto_base = amount_crypto_with_fee - float(fee_buffer) return { "cart": None, # Quote page doesn't need cart context