Format: prettier (#707)
* format: prettier * gh-actions: add prettier checkg * actions
This commit is contained in:
parent
d55f8dc36e
commit
92887ed169
9
.github/workflows/formatting.yml
vendored
9
.github/workflows/formatting.yml
vendored
|
@ -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
|
|
@ -48,7 +48,8 @@
|
|||
<code>{"X-Api-Key": "<i>{{ wallet.inkey }}</i>"}</code><br />
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
||||
<code
|
||||
>{"out": false, "amount": <int>, "memo": <string>, "unit": <string>, "webhook": <url:string>}</code
|
||||
>{"out": false, "amount": <int>, "memo": <string>, "unit":
|
||||
<string>, "webhook": <url:string>}</code
|
||||
>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">
|
||||
Returns 201 CREATED (application/json)
|
||||
|
@ -61,8 +62,8 @@
|
|||
<code
|
||||
>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: <i>{{ wallet.inkey }}</i>" -H
|
||||
"Content-type: application/json"</code
|
||||
<url:string>, "unit": <string>}' -H "X-Api-Key:
|
||||
<i>{{ wallet.inkey }}</i>" -H "Content-type: application/json"</code
|
||||
>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
<code>[<copilot_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -87,8 +87,9 @@
|
|||
<code>[<copilot_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -110,8 +111,8 @@
|
|||
<code>[<copilot_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -161,9 +162,10 @@
|
|||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -10,12 +10,19 @@
|
|||
Discord Bot: Connect Discord users to LNbits.
|
||||
</h5>
|
||||
<p>
|
||||
Connect your LNbits instance to a <a href="https://github.com/chrislennon/lnbits-discord-bot">Discord Bot</a> leveraging LNbits as a community based lightning node.<br />
|
||||
Connect your LNbits instance to a
|
||||
<a href="https://github.com/chrislennon/lnbits-discord-bot"
|
||||
>Discord Bot</a
|
||||
>
|
||||
leveraging LNbits as a community based lightning node.<br />
|
||||
<small>
|
||||
Created by, <a href="https://github.com/chrislennon">Chris Lennon</a></small
|
||||
> <br />
|
||||
Created by,
|
||||
<a href="https://github.com/chrislennon">Chris Lennon</a></small
|
||||
>
|
||||
<br />
|
||||
<small>
|
||||
Based on User Manager, by <a href="https://github.com/benarc">Ben Arc</a></small
|
||||
Based on User Manager, by
|
||||
<a href="https://github.com/benarc">Ben Arc</a></small
|
||||
>
|
||||
</p>
|
||||
</q-card-section>
|
||||
|
@ -149,8 +156,9 @@
|
|||
<code
|
||||
>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"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -136,7 +136,8 @@
|
|||
<div class="col-12 col-md-4 col-lg-5 q-gutter-y-md">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<h6 class="text-subtitle1 q-my-none">LNbits Discord Bot Extension
|
||||
<h6 class="text-subtitle1 q-my-none">
|
||||
LNbits Discord Bot Extension
|
||||
<!--{{SITE_TITLE}} Discord Bot Extension-->
|
||||
</h6>
|
||||
</q-card-section>
|
||||
|
@ -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
|
||||
|
|
|
@ -17,11 +17,9 @@ var mapJukebox = obj => {
|
|||
obj.playlist = playlistsar.join()
|
||||
console.log(obj)
|
||||
return obj
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Vue({
|
||||
|
@ -103,7 +101,6 @@ new Vue({
|
|||
)
|
||||
.then(function (response) {
|
||||
self.JukeboxLinks = response.data.map(function (obj) {
|
||||
|
||||
return mapJukebox(obj)
|
||||
})
|
||||
console.log(self.JukeboxLinks)
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
<code>[<jukebox_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -59,8 +59,9 @@
|
|||
<code><jukebox_object></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -86,8 +87,8 @@
|
|||
<code><jukbox_object></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 @@
|
|||
<code><jukebox_object></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
<code>[<livestream_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -110,11 +110,11 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -149,7 +149,13 @@
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item group="api" dense expand-separator label="POST address" class="q-pb-md">
|
||||
<q-expansion-item
|
||||
group="api"
|
||||
dense
|
||||
expand-separator
|
||||
label="POST address"
|
||||
class="q-pb-md"
|
||||
>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<code
|
||||
|
|
|
@ -192,7 +192,11 @@
|
|||
label="Cloudflare API token"
|
||||
>
|
||||
<template v-slot:hint>
|
||||
Check extension <a href="https://github.com/lnbits/lnbits-legend/tree/master/lnbits/extensions/lnaddress">documentation!</a>
|
||||
Check extension
|
||||
<a
|
||||
href="https://github.com/lnbits/lnbits-legend/tree/master/lnbits/extensions/lnaddress"
|
||||
>documentation!</a
|
||||
>
|
||||
</template>
|
||||
<q-tooltip class="bg-grey-8" anchor="bottom left" self="top left"
|
||||
>Your API key in cloudflare</q-tooltip
|
||||
|
|
|
@ -145,11 +145,13 @@
|
|||
icon="launch"
|
||||
:color="($q.dark.isActive) ? 'grey-7' : 'grey-5'"
|
||||
@click="ticketCard(props)"
|
||||
><q-tooltip> Click to show ticket </q-tooltip></q-btn>
|
||||
><q-tooltip> Click to show ticket </q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
{{ 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 }}
|
||||
</q-td>
|
||||
|
||||
<q-td auto-width>
|
||||
|
@ -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
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
<code>[<lnurldevice_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
|
@ -104,8 +104,8 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -159,8 +159,8 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -480,12 +480,11 @@
|
|||
updatedData
|
||||
)
|
||||
.then(function (response) {
|
||||
self.lnurldeviceLinks = _.reject(
|
||||
self.lnurldeviceLinks,
|
||||
function (obj) {
|
||||
self.lnurldeviceLinks = _.reject(self.lnurldeviceLinks, function (
|
||||
obj
|
||||
) {
|
||||
return obj.id === updatedData.id
|
||||
}
|
||||
)
|
||||
})
|
||||
self.lnurldeviceLinks.push(maplnurldevice(response.data))
|
||||
self.formDialoglnurldevice.show = false
|
||||
self.clearFormDialoglnurldevice()
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<code>[<pay_link_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -39,8 +39,8 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -68,11 +68,11 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -99,8 +99,8 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
|
@ -126,8 +126,9 @@
|
|||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -127,7 +127,13 @@
|
|||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item group="api" dense expand-separator label="Delete item" class="q-pb-md">
|
||||
<q-expansion-item
|
||||
group="api"
|
||||
dense
|
||||
expand-separator
|
||||
label="Delete item"
|
||||
class="q-pb-md"
|
||||
>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<code><span class="text-blue">DELETE</span></code>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<code>[<paywall_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -48,11 +48,11 @@
|
|||
>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<code>[<satsdice_link_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -44,8 +44,9 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -73,8 +74,8 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 @@
|
|||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -165,8 +168,8 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -60,12 +60,13 @@
|
|||
<code>[<charge_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -89,8 +90,9 @@
|
|||
<code>[<charge_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -112,8 +114,8 @@
|
|||
<code>[<charge_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -145,7 +147,8 @@
|
|||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
group="api"
|
||||
dense expand-separator
|
||||
dense
|
||||
expand-separator
|
||||
label="Get balances"
|
||||
class="q-pb-md"
|
||||
>
|
||||
|
|
|
@ -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}))
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
Tip Jar: Receive tips with messages!
|
||||
</h4>
|
||||
<p>
|
||||
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.
|
||||
<small>
|
||||
Created by, <a href="https://github.com/Fittiboy">Fitti</a></small
|
||||
>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -69,8 +69,8 @@
|
|||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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>"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -54,7 +54,8 @@
|
|||
></q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
{{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ") : col.value) }}
|
||||
{{ (col.name == 'tip_options' ? JSON.parse(col.value).join(", ")
|
||||
: col.value) }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
|
@ -360,15 +361,15 @@
|
|||
{
|
||||
name: 'tip_wallet',
|
||||
align: 'left',
|
||||
label: "Tip Wallet",
|
||||
field: "tip_wallet",
|
||||
label: 'Tip Wallet',
|
||||
field: 'tip_wallet'
|
||||
},
|
||||
{
|
||||
name: 'tip_options',
|
||||
align: 'left',
|
||||
label: "Tip Options %",
|
||||
field: "tip_options",
|
||||
},
|
||||
label: 'Tip Options %',
|
||||
field: 'tip_options'
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
rowsPerPage: 10
|
||||
|
@ -403,8 +404,12 @@
|
|||
var data = {
|
||||
name: this.formDialog.data.name,
|
||||
currency: this.formDialog.data.currency,
|
||||
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 || "",
|
||||
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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<link rel="manifest" href="/tpos/manifest/{{ tpos.id }}.webmanifest" />
|
||||
{% extends "public.html" %}
|
||||
{% block toolbar_title %}
|
||||
{{ tpos.name }}
|
||||
{% extends "public.html" %} {% block toolbar_title %} {{ tpos.name }}
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
|
@ -10,8 +8,7 @@
|
|||
icon="share"
|
||||
color="white"
|
||||
></q-btn>
|
||||
{% endblock %}
|
||||
{% block footer %}{% endblock %} {% block page_container %}
|
||||
{% endblock %} {% block footer %}{% endblock %} {% block page_container %}
|
||||
<q-page-container>
|
||||
<q-page>
|
||||
<q-page-sticky v-if="exchangeRate" expand position="top">
|
||||
|
@ -180,17 +177,14 @@
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-model="tipDialog.show"
|
||||
position="top"
|
||||
>
|
||||
<q-dialog v-model="tipDialog.show" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<div class="text-center q-mb-xl">
|
||||
<b style="font-size: 24px;">Would you like to leave a tip?</b>
|
||||
<b style="font-size: 24px">Would you like to leave a tip?</b>
|
||||
</div>
|
||||
<div class="text-center q-mb-xl">
|
||||
<q-btn
|
||||
style="padding: 10px; margin: 3px;"
|
||||
style="padding: 10px; margin: 3px"
|
||||
unelevated
|
||||
@click="processTipSelection(tip)"
|
||||
size="xl"
|
||||
|
@ -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)
|
||||
|
@ -335,7 +329,9 @@
|
|||
this.tipDialog.show = false
|
||||
|
||||
if (selectedTipOption) {
|
||||
const tipAmount = parseFloat(parseFloat((selectedTipOption / 100) * this.amount))
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
<code>[<wallets_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -66,8 +66,9 @@
|
|||
<code>[<wallet_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -89,9 +90,10 @@
|
|||
<code>[<wallet_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -173,8 +175,9 @@
|
|||
<code>[<address_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -202,8 +205,8 @@
|
|||
<code>[<mempool_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -233,9 +236,9 @@
|
|||
<code>[<mempool_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<code>[<withdraw_link_object>, ...]</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -49,8 +49,9 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -79,12 +80,12 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -115,8 +116,9 @@
|
|||
<code>{"lnurl": <string>}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 @@
|
|||
<code></code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -171,8 +174,8 @@
|
|||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>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 }}"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{% 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 %}
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#vue',
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
{% 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) }}
|
||||
<script src="/withdraw/static/js/index.js"></script>
|
||||
{% endblock %} {% block page %}
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12 col-md-7 q-gutter-y-md">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<q-btn unelevated color="primary" @click="simpleformDialog.show = true">Quick vouchers</q-btn>
|
||||
<q-btn unelevated color="primary" @click="formDialog.show = true">Advanced withdraw link(s)</q-btn>
|
||||
<q-btn unelevated color="primary" @click="simpleformDialog.show = true"
|
||||
>Quick vouchers</q-btn
|
||||
>
|
||||
<q-btn unelevated color="primary" @click="formDialog.show = true"
|
||||
>Advanced withdraw link(s)</q-btn
|
||||
>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
|
@ -20,7 +25,14 @@
|
|||
<q-btn flat color="grey" @click="exportCSV">Export to CSV</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<q-table dense flat :data="sortedWithdrawLinks" row-key="id" :columns="withdrawLinksTable.columns" :pagination.sync="withdrawLinksTable.pagination">
|
||||
<q-table
|
||||
dense
|
||||
flat
|
||||
:data="sortedWithdrawLinks"
|
||||
row-key="id"
|
||||
:columns="withdrawLinksTable.columns"
|
||||
:pagination.sync="withdrawLinksTable.pagination"
|
||||
>
|
||||
{% raw %}
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
@ -106,7 +118,8 @@
|
|||
></q-btn>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template> {% endraw %}
|
||||
</template>
|
||||
{% endraw %}
|
||||
</q-table>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
@ -133,19 +146,66 @@
|
|||
<q-dialog v-model="formDialog.show" position="top" @hide="closeFormDialog">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form @submit="sendFormData" class="q-gutter-md">
|
||||
<q-select filled dense emit-value v-model="formDialog.data.wallet" :options="g.user.walletOptions" label="Wallet *">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
emit-value
|
||||
v-model="formDialog.data.wallet"
|
||||
:options="g.user.walletOptions"
|
||||
label="Wallet *"
|
||||
>
|
||||
</q-select>
|
||||
<q-input filled dense v-model.trim="formDialog.data.title" type="text" label="Link title *"></q-input>
|
||||
<q-input filled dense v-model.number="formDialog.data.min_withdrawable" type="number" min="10" label="Min withdrawable (sat, at least 10) *"></q-input>
|
||||
<q-input filled dense v-model.number="formDialog.data.max_withdrawable" type="number" min="10" label="Max withdrawable (sat, at least 10) *"></q-input>
|
||||
<q-input filled dense v-model.number="formDialog.data.uses" type="number" max="250" :default="1" label="Amount of uses *"></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.trim="formDialog.data.title"
|
||||
type="text"
|
||||
label="Link title *"
|
||||
></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="formDialog.data.min_withdrawable"
|
||||
type="number"
|
||||
min="10"
|
||||
label="Min withdrawable (sat, at least 10) *"
|
||||
></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="formDialog.data.max_withdrawable"
|
||||
type="number"
|
||||
min="10"
|
||||
label="Max withdrawable (sat, at least 10) *"
|
||||
></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="formDialog.data.uses"
|
||||
type="number"
|
||||
max="250"
|
||||
:default="1"
|
||||
label="Amount of uses *"
|
||||
></q-input>
|
||||
<div class="row q-col-gutter-none">
|
||||
<div class="col-8">
|
||||
<q-input filled dense v-model.number="formDialog.data.wait_time" type="number" :default="1" label="Time between withdrawals *">
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="formDialog.data.wait_time"
|
||||
type="number"
|
||||
:default="1"
|
||||
label="Time between withdrawals *"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-4 q-pl-xs">
|
||||
<q-select filled dense v-model="formDialog.secondMultiplier" :options="formDialog.secondMultiplierOptions">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model="formDialog.secondMultiplier"
|
||||
:options="formDialog.secondMultiplierOptions"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -160,18 +220,35 @@
|
|||
<q-list>
|
||||
<q-item tag="label" class="rounded-borders">
|
||||
<q-item-section avatar>
|
||||
<q-checkbox v-model="formDialog.data.is_unique" color="primary"></q-checkbox>
|
||||
<q-checkbox
|
||||
v-model="formDialog.data.is_unique"
|
||||
color="primary"
|
||||
></q-checkbox>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Use unique withdraw QR codes to reduce `assmilking`
|
||||
<q-item-label
|
||||
>Use unique withdraw QR codes to reduce `assmilking`
|
||||
</q-item-label>
|
||||
<q-item-label caption>This is recommended if you are sharing the links on social media or print QR codes.</q-item-label>
|
||||
<q-item-label caption
|
||||
>This is recommended if you are sharing the links on social
|
||||
media or print QR codes.</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn v-if="formDialog.data.id" unelevated color="primary" type="submit">Update withdraw link</q-btn>
|
||||
<q-btn v-else unelevated color="primary" :disable="
|
||||
<q-btn
|
||||
v-if="formDialog.data.id"
|
||||
unelevated
|
||||
color="primary"
|
||||
type="submit"
|
||||
>Update withdraw link</q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-else
|
||||
unelevated
|
||||
color="primary"
|
||||
:disable="
|
||||
formDialog.data.wallet == null ||
|
||||
formDialog.data.title == null ||
|
||||
(formDialog.data.min_withdrawable == null || formDialog.data.min_withdrawable < 1) ||
|
||||
|
@ -181,29 +258,68 @@
|
|||
formDialog.data.max_withdrawable < formDialog.data.min_withdrawable
|
||||
) ||
|
||||
formDialog.data.uses == null ||
|
||||
formDialog.data.wait_time == null" type="submit">Create withdraw link</q-btn>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn>
|
||||
formDialog.data.wait_time == null"
|
||||
type="submit"
|
||||
>Create withdraw link</q-btn
|
||||
>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
||||
>Cancel</q-btn
|
||||
>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="simpleformDialog.show" position="top" @hide="simplecloseFormDialog">
|
||||
<q-dialog
|
||||
v-model="simpleformDialog.show"
|
||||
position="top"
|
||||
@hide="simplecloseFormDialog"
|
||||
>
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form @submit="simplesendFormData" class="q-gutter-md">
|
||||
<q-select filled dense emit-value v-model="simpleformDialog.data.wallet" :options="g.user.walletOptions" label="Wallet *">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
emit-value
|
||||
v-model="simpleformDialog.data.wallet"
|
||||
:options="g.user.walletOptions"
|
||||
label="Wallet *"
|
||||
>
|
||||
</q-select>
|
||||
<q-input filled dense v-model.number="simpleformDialog.data.max_withdrawable" type="number" min="10" label="Withdraw amount per voucher (sat, at least 10)"></q-input>
|
||||
<q-input filled dense v-model.number="simpleformDialog.data.uses" type="number" max="250" :default="1" label="Number of vouchers"></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="simpleformDialog.data.max_withdrawable"
|
||||
type="number"
|
||||
min="10"
|
||||
label="Withdraw amount per voucher (sat, at least 10)"
|
||||
></q-input>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.number="simpleformDialog.data.uses"
|
||||
type="number"
|
||||
max="250"
|
||||
:default="1"
|
||||
label="Number of vouchers"
|
||||
></q-input>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn unelevated color="primary" :disable="
|
||||
<q-btn
|
||||
unelevated
|
||||
color="primary"
|
||||
:disable="
|
||||
simpleformDialog.data.wallet == null ||
|
||||
|
||||
simpleformDialog.data.max_withdrawable == null ||
|
||||
simpleformDialog.data.max_withdrawable < 1 ||
|
||||
simpleformDialog.data.uses == null" type="submit">Create vouchers</q-btn>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn>
|
||||
simpleformDialog.data.uses == null"
|
||||
type="submit"
|
||||
>Create vouchers</q-btn
|
||||
>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
||||
>Cancel</q-btn
|
||||
>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
@ -212,12 +328,19 @@
|
|||
<q-dialog v-model="qrCodeDialog.show" position="top">
|
||||
<q-card v-if="qrCodeDialog.data" class="q-pa-lg lnbits__dialog-card">
|
||||
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
|
||||
<qrcode :value="qrCodeDialog.data.url + '/?lightning=' + qrCodeDialog.data.lnurl" :options="{width: 800}" class="rounded-borders"></qrcode>
|
||||
<qrcode
|
||||
:value="qrCodeDialog.data.url + '/?lightning=' + qrCodeDialog.data.lnurl"
|
||||
:options="{width: 800}"
|
||||
class="rounded-borders"
|
||||
></qrcode>
|
||||
{% raw %}
|
||||
</q-responsive>
|
||||
<p style="word-break: break-all">
|
||||
<strong>ID:</strong> {{ qrCodeDialog.data.id }}<br />
|
||||
<strong>Unique:</strong> {{ qrCodeDialog.data.is_unique }}<span v-if="qrCodeDialog.data.is_unique" class="text-deep-purple">
|
||||
<strong>Unique:</strong> {{ qrCodeDialog.data.is_unique }}<span
|
||||
v-if="qrCodeDialog.data.is_unique"
|
||||
class="text-deep-purple"
|
||||
>
|
||||
(QR code will change after each withdrawal)</span
|
||||
><br />
|
||||
<strong>Max. withdrawable:</strong> {{
|
||||
|
|
|
@ -345,11 +345,12 @@ window.windowMixin = {
|
|||
}
|
||||
},
|
||||
created: function () {
|
||||
|
||||
if(this.$q.localStorage.getItem('lnbits.darkMode') == true || this.$q.localStorage.getItem('lnbits.darkMode') == false){
|
||||
if (
|
||||
this.$q.localStorage.getItem('lnbits.darkMode') == true ||
|
||||
this.$q.localStorage.getItem('lnbits.darkMode') == false
|
||||
) {
|
||||
this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode'))
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this.$q.dark.set(true)
|
||||
}
|
||||
this.g.allowedThemes = window.allowedThemes ?? ['bitcoin']
|
||||
|
|
|
@ -13,7 +13,10 @@
|
|||
></q-icon>
|
||||
|
||||
<h5 class="q-my-none">{{ err }}</h5>
|
||||
<h4>If you believe this shouldn't be an error please bring it up on https://t.me/lnbits</h4>
|
||||
<h4>
|
||||
If you believe this shouldn't be an error please bring it up on
|
||||
https://t.me/lnbits
|
||||
</h4>
|
||||
<br />
|
||||
</center>
|
||||
</q-card-section>
|
||||
|
|
Loading…
Reference in New Issue
Block a user