Format: prettier (#707)

* format: prettier

* gh-actions: add prettier checkg

* actions
This commit is contained in:
calle 2022-07-05 21:14:56 +02:00 committed by GitHub
parent d55f8dc36e
commit 92887ed169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 516 additions and 336 deletions

View File

@ -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

View File

@ -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": &lt;int&gt;, "memo": &lt;string&gt;, "unit": &lt;string&gt;, "webhook": &lt;url:string&gt;}</code
>{"out": false, "amount": &lt;int&gt;, "memo": &lt;string&gt;, "unit":
&lt;string&gt;, "webhook": &lt;url:string&gt;}</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": &lt;int&gt;, "memo": &lt;string&gt;, "webhook":
&lt;url:string&gt;, "unit": &lt;string&gt;}' -H "X-Api-Key: <i>{{ wallet.inkey }}</i>" -H
"Content-type: application/json"</code
&lt;url:string&gt;, "unit": &lt;string&gt;}' -H "X-Api-Key:
<i>{{ wallet.inkey }}</i>" -H "Content-type: application/json"</code
>
</q-card-section>
</q-card>

View File

@ -31,8 +31,8 @@
<code>[&lt;copilot_object&gt;, ...]</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":
&lt;string&gt;, "animation": &lt;string&gt;,
>curl -X POST {{ request.base_url }}copilot/api/v1/copilot -d
'{"title": &lt;string&gt;, "animation": &lt;string&gt;,
"show_message":&lt;string&gt;, "amount": &lt;integer&gt;,
"lnurl_title": &lt;string&gt;}' -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/&lt;copilot_id&gt; -d '{"title": &lt;string&gt;,
"animation": &lt;string&gt;, "show_message":&lt;string&gt;,
"amount": &lt;integer&gt;, "lnurl_title": &lt;string&gt;}' -H
"Content-type: application/json" -H "X-Api-Key:
{{user.wallets[0].adminkey }}"
}}copilot/api/v1/copilot/&lt;copilot_id&gt; -d '{"title":
&lt;string&gt;, "animation": &lt;string&gt;,
"show_message":&lt;string&gt;, "amount": &lt;integer&gt;,
"lnurl_title": &lt;string&gt;}' -H "Content-type: application/json"
-H "X-Api-Key: {{user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -87,8 +87,9 @@
<code>[&lt;copilot_object&gt;, ...]</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/&lt;copilot_id&gt;
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}copilot/api/v1/copilot/&lt;copilot_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -110,8 +111,8 @@
<code>[&lt;copilot_object&gt;, ...]</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/&lt;string,
copilot_id&gt;/&lt;string, comment&gt;/&lt;string, gif name&gt; -H
"X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X GET {{ request.base_url
}}copilot/api/v1/copilot/ws/&lt;string, copilot_id&gt;/&lt;string,
comment&gt;/&lt;string, gif name&gt; -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -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": &lt;string&gt;,
"user_name": &lt;string&gt;, "discord_id": &lt;string&gt;}' -H "X-Api-Key: {{
user.wallets[0].inkey }}" -H "Content-type: application/json"
"user_name": &lt;string&gt;, "discord_id": &lt;string&gt;}' -H
"X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
application/json"
</code>
</q-card-section>
</q-card>

View File

@ -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

View File

@ -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)

View File

@ -37,8 +37,8 @@
<code>[&lt;jukebox_object&gt;, ...]</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>&lt;jukebox_object&gt;</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/&lt;juke_id&gt; -H
"X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X GET {{ request.base_url
}}jukebox/api/v1/jukebox/&lt;juke_id&gt; -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -86,8 +87,8 @@
<code>&lt;jukbox_object&gt;</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":
&lt;string, user_id&gt;, "title": &lt;string&gt;,
>curl -X POST {{ request.base_url }}jukebox/api/v1/jukebox/ -d
'{"user": &lt;string, user_id&gt;, "title": &lt;string&gt;,
"wallet":&lt;string&gt;, "sp_user": &lt;string,
spotify_user_account&gt;, "sp_secret": &lt;string,
spotify_user_secret&gt;, "sp_access_token": &lt;string,
@ -116,8 +117,9 @@
<code>&lt;jukebox_object&gt;</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/&lt;juke_id&gt;
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X DELETE {{ request.base_url
}}jukebox/api/v1/jukebox/&lt;juke_id&gt; -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -38,8 +38,8 @@
<code>[&lt;livestream_object&gt;, ...]</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": &lt;string&gt;, "download_url": &lt;string&gt;,
"price_msat": &lt;integer&gt;, "producer_id": &lt;integer&gt;,
"producer_name": &lt;string&gt;}' -H "Content-type: application/json"
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
livestream/api/v1/livestream/tracks -d '{"name": &lt;string&gt;,
"download_url": &lt;string&gt;, "price_msat": &lt;integer&gt;,
"producer_id": &lt;integer&gt;, "producer_name": &lt;string&gt;}' -H
"Content-type: application/json" -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -39,8 +39,8 @@
<code>[&lt;lnurldevice_object&gt;, ...]</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":
&lt;string&gt;, "message":&lt;string&gt;, "currency":
>curl -X POST {{ request.base_url }}lnurldevice/api/v1/lnurlpos -d
'{"title": &lt;string&gt;, "message":&lt;string&gt;, "currency":
&lt;integer&gt;}' -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/&lt;lnurldevice_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
}}lnurldevice/api/v1/lnurlpos/&lt;lnurldevice_id&gt; -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/&lt;lnurldevice_id&gt; -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
}}lnurldevice/api/v1/lnurlpos/&lt;lnurldevice_id&gt; -H "X-Api-Key:
{{ user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -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()

View File

@ -17,8 +17,8 @@
<code>[&lt;pay_link_object&gt;, ...]</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": &lt;string&gt;}</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/&lt;pay_id&gt; -H
"X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url }}lnurlp/api/v1/links/&lt;pay_id&gt;
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -68,11 +68,11 @@
<code>{"lnurl": &lt;string&gt;}</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":
&lt;string&gt;, "amount": &lt;integer&gt;, "max": &lt;integer&gt;,
"min": &lt;integer&gt;, "comment_chars": &lt;integer&gt;}' -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": &lt;string&gt;, "amount": &lt;integer&gt;, "max":
&lt;integer&gt;, "min": &lt;integer&gt;, "comment_chars":
&lt;integer&gt;}' -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": &lt;string&gt;}</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/&lt;pay_id&gt; -d
'{"description": &lt;string&gt;, "amount": &lt;integer&gt;}' -H
>curl -X PUT {{ request.base_url }}lnurlp/api/v1/links/&lt;pay_id&gt;
-d '{"description": &lt;string&gt;, "amount": &lt;integer&gt;}' -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/&lt;pay_id&gt; -H
"X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X DELETE {{ request.base_url
}}lnurlp/api/v1/links/&lt;pay_id&gt; -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -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>

View File

@ -17,8 +17,8 @@
<code>[&lt;paywall_object&gt;, ...]</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":
&lt;string&gt;, "memo": &lt;string&gt;, "description": &lt;string&gt;,
"amount": &lt;integer&gt;, "remembers": &lt;boolean&gt;}' -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": &lt;string&gt;, "memo": &lt;string&gt;, "description":
&lt;string&gt;, "amount": &lt;integer&gt;, "remembers":
&lt;boolean&gt;}' -H "Content-type: application/json" -H "X-Api-Key:
{{ user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -17,8 +17,8 @@
<code>[&lt;satsdice_link_object&gt;, ...]</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": &lt;string&gt;}</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/&lt;satsdice_id&gt; -H
"X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}satsdice/api/v1/links/&lt;satsdice_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -73,8 +74,8 @@
<code>{"lnurl": &lt;string&gt;}</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":
&lt;string&gt;, "min_satsdiceable": &lt;integer&gt;,
>curl -X POST {{ request.base_url }}satsdice/api/v1/links -d
'{"title": &lt;string&gt;, "min_satsdiceable": &lt;integer&gt;,
"max_satsdiceable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -H
"Content-type: application/json" -H "X-Api-Key: {{
@ -109,8 +110,9 @@
<code>{"lnurl": &lt;string&gt;}</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/&lt;satsdice_id&gt; -d
'{"title": &lt;string&gt;, "min_satsdiceable": &lt;integer&gt;,
>curl -X PUT {{ request.base_url
}}satsdice/api/v1/links/&lt;satsdice_id&gt; -d '{"title":
&lt;string&gt;, "min_satsdiceable": &lt;integer&gt;,
"max_satsdiceable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -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/&lt;satsdice_id&gt;
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X DELETE {{ request.base_url
}}satsdice/api/v1/links/&lt;satsdice_id&gt; -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/&lt;the_hash&gt;/&lt;lnurl_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
}}satsdice/api/v1/links/&lt;the_hash&gt;/&lt;lnurl_id&gt; -H
"X-Api-Key: {{ user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -60,12 +60,13 @@
<code>[&lt;charge_object&gt;, ...]</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/&lt;charge_id&gt;
-d '{"onchainwallet": &lt;string, watchonly_wallet_id&gt;,
"description": &lt;string&gt;, "webhook":&lt;string&gt;, "time":
&lt;integer&gt;, "amount": &lt;integer&gt;, "lnbitswallet":
&lt;string, lnbits_wallet_id&gt;}' -H "Content-type:
application/json" -H "X-Api-Key: {{user.wallets[0].adminkey }}"
>curl -X POST {{ request.base_url
}}satspay/api/v1/charge/&lt;charge_id&gt; -d '{"onchainwallet":
&lt;string, watchonly_wallet_id&gt;, "description": &lt;string&gt;,
"webhook":&lt;string&gt;, "time": &lt;integer&gt;, "amount":
&lt;integer&gt;, "lnbitswallet": &lt;string, lnbits_wallet_id&gt;}'
-H "Content-type: application/json" -H "X-Api-Key:
{{user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -89,8 +90,9 @@
<code>[&lt;charge_object&gt;, ...]</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/&lt;charge_id&gt;
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}satspay/api/v1/charge/&lt;charge_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -112,8 +114,8 @@
<code>[&lt;charge_object&gt;, ...]</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"
>

View File

@ -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}))
}

View File

@ -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>

View File

@ -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
>

View File

@ -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)

View File

@ -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/&lt;tpos_id&gt; -H
"X-Api-Key: &lt;admin_key&gt;"
>curl -X DELETE {{ request.base_url
}}tpos/api/v1/tposs/&lt;tpos_id&gt; -H "X-Api-Key: &lt;admin_key&gt;"
</code>
</q-card-section>
</q-card>

View File

@ -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

View File

@ -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) {

View File

@ -37,8 +37,8 @@
<code>[&lt;wallets_object&gt;, ...]</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>[&lt;wallet_object&gt;, ...]</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/&lt;wallet_id&gt;
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}watchonly/api/v1/wallet/&lt;wallet_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -89,9 +90,10 @@
<code>[&lt;wallet_object&gt;, ...]</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":
&lt;string&gt;, "masterpub": &lt;string&gt;}' -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": &lt;string&gt;, "masterpub": &lt;string&gt;}' -H
"Content-type: application/json" -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>
@ -173,8 +175,9 @@
<code>[&lt;address_object&gt;, ...]</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/&lt;wallet_id&gt;
-H "X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}watchonly/api/v1/address/&lt;wallet_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -202,8 +205,8 @@
<code>[&lt;mempool_object&gt;, ...]</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>[&lt;mempool_object&gt;, ...]</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":
&lt;string&gt;}' -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": &lt;string&gt;}' -H "Content-type: application/json"
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -22,8 +22,8 @@
<code>[&lt;withdraw_link_object&gt;, ...]</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": &lt;string&gt;}</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/&lt;withdraw_id&gt; -H
"X-Api-Key: {{ user.wallets[0].inkey }}"
>curl -X GET {{ request.base_url
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>
@ -79,12 +80,12 @@
<code>{"lnurl": &lt;string&gt;}</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":
&lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
>curl -X POST {{ request.base_url }}withdraw/api/v1/links -d
'{"title": &lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
"max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;, "webhook_url": &lt;string&gt;}' -H
"Content-type: application/json" -H "X-Api-Key: {{
user.wallets[0].adminkey }}"
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;,
"webhook_url": &lt;string&gt;}' -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": &lt;string&gt;}</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/&lt;withdraw_id&gt; -d
'{"title": &lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
>curl -X PUT {{ request.base_url
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -d '{"title":
&lt;string&gt;, "min_withdrawable": &lt;integer&gt;,
"max_withdrawable": &lt;integer&gt;, "uses": &lt;integer&gt;,
"wait_time": &lt;integer&gt;, "is_unique": &lt;boolean&gt;}' -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/&lt;withdraw_id&gt;
-H "X-Api-Key: {{ user.wallets[0].adminkey }}"
>curl -X DELETE {{ request.base_url
}}withdraw/api/v1/links/&lt;withdraw_id&gt; -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/&lt;the_hash&gt;/&lt;lnurl_id&gt; -H "X-Api-Key: {{
user.wallets[0].inkey }}"
}}withdraw/api/v1/links/&lt;the_hash&gt;/&lt;lnurl_id&gt; -H
"X-Api-Key: {{ user.wallets[0].inkey }}"
</code>
</q-card-section>
</q-card>

View File

@ -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',

View File

@ -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> {{

View File

@ -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']

View File

@ -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>