Skip to content

Commit

Permalink
10.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
nano2dev committed Mar 28, 2024
1 parent 1edb2dd commit 6a7d2f7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions appcache
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ dist/vue.min.js
dist/axios.min.js
dist/easy.qrcode.min.js
dist/nanocurrency.min.js
dist/style.css?v=10.2.6
dist/app.js?v=10.2.6
dist/style.css?v=10.2.7
dist/app.js?v=10.2.7
17 changes: 12 additions & 5 deletions dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ var nano = new Vue({
custom = item.metadata.split('&').find(a => a.includes('custom=')).replace('?', '').replace('custom=', '').trim()
}


// configure custom in metdata
if (item && item.metadata && item.metadata.includes('message=')) {
item.message = item.metadata.split('&').find(a => a.includes('message=')).replace('?', '').replace('message=', '').trim()
}

// configure random in metdata
if (item && item.metadata && item.metadata.includes('random=')) {
random = item.metadata.split('&').find(a => a.includes('random=')).replace('?', '').replace('random=', '').trim()
Expand Down Expand Up @@ -630,9 +636,8 @@ var nano = new Vue({
}
this.checkout = {
title: query.title || item.name,
// title: query.title || item.title || item.name, // safari is trash
currency: query.currency || query.c || 'NANO',
message: query.body || query.message || query.text || query.copy,
message: item.message,
fullscreen: item.cancel ? false : true,
image: item.image || query.image || query.img || query.i || '',
address: query.address || query.to || item.address,
Expand Down Expand Up @@ -864,12 +869,14 @@ var nano = new Vue({
},
show_success(block, message) {
var query = this.queryToObject()
var delay = this.checkout.redirect_delay || 4000
if (this.checkout.message) delay = 10000
redirect = query.redirect || query.success || this.checkout.success_url
this.success = {
block,
confetti: true,
title: this.checkout.goal ? this.checkout.goal.title : 'Success',
message: message || (this.checkout.goal ? (this.strings[this.lang] ? this.strings[this.lang].donated : this.strings['en'].donated) : (this.strings[this.lang] ? this.strings[this.lang].payment_send : this.strings['en'].payment_send)),
message: this.checkout.message || message || (this.checkout.goal ? (this.strings[this.lang] ? this.strings[this.lang].donated : this.strings['en'].donated) : (this.strings[this.lang] ? this.strings[this.lang].payment_send : this.strings['en'].payment_send)),
redirect: this.checkout.goal ? false : redirect,
}
if (this.checkout.goal) {
Expand All @@ -881,10 +888,10 @@ var nano = new Vue({
balance: Number(account_info.balance).toFixed(2),
pending: account_info.pending
}
this.notify('Donated')
this.notify(`Donated to ${this.checkout.goal.title}`)
this.success = false
this.buttonText = false
}, this.checkout.redirect_delay || 4000)
}, delay)
return
}
if (redirect) {
Expand Down
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<meta property="twitter:image" content="../../dist/images/cover.png">
<link rel="apple-touch-icon" href="../../dist/images/new_icon.png">
<link rel="icon" type="image/png" href="../../dist/favicon.png">
<link rel="stylesheet" href="../../dist/style.css?v=10.2.6">
<link rel="stylesheet" href="../../dist/big-picture.css?v=10.2.6">
<link rel="stylesheet" href="../../dist/style.css?v=10.2.7">
<link rel="stylesheet" href="../../dist/big-picture.css?v=10.2.7">
<link rel="manifest" href="../../dist/manifest.json">
<script>
function queryToObject(string) {
Expand Down Expand Up @@ -61,7 +61,7 @@
<div v-if="success" id="success" @click="success = false">
<div>
<h3 class="success-title">{{ success.title || (strings[lang] ? strings[lang].success : strings['en'].success) }}</h3>
<p style="margin-bottom: 0">{{ success.message }}</p>
<p style="margin-bottom: 0" v-html="success.message"></p>
<button v-if="checkout.fullscreen && success.button" class="btn" :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`" @click="redirect()">
<span>{{ success.button }}</span>
</button>
Expand Down Expand Up @@ -356,6 +356,6 @@ <h1 v-if="!checkout.amount" :style="`color:${checkout.color && checkout.color.te
<script src="../../dist/axios.min.js"></script>
<script src="../../dist/easy.qrcode.min.js"></script>
<script src="../../dist/nanocurrency.min.js"></script>
<script src="../../dist/app.js?v=10.2.6"></script>
<script src="../../dist/app.js?v=10.2.7"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion known.json
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@
"github": "nano2dev",
"mastodon": "xno.social/@nano2dev",
"twitter": "nano2dev",
"metadata": "plans=Tip:0.133,Beta Tester (100 Max):20,Your Name on Github Readme (10 Max):100,Your Name on App Store (8 Max):250,Your Name on Github + App Store (4 Max):500&custom=true",
"metadata": "plans=Tip:0.133,Beta Tester (100 Max):20,Your Name on Github Readme (10 Max):100,Your Name on App Store (8 Max):250,Your Name on Github + App Store (4 Max):500&custom=true&message=Thanks for donating. To receive mention contact <a target='_blank' href='mailto:[email protected]' style='border-bottom: 1px solid;'>[email protected]</a>",
"location": "US-East"
},
{
Expand Down

0 comments on commit 6a7d2f7

Please sign in to comment.