diff --git a/pyproject.toml b/pyproject.toml index 89933cb..71397c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ name = "lnbits-satspay" version = "0.0.0" description = "LNbits, free and open-source Lightning wallet and accounts system." authors = ["Alan Bits "] +package-mode = false [tool.poetry.dependencies] python = "^3.10 | ^3.9" diff --git a/static/js/display.js b/static/js/display.js index 70a3966..0305ad5 100644 --- a/static/js/display.js +++ b/static/js/display.js @@ -1,7 +1,6 @@ window.app = Vue.createApp({ el: '#vue', mixins: [window.windowMixin], - delimiters: ['${', '}'], data() { return { charge: mapCharge(charge_data), @@ -20,7 +19,7 @@ window.app = Vue.createApp({ return `${url}/address/${this.charge.onchainaddress}` }, unifiedQR() { - const bitcoin = (this.charge.onchainaddress || '').toUpperCase() + const bitcoin = (this.charge.onchainaddress ?? '').toUpperCase() let queryString = `bitcoin:${bitcoin}?amount=${( this.charge.amount / 1e8 ).toFixed(8)}` @@ -38,7 +37,7 @@ window.app = Vue.createApp({ } }, methods: { - initWs: async function () { + async initWs() { const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws' const url = `${protocol}://${window.location.host}/satspay/${this.charge.id}/ws` this.ws = new WebSocket(url) @@ -75,7 +74,10 @@ window.app = Vue.createApp({ }) } }, - created: async function () { + async created() { + if (!this.charge.onchainaddress) { + this.tab = 'ln' + } // add custom-css to make overrides easier if (this.charge.custom_css) { document.body.setAttribute('id', 'custom-css') diff --git a/templates/satspay/display.html b/templates/satspay/display.html index 55607a1..9e42428 100644 --- a/templates/satspay/display.html +++ b/templates/satspay/display.html @@ -3,13 +3,12 @@
-
${charge.name || 'LNbits SatsPay'}
+
- ${line} -
+ v-text="line" + >
@@ -19,8 +18,8 @@ ${charge.id} + v-text="charge.id" + > @@ -56,7 +55,8 @@ - ${charge.pending} sats + +  sats @@ -68,10 +68,11 @@ - ${charge.amount - charge.balance > 0 ? charge.amount - - charge.balance : 0} sats + +  sats