Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nano2dev committed Mar 4, 2024
1 parent efe619c commit ed4daa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,12 @@ <h1 class="smaller">NanoPay.js</h1>
address: '@development', // required
// amount: 30, // required
notify: '[email protected]',
// debug: true,
contact: true,
// button: "Open Cake",
// wallet: "cake",
// random: false,
strings: {
email_placeholder: 'Required *',
shipping_placeholder: 'Required *',
},
line_items: [
{ name: "Shirt (X-Small)", price: 0.122 },
{ name: "Mens Shoes (9.5)", price: 0 }
Expand Down
10 changes: 6 additions & 4 deletions latest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// NanoPay 1.1.1
// NanoPay 1.1.2
// February 28, 2024
// https://github.com/fwd/NanoPay
// (c) @nano2dev <[email protected]>
Expand All @@ -14,7 +14,7 @@
window.check_interval = false
window.expiration_interval = false

if (window.NanoPay === undefined) window.NanoPay = { version: '1.1.1', support: '[email protected]' }
if (window.NanoPay === undefined) window.NanoPay = { version: '1.1.2', support: '[email protected]' }

if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
window.NanoPay.dark_mode = true
Expand Down Expand Up @@ -337,6 +337,8 @@
quantity: config.strings && config.strings.quantity ? config.strings.quantity : 'Amount',
alias: config.strings && config.strings.alias ? config.strings.alias : 'Your Name',
account: config.strings && config.strings.account ? config.strings.account : 'Account',
email_placeholder: config.strings && config.strings.email_placeholder ? config.strings.email_placeholder : 'N/A',
shipping_placeholder: config.strings && config.strings.shipping_placeholder ? config.strings.shipping_placeholder : 'N/A',
}

if (!wallets[wallet]) return alert("NanoPay: Invalid wallet option. Supported: natrium, nault, nautilus, cake.")
Expand Down Expand Up @@ -570,13 +572,13 @@
<div style="display: ${config.contact ? 'flex' : 'none'}" onclick="window.NanoPay.configEmailAddress()" id="nano-pay-contact">
<div id="nano-pay-contact-label">${strings.email}</div>
<div id="nano-pay-user-contact-email" style="line-height: 1.1; opacity: ${window.NanoPay.config.contact_email ? '1' : '0.5'}">${window.NanoPay.config.contact_email || 'N/A'}</div>
<div id="nano-pay-user-contact-email" style="line-height: 1.1; opacity: ${window.NanoPay.config.contact_email ? '1' : '0.5'}">${window.NanoPay.config.contact_email || strings.email_placeholder}</div>
<svg id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "></polygon></svg>
</div>
<div style="display: ${Number(config.shipping) || config.shipping === true || config.shipping === "true" ? 'flex' : 'none'}" onclick="window.NanoPay.configMailingAddress()" id="nano-pay-shipping">
<div id="nano-pay-shipping-label">${strings.shipping}</div>
<div id="nano-pay-user-mailing-address" style="line-height: 1.1; opacity: ${window.NanoPay.config.mailing_address ? '1' : '0.5'}">${window.NanoPay.config.mailing_address || 'N/A'}</div>
<div id="nano-pay-user-mailing-address" style="line-height: 1.1; opacity: ${window.NanoPay.config.mailing_address ? '1' : '0.5'}">${window.NanoPay.config.mailing_address || strings.shipping_placeholder}</div>
<svg id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "></polygon></svg>
</div>
Expand Down

0 comments on commit ed4daa2

Please sign in to comment.