diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 608e2417..18c8d5d6 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -15,3 +15,12 @@ jobs: - run: python3 -m venv venv - run: ./venv/bin/pip install black - run: make checkblack + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - run: sudo apt-get install python3-venv + - run: python3 -m venv venv + - run: npm install prettier + - run: ./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js \ No newline at end of file diff --git a/lnbits/core/templates/core/_api_docs.html b/lnbits/core/templates/core/_api_docs.html index 5df37676..271568d4 100644 --- a/lnbits/core/templates/core/_api_docs.html +++ b/lnbits/core/templates/core/_api_docs.html @@ -48,7 +48,8 @@ {"X-Api-Key": "{{ wallet.inkey }}"}
Body (application/json)
{"out": false, "amount": <int>, "memo": <string>, "unit": <string>, "webhook": <url:string>}{"out": false, "amount": <int>, "memo": <string>, "unit": + <string>, "webhook": <url:string>}
Returns 201 CREATED (application/json) @@ -61,8 +62,8 @@ curl -X POST {{ request.base_url }}api/v1/payments -d '{"out": false, "amount": <int>, "memo": <string>, "webhook": - <url:string>, "unit": <string>}' -H "X-Api-Key: {{ wallet.inkey }}" -H - "Content-type: application/json"{{ wallet.inkey }}" -H "Content-type: application/json" diff --git a/lnbits/extensions/copilot/templates/copilot/_api_docs.html b/lnbits/extensions/copilot/templates/copilot/_api_docs.html index f0002611..eed25169 100644 --- a/lnbits/extensions/copilot/templates/copilot/_api_docs.html +++ b/lnbits/extensions/copilot/templates/copilot/_api_docs.html @@ -31,8 +31,8 @@ [<copilot_object>, ...]
Curl example
curl -X POST {{ request.base_url }}copilot/api/v1/copilot -d '{"title": - <string>, "animation": <string>, + >curl -X POST {{ request.base_url }}copilot/api/v1/copilot -d + '{"title": <string>, "animation": <string>, "show_message":<string>, "amount": <integer>, "lnurl_title": <string>}' -H "Content-type: application/json" -H "X-Api-Key: {{user.wallets[0].adminkey }}" @@ -59,11 +59,11 @@
Curl example
curl -X POST {{ request.base_url - }}copilot/api/v1/copilot/<copilot_id> -d '{"title": <string>, - "animation": <string>, "show_message":<string>, - "amount": <integer>, "lnurl_title": <string>}' -H - "Content-type: application/json" -H "X-Api-Key: - {{user.wallets[0].adminkey }}" + }}copilot/api/v1/copilot/<copilot_id> -d '{"title": + <string>, "animation": <string>, + "show_message":<string>, "amount": <integer>, + "lnurl_title": <string>}' -H "Content-type: application/json" + -H "X-Api-Key: {{user.wallets[0].adminkey }}" @@ -87,8 +87,9 @@ [<copilot_object>, ...]
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilot/<copilot_id> - -H "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}copilot/api/v1/copilot/<copilot_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -110,8 +111,8 @@ [<copilot_object>, ...]
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilots -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}copilot/api/v1/copilots -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -161,9 +162,10 @@
Curl example
curl -X GET {{ request.base_url }}copilot/api/v1/copilot/ws/<string, - copilot_id>/<string, comment>/<string, gif name> -H - "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X GET {{ request.base_url + }}copilot/api/v1/copilot/ws/<string, copilot_id>/<string, + comment>/<string, gif name> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html b/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html index 40fcfb12..fcda086a 100644 --- a/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html +++ b/lnbits/extensions/discordbot/templates/discordbot/_api_docs.html @@ -10,12 +10,19 @@ Discord Bot: Connect Discord users to LNbits.

- Connect your LNbits instance to a Discord Bot leveraging LNbits as a community based lightning node.
+ Connect your LNbits instance to a + Discord Bot + leveraging LNbits as a community based lightning node.
- Created by, Chris Lennon
+ Created by, + Chris Lennon +
- Based on User Manager, by Ben ArcBen Arc

@@ -149,8 +156,9 @@ curl -X POST {{ request.base_url }}discordbot/api/v1/users -d '{"admin_id": "{{ user.id }}", "wallet_name": <string>, - "user_name": <string>, "discord_id": <string>}' -H "X-Api-Key: {{ - user.wallets[0].inkey }}" -H "Content-type: application/json" + "user_name": <string>, "discord_id": <string>}' -H + "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type: + application/json" diff --git a/lnbits/extensions/discordbot/templates/discordbot/index.html b/lnbits/extensions/discordbot/templates/discordbot/index.html index 782f8bb6..70965a70 100644 --- a/lnbits/extensions/discordbot/templates/discordbot/index.html +++ b/lnbits/extensions/discordbot/templates/discordbot/index.html @@ -136,7 +136,8 @@
-
LNbits Discord Bot Extension +
+ LNbits Discord Bot Extension
@@ -236,7 +237,12 @@ columns: [ {name: 'id', align: 'left', label: 'ID', field: 'id'}, {name: 'name', align: 'left', label: 'Username', field: 'name'}, - {name: 'discord_id', align: 'left', label: 'discord_id', field: 'discord_id'} + { + name: 'discord_id', + align: 'left', + label: 'discord_id', + field: 'discord_id' + } ], pagination: { rowsPerPage: 10 diff --git a/lnbits/extensions/events/templates/events/index.html b/lnbits/extensions/events/templates/events/index.html index 409ed2af..7f34a3e2 100644 --- a/lnbits/extensions/events/templates/events/index.html +++ b/lnbits/extensions/events/templates/events/index.html @@ -381,10 +381,10 @@ getTickets: function () { var self = this LNbits.api - .request( - 'GET', - '/events/api/v1/tickets?all_wallets=true', - this.g.user.wallets[0].inkey + .request( + 'GET', + '/events/api/v1/tickets?all_wallets=true', + this.g.user.wallets[0].inkey ) .then(function (response) { console.log(response) diff --git a/lnbits/extensions/jukebox/static/js/index.js b/lnbits/extensions/jukebox/static/js/index.js index 049b600e..fe724450 100644 --- a/lnbits/extensions/jukebox/static/js/index.js +++ b/lnbits/extensions/jukebox/static/js/index.js @@ -3,9 +3,9 @@ Vue.component(VueQrcode.name, VueQrcode) var mapJukebox = obj => { - if(obj.sp_device){ + if (obj.sp_device) { obj._data = _.clone(obj) - + obj.sp_id = obj._data.id obj.device = obj._data.sp_device.split('-')[0] playlists = obj._data.sp_playlists.split(',') @@ -17,11 +17,9 @@ var mapJukebox = obj => { obj.playlist = playlistsar.join() console.log(obj) return obj - } - else { + } else { return } - } new Vue({ @@ -87,14 +85,14 @@ new Vue({ var link = _.findWhere(this.JukeboxLinks, {id: linkId}) this.qrCodeDialog.data = _.clone(link) - + this.qrCodeDialog.data.url = window.location.protocol + '//' + window.location.host this.qrCodeDialog.show = true }, getJukeboxes() { self = this - + LNbits.api .request( 'GET', @@ -103,8 +101,7 @@ new Vue({ ) .then(function (response) { self.JukeboxLinks = response.data.map(function (obj) { - - return mapJukebox(obj) + return mapJukebox(obj) }) console.log(self.JukeboxLinks) }) @@ -154,7 +151,7 @@ new Vue({ submitSpotifyKeys() { self = this self.jukeboxDialog.data.user = self.g.user.id - + LNbits.api .request( 'POST', diff --git a/lnbits/extensions/jukebox/templates/jukebox/_api_docs.html b/lnbits/extensions/jukebox/templates/jukebox/_api_docs.html index 2a00da00..f4daaf39 100644 --- a/lnbits/extensions/jukebox/templates/jukebox/_api_docs.html +++ b/lnbits/extensions/jukebox/templates/jukebox/_api_docs.html @@ -37,8 +37,8 @@ [<jukebox_object>, ...]
Curl example
curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + >curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox -H + "X-Api-Key: {{ user.wallets[0].adminkey }}"
@@ -59,8 +59,9 @@ <jukebox_object>
Curl example
curl -X GET {{ request.base_url }}jukebox/api/v1/jukebox/<juke_id> -H - "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X GET {{ request.base_url + }}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" @@ -86,8 +87,8 @@ <jukbox_object>
Curl example
curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d '{"user": - <string, user_id>, "title": <string>, + >curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d + '{"user": <string, user_id>, "title": <string>, "wallet":<string>, "sp_user": <string, spotify_user_account>, "sp_secret": <string, spotify_user_secret>, "sp_access_token": <string, @@ -116,8 +117,9 @@ <jukebox_object>
Curl example
curl -X DELETE {{ request.base_url }}jukebox/api/v1/jukebox/<juke_id> - -H "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X DELETE {{ request.base_url + }}jukebox/api/v1/jukebox/<juke_id> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/livestream/templates/livestream/_api_docs.html b/lnbits/extensions/livestream/templates/livestream/_api_docs.html index 629e5d9c..fb4853ce 100644 --- a/lnbits/extensions/livestream/templates/livestream/_api_docs.html +++ b/lnbits/extensions/livestream/templates/livestream/_api_docs.html @@ -38,8 +38,8 @@ [<livestream_object>, ...]
Curl example
curl -X GET {{ request.base_url }}livestream/api/v1/livestream -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}livestream/api/v1/livestream -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -110,11 +110,11 @@
Curl example
curl -X POST {{ request.base_url }} - livestream/api/v1/livestream/tracks -d - '{"name": <string>, "download_url": <string>, - "price_msat": <integer>, "producer_id": <integer>, - "producer_name": <string>}' -H "Content-type: application/json" - -H "X-Api-Key: {{ user.wallets[0].adminkey }}" + livestream/api/v1/livestream/tracks -d '{"name": <string>, + "download_url": <string>, "price_msat": <integer>, + "producer_id": <integer>, "producer_name": <string>}' -H + "Content-type: application/json" -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html b/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html index dbaa8469..8f9b9b0b 100644 --- a/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html +++ b/lnbits/extensions/lnaddress/templates/lnaddress/_api_docs.html @@ -149,7 +149,13 @@ - + { diff --git a/lnbits/extensions/lnaddress/templates/lnaddress/index.html b/lnbits/extensions/lnaddress/templates/lnaddress/index.html index dffef837..147bd4f6 100644 --- a/lnbits/extensions/lnaddress/templates/lnaddress/index.html +++ b/lnbits/extensions/lnaddress/templates/lnaddress/index.html @@ -191,9 +191,13 @@ type="text" label="Cloudflare API token" > - + Your API key in cloudflare diff --git a/lnbits/extensions/lnticket/templates/lnticket/index.html b/lnbits/extensions/lnticket/templates/lnticket/index.html index 6572d98a..6dafb4c2 100644 --- a/lnbits/extensions/lnticket/templates/lnticket/index.html +++ b/lnbits/extensions/lnticket/templates/lnticket/index.html @@ -120,7 +120,7 @@ - {{ col.label }} + {{ col.label }} @@ -145,11 +145,13 @@ icon="launch" :color="($q.dark.isActive) ? 'grey-7' : 'grey-5'" @click="ticketCard(props)" - > Click to show ticket + > Click to show ticket - {{ col.label == "Ticket" ? col.value.length > 20 ? `${col.value.substring(0, 20)}...` : col.value : col.value }} + {{ col.label == "Ticket" ? col.value.length > 20 ? + `${col.value.substring(0, 20)}...` : col.value : col.value }} @@ -410,7 +412,7 @@ }) }) }, - ticketCard(ticket){ + ticketCard(ticket) { this.ticketDialog.show = true let {date, email, ltext, name} = ticket.row this.ticketDialog.data = { @@ -469,7 +471,7 @@ }, updateformDialog: function (formId) { var link = _.findWhere(this.forms, {id: formId}) - console.log("LINK", link) + console.log('LINK', link) this.formDialog.data.id = link.id this.formDialog.data.wallet = link.wallet diff --git a/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html b/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html index e255d4a0..d5b4b5b8 100644 --- a/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html +++ b/lnbits/extensions/lnurldevice/templates/lnurldevice/_api_docs.html @@ -39,8 +39,8 @@ [<lnurldevice_object>, ...]
Curl example
curl -X POST {{ request.base_url }}lnurldevice/api/v1/lnurlpos -d '{"title": - <string>, "message":<string>, "currency": + >curl -X POST {{ request.base_url }}lnurldevice/api/v1/lnurlpos -d + '{"title": <string>, "message":<string>, "currency": <integer>}' -H "Content-type: application/json" -H "X-Api-Key: {{user.wallets[0].adminkey }}" @@ -104,8 +104,8 @@
Curl example
curl -X GET {{ request.base_url - }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: + {{ user.wallets[0].inkey }}"
@@ -159,8 +159,8 @@
Curl example
curl -X DELETE {{ request.base_url - }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + }}lnurldevice/api/v1/lnurlpos/<lnurldevice_id> -H "X-Api-Key: + {{ user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html b/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html index b51e2556..24d19484 100644 --- a/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html +++ b/lnbits/extensions/lnurldevice/templates/lnurldevice/index.html @@ -480,12 +480,11 @@ updatedData ) .then(function (response) { - self.lnurldeviceLinks = _.reject( - self.lnurldeviceLinks, - function (obj) { - return obj.id === updatedData.id - } - ) + self.lnurldeviceLinks = _.reject(self.lnurldeviceLinks, function ( + obj + ) { + return obj.id === updatedData.id + }) self.lnurldeviceLinks.push(maplnurldevice(response.data)) self.formDialoglnurldevice.show = false self.clearFormDialoglnurldevice() diff --git a/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html b/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html index bf920558..200865fb 100644 --- a/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html +++ b/lnbits/extensions/lnurlp/templates/lnurlp/_api_docs.html @@ -17,8 +17,8 @@ [<pay_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}lnurlp/api/v1/links -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}lnurlp/api/v1/links -H "X-Api-Key: + {{ user.wallets[0].inkey }}" @@ -39,8 +39,8 @@ {"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -H - "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}lnurlp/api/v1/links/<pay_id> + -H "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -68,11 +68,11 @@ {"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}lnurlp/api/v1/links -d '{"description": - <string>, "amount": <integer>, "max": <integer>, - "min": <integer>, "comment_chars": <integer>}' -H - "Content-type: application/json" -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + >curl -X POST {{ request.base_url }}lnurlp/api/v1/links -d + '{"description": <string>, "amount": <integer>, "max": + <integer>, "min": <integer>, "comment_chars": + <integer>}' -H "Content-type: application/json" -H "X-Api-Key: + {{ user.wallets[0].adminkey }}" @@ -99,8 +99,8 @@ {"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -d - '{"description": <string>, "amount": <integer>}' -H + >curl -X PUT {{ request.base_url }}lnurlp/api/v1/links/<pay_id> + -d '{"description": <string>, "amount": <integer>}' -H "Content-type: application/json" -H "X-Api-Key: {{ user.wallets[0].adminkey }}" @@ -126,8 +126,9 @@
Curl example
curl -X DELETE {{ request.base_url }}lnurlp/api/v1/links/<pay_id> -H - "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X DELETE {{ request.base_url + }}lnurlp/api/v1/links/<pay_id> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html index bd68b629..a472d549 100644 --- a/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html +++ b/lnbits/extensions/offlineshop/templates/offlineshop/_api_docs.html @@ -127,7 +127,13 @@
- + DELETE diff --git a/lnbits/extensions/paywall/templates/paywall/_api_docs.html b/lnbits/extensions/paywall/templates/paywall/_api_docs.html index 664cda0f..2c8fe672 100644 --- a/lnbits/extensions/paywall/templates/paywall/_api_docs.html +++ b/lnbits/extensions/paywall/templates/paywall/_api_docs.html @@ -17,8 +17,8 @@ [<paywall_object>, ...]
Curl example
curl -X GET {{ request.base_url }}paywall/api/v1/paywalls -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}paywall/api/v1/paywalls -H + "X-Api-Key: {{ user.wallets[0].inkey }}"
@@ -48,11 +48,11 @@ >
Curl example
curl -X POST {{ request.base_url }}paywall/api/v1/paywalls -d '{"url": - <string>, "memo": <string>, "description": <string>, - "amount": <integer>, "remembers": <boolean>}' -H - "Content-type: application/json" -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + >curl -X POST {{ request.base_url }}paywall/api/v1/paywalls -d + '{"url": <string>, "memo": <string>, "description": + <string>, "amount": <integer>, "remembers": + <boolean>}' -H "Content-type: application/json" -H "X-Api-Key: + {{ user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html b/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html index 644bcdfe..a80fd37a 100644 --- a/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html +++ b/lnbits/extensions/satsdice/templates/satsdice/_api_docs.html @@ -17,8 +17,8 @@ [<satsdice_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satsdice/api/v1/links -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}satsdice/api/v1/links -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -44,8 +44,9 @@ {"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}satsdice/api/v1/links/<satsdice_id> -H - "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}satsdice/api/v1/links/<satsdice_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -73,8 +74,8 @@ {"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}satsdice/api/v1/links -d '{"title": - <string>, "min_satsdiceable": <integer>, + >curl -X POST {{ request.base_url }}satsdice/api/v1/links -d + '{"title": <string>, "min_satsdiceable": <integer>, "max_satsdiceable": <integer>, "uses": <integer>, "wait_time": <integer>, "is_unique": <boolean>}' -H "Content-type: application/json" -H "X-Api-Key: {{ @@ -109,8 +110,9 @@ {"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}satsdice/api/v1/links/<satsdice_id> -d - '{"title": <string>, "min_satsdiceable": <integer>, + >curl -X PUT {{ request.base_url + }}satsdice/api/v1/links/<satsdice_id> -d '{"title": + <string>, "min_satsdiceable": <integer>, "max_satsdiceable": <integer>, "uses": <integer>, "wait_time": <integer>, "is_unique": <boolean>}' -H "Content-type: application/json" -H "X-Api-Key: {{ @@ -137,8 +139,9 @@
Curl example
curl -X DELETE {{ request.base_url }}satsdice/api/v1/links/<satsdice_id> - -H "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X DELETE {{ request.base_url + }}satsdice/api/v1/links/<satsdice_id> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" @@ -165,8 +168,8 @@
Curl example
curl -X GET {{ request.base_url - }}satsdice/api/v1/links/<the_hash>/<lnurl_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + }}satsdice/api/v1/links/<the_hash>/<lnurl_id> -H + "X-Api-Key: {{ user.wallets[0].inkey }}" diff --git a/lnbits/extensions/satspay/templates/satspay/_api_docs.html b/lnbits/extensions/satspay/templates/satspay/_api_docs.html index 89380de0..77451ae5 100644 --- a/lnbits/extensions/satspay/templates/satspay/_api_docs.html +++ b/lnbits/extensions/satspay/templates/satspay/_api_docs.html @@ -60,12 +60,13 @@ [<charge_object>, ...]
Curl example
curl -X POST {{ request.base_url }}satspay/api/v1/charge/<charge_id> - -d '{"onchainwallet": <string, watchonly_wallet_id>, - "description": <string>, "webhook":<string>, "time": - <integer>, "amount": <integer>, "lnbitswallet": - <string, lnbits_wallet_id>}' -H "Content-type: - application/json" -H "X-Api-Key: {{user.wallets[0].adminkey }}" + >curl -X POST {{ request.base_url + }}satspay/api/v1/charge/<charge_id> -d '{"onchainwallet": + <string, watchonly_wallet_id>, "description": <string>, + "webhook":<string>, "time": <integer>, "amount": + <integer>, "lnbitswallet": <string, lnbits_wallet_id>}' + -H "Content-type: application/json" -H "X-Api-Key: + {{user.wallets[0].adminkey }}" @@ -89,8 +90,9 @@ [<charge_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satspay/api/v1/charge/<charge_id> - -H "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}satspay/api/v1/charge/<charge_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -112,8 +114,8 @@ [<charge_object>, ...]
Curl example
curl -X GET {{ request.base_url }}satspay/api/v1/charges -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}satspay/api/v1/charges -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -145,7 +147,8 @@
diff --git a/lnbits/extensions/splitpayments/static/js/index.js b/lnbits/extensions/splitpayments/static/js/index.js index dea469e5..d9750bef 100644 --- a/lnbits/extensions/splitpayments/static/js/index.js +++ b/lnbits/extensions/splitpayments/static/js/index.js @@ -119,7 +119,7 @@ new Vue({ '/splitpayments/api/v1/targets', this.selectedWallet.adminkey, { - "targets": this.targets + targets: this.targets .filter(isTargetComplete) .map(({wallet, percent, alias}) => ({wallet, percent, alias})) } diff --git a/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html b/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html index 7a8a6d07..4cf7190c 100644 --- a/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html +++ b/lnbits/extensions/splitpayments/templates/splitpayments/_api_docs.html @@ -52,8 +52,8 @@ >
Curl example
curl -X GET {{ request.base_url }}splitpayments/api/v1/targets -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}splitpayments/api/v1/targets -H + "X-Api-Key: {{ user.wallets[0].inkey }}" diff --git a/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html b/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html index 42788bad..95ba6e06 100644 --- a/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html +++ b/lnbits/extensions/tipjar/templates/tipjar/_api_docs.html @@ -4,10 +4,9 @@ Tip Jar: Receive tips with messages!

- Your personal Bitcoin tip page, which supports - lightning and on-chain payments. - Notifications, including a donation message, - can be sent via webhook. + Your personal Bitcoin tip page, which supports lightning and on-chain + payments. Notifications, including a donation message, can be sent via + webhook. Created by, Fitti diff --git a/lnbits/extensions/tipjar/templates/tipjar/index.html b/lnbits/extensions/tipjar/templates/tipjar/index.html index dda49842..19fca6e4 100644 --- a/lnbits/extensions/tipjar/templates/tipjar/index.html +++ b/lnbits/extensions/tipjar/templates/tipjar/index.html @@ -322,11 +322,7 @@ var self = this LNbits.api - .request( - 'GET', - '/tipjar/api/v1/tips', - this.g.user.wallets[0].inkey - ) + .request('GET', '/tipjar/api/v1/tips', this.g.user.wallets[0].inkey) .then(function (response) { self.tips = response.data.map(function (obj) { return mapTipJar(obj) diff --git a/lnbits/extensions/tpos/templates/tpos/_api_docs.html b/lnbits/extensions/tpos/templates/tpos/_api_docs.html index 42160cce..8930d990 100644 --- a/lnbits/extensions/tpos/templates/tpos/_api_docs.html +++ b/lnbits/extensions/tpos/templates/tpos/_api_docs.html @@ -69,8 +69,8 @@

Curl example
curl -X DELETE {{ request.base_url }}tpos/api/v1/tposs/<tpos_id> -H - "X-Api-Key: <admin_key>" + >curl -X DELETE {{ request.base_url + }}tpos/api/v1/tposs/<tpos_id> -H "X-Api-Key: <admin_key>" diff --git a/lnbits/extensions/tpos/templates/tpos/index.html b/lnbits/extensions/tpos/templates/tpos/index.html index af3b0573..76f33000 100644 --- a/lnbits/extensions/tpos/templates/tpos/index.html +++ b/lnbits/extensions/tpos/templates/tpos/index.html @@ -54,7 +54,8 @@ > - {{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ") : col.value) }} + {{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ") + : col.value) }} parseInt(str))) : JSON.stringify([])), - tip_wallet: this.formDialog.data.tip_wallet || "", + tip_options: this.formDialog.data.tip_options + ? JSON.stringify( + this.formDialog.data.tip_options.map(str => parseInt(str)) + ) + : JSON.stringify([]), + tip_wallet: this.formDialog.data.tip_wallet || '' } var self = this diff --git a/lnbits/extensions/tpos/templates/tpos/tpos.html b/lnbits/extensions/tpos/templates/tpos/tpos.html index e4ea1499..70b84f9b 100644 --- a/lnbits/extensions/tpos/templates/tpos/tpos.html +++ b/lnbits/extensions/tpos/templates/tpos/tpos.html @@ -1,7 +1,5 @@ -{% extends "public.html" %} -{% block toolbar_title %} -{{ tpos.name }} +{% extends "public.html" %} {% block toolbar_title %} {{ tpos.name }} -{% endblock %} -{% block footer %}{% endblock %} {% block page_container %} +{% endblock %} {% block footer %}{% endblock %} {% block page_container %} @@ -180,27 +177,24 @@ - +
- Would you like to leave a tip? + Would you like to leave a tip?
- {% raw %}{{ tip }}{% endraw %}% + {% raw %}{{ tip }}{% endraw %}%

No, thanks

@@ -265,7 +259,7 @@ } .keypad .btn-confirm { - grid-area: 1 / 4 / 5 / 4; + grid-area: 1 / 4 / 5 / 4; } {% endblock %} {% block scripts %} @@ -282,7 +276,7 @@ tip_options: JSON.parse('{{ tpos.tip_options }}'), exchangeRate: null, stack: [], - tipAmount: 0.00, + tipAmount: 0.0, invoiceDialog: { show: false, data: null, @@ -290,7 +284,7 @@ paymentChecker: null }, tipDialog: { - show: false, + show: false }, urlDialog: { show: false @@ -324,7 +318,7 @@ methods: { closeInvoiceDialog: function () { this.stack = [] - this.tipAmount = 0.00 + this.tipAmount = 0.0 var dialog = this.invoiceDialog setTimeout(function () { clearInterval(dialog.paymentChecker) @@ -334,8 +328,10 @@ processTipSelection: function (selectedTipOption) { this.tipDialog.show = false - if(selectedTipOption) { - const tipAmount = parseFloat(parseFloat((selectedTipOption / 100) * this.amount)) + if (selectedTipOption) { + const tipAmount = parseFloat( + parseFloat((selectedTipOption / 100) * this.amount) + ) const subtotal = parseFloat(this.amount) const grandTotal = parseFloat((tipAmount + subtotal).toFixed(2)) const totalString = grandTotal.toFixed(2).toString() @@ -344,7 +340,7 @@ for (var i = 0; i < totalString.length; i++) { const char = totalString[i] - if(char !== ".") { + if (char !== '.') { this.stack.push(char) } } @@ -354,14 +350,14 @@ this.showInvoice() }, - submitForm: function() { - if(this.tip_options.length) { + submitForm: function () { + if (this.tip_options.length) { this.showTipModal() } else { this.showInvoice() } }, - showTipModal: function() { + showTipModal: function () { this.tipDialog.show = true }, showInvoice: function () { @@ -372,7 +368,7 @@ .post('/tpos/api/v1/tposs/' + this.tposId + '/invoices', null, { params: { amount: this.sat, - tipAmount: this.tipAmountSat, + tipAmount: this.tipAmountSat } }) .then(function (response) { diff --git a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html index bff66383..b421186a 100644 --- a/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html +++ b/lnbits/extensions/watchonly/templates/watchonly/_api_docs.html @@ -37,8 +37,8 @@ [<wallets_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/wallet -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}watchonly/api/v1/wallet -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -66,8 +66,9 @@ [<wallet_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/wallet/<wallet_id> - -H "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}watchonly/api/v1/wallet/<wallet_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -89,9 +90,10 @@ [<wallet_object>, ...]
Curl example
curl -X POST {{ request.base_url }}watchonly/api/v1/wallet -d '{"title": - <string>, "masterpub": <string>}' -H "Content-type: - application/json" -H "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X POST {{ request.base_url }}watchonly/api/v1/wallet -d + '{"title": <string>, "masterpub": <string>}' -H + "Content-type: application/json" -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" @@ -173,8 +175,9 @@ [<address_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/address/<wallet_id> - -H "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}watchonly/api/v1/address/<wallet_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -202,8 +205,8 @@ [<mempool_object>, ...]
Curl example
curl -X GET {{ request.base_url }}watchonly/api/v1/mempool -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + >curl -X GET {{ request.base_url }}watchonly/api/v1/mempool -H + "X-Api-Key: {{ user.wallets[0].adminkey }}" @@ -233,9 +236,9 @@ [<mempool_object>, ...]
Curl example
curl -X PUT {{ request.base_url }}watchonly/api/v1/mempool -d '{"endpoint": - <string>}' -H "Content-type: application/json" -H "X-Api-Key: - {{ user.wallets[0].adminkey }}" + >curl -X PUT {{ request.base_url }}watchonly/api/v1/mempool -d + '{"endpoint": <string>}' -H "Content-type: application/json" + -H "X-Api-Key: {{ user.wallets[0].adminkey }}" diff --git a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html index 76068fcb..095aad3a 100644 --- a/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html +++ b/lnbits/extensions/withdraw/templates/withdraw/_api_docs.html @@ -22,8 +22,8 @@ [<withdraw_link_object>, ...]
Curl example
curl -X GET {{ request.base_url }}withdraw/api/v1/links -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url }}withdraw/api/v1/links -H + "X-Api-Key: {{ user.wallets[0].inkey }}" @@ -49,8 +49,9 @@ {"lnurl": <string>}
Curl example
curl -X GET {{ request.base_url }}withdraw/api/v1/links/<withdraw_id> -H - "X-Api-Key: {{ user.wallets[0].inkey }}" + >curl -X GET {{ request.base_url + }}withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: {{ + user.wallets[0].inkey }}" @@ -79,12 +80,12 @@ {"lnurl": <string>}
Curl example
curl -X POST {{ request.base_url }}withdraw/api/v1/links -d '{"title": - <string>, "min_withdrawable": <integer>, + >curl -X POST {{ request.base_url }}withdraw/api/v1/links -d + '{"title": <string>, "min_withdrawable": <integer>, "max_withdrawable": <integer>, "uses": <integer>, - "wait_time": <integer>, "is_unique": <boolean>, "webhook_url": <string>}' -H - "Content-type: application/json" -H "X-Api-Key: {{ - user.wallets[0].adminkey }}" + "wait_time": <integer>, "is_unique": <boolean>, + "webhook_url": <string>}' -H "Content-type: application/json" -H + "X-Api-Key: {{ user.wallets[0].adminkey }}" @@ -115,8 +116,9 @@ {"lnurl": <string>}
Curl example
curl -X PUT {{ request.base_url }}withdraw/api/v1/links/<withdraw_id> -d - '{"title": <string>, "min_withdrawable": <integer>, + >curl -X PUT {{ request.base_url + }}withdraw/api/v1/links/<withdraw_id> -d '{"title": + <string>, "min_withdrawable": <integer>, "max_withdrawable": <integer>, "uses": <integer>, "wait_time": <integer>, "is_unique": <boolean>}' -H "Content-type: application/json" -H "X-Api-Key: {{ @@ -143,8 +145,9 @@
Curl example
curl -X DELETE {{ request.base_url }}withdraw/api/v1/links/<withdraw_id> - -H "X-Api-Key: {{ user.wallets[0].adminkey }}" + >curl -X DELETE {{ request.base_url + }}withdraw/api/v1/links/<withdraw_id> -H "X-Api-Key: {{ + user.wallets[0].adminkey }}" @@ -171,8 +174,8 @@
Curl example
curl -X GET {{ request.base_url - }}withdraw/api/v1/links/<the_hash>/<lnurl_id> -H "X-Api-Key: {{ - user.wallets[0].inkey }}" + }}withdraw/api/v1/links/<the_hash>/<lnurl_id> -H + "X-Api-Key: {{ user.wallets[0].inkey }}" diff --git a/lnbits/extensions/withdraw/templates/withdraw/csv.html b/lnbits/extensions/withdraw/templates/withdraw/csv.html index d8f8c4d0..62902905 100644 --- a/lnbits/extensions/withdraw/templates/withdraw/csv.html +++ b/lnbits/extensions/withdraw/templates/withdraw/csv.html @@ -1,10 +1,12 @@ -{% extends "print.html" %} {% block page %} {% for page in link %} {% for threes in page %} {% for one in threes %} {{one}}, {% endfor %} {% endfor %} {% endfor %} {% endblock %} {% block scripts %} +{% extends "print.html" %} {% block page %} {% for page in link %} {% for threes +in page %} {% for one in threes %} {{one}}, {% endfor %} {% endfor %} {% endfor +%} {% endblock %} {% block scripts %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/lnbits/extensions/withdraw/templates/withdraw/index.html b/lnbits/extensions/withdraw/templates/withdraw/index.html index f6ea220d..6d3ab374 100644 --- a/lnbits/extensions/withdraw/templates/withdraw/index.html +++ b/lnbits/extensions/withdraw/templates/withdraw/index.html @@ -1,28 +1,40 @@ -{% extends "base.html" %} {% from "macros.jinja" import window_vars with context %} {% block scripts %} {{ window_vars(user) }} +{% extends "base.html" %} {% from "macros.jinja" import window_vars with context +%} {% block scripts %} {{ window_vars(user) }} {% endblock %} {% block page %}
-
- - - Quick vouchers - Advanced withdraw link(s) - - +
+ + + Quick vouchers + Advanced withdraw link(s) + + - - -
-
-
Withdraw links
-
-
- Export to CSV -
-
- - {% raw %} -