chore: code format
This commit is contained in:
parent
4970334713
commit
23547f5187
3 changed files with 36 additions and 12 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
|
|
@ -27,6 +28,7 @@ from .tasks import wait_for_paid_invoices
|
|||
from .views import * # noqa
|
||||
from .views_api import * # noqa
|
||||
|
||||
|
||||
def nostrrelay_start():
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))
|
||||
|
|
|
|||
9
crud.py
9
crud.py
|
|
@ -2,7 +2,14 @@ import json
|
|||
from typing import Any, List, Optional, Tuple
|
||||
|
||||
from . import db
|
||||
from .models import NostrAccount, NostrEvent, NostrFilter, NostrRelay, RelayPublicSpec, RelaySpec
|
||||
from .models import (
|
||||
NostrAccount,
|
||||
NostrEvent,
|
||||
NostrFilter,
|
||||
NostrRelay,
|
||||
RelayPublicSpec,
|
||||
RelaySpec,
|
||||
)
|
||||
|
||||
########################## RELAYS ####################
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,11 @@
|
|||
></q-input>
|
||||
</q-card-section>
|
||||
<q-card-section v-if="relay.config.isPaidRelay">
|
||||
<q-btn @click="payToJoin" unelevated color="primary float-right"
|
||||
>Pay to join</q-btn
|
||||
<q-btn
|
||||
@click="createJoinInvoice"
|
||||
unelevated
|
||||
color="primary float-right"
|
||||
>Show Invoice</q-btn
|
||||
>
|
||||
<span class="text-bold">Cost to join: </span>
|
||||
|
||||
|
|
@ -46,17 +49,29 @@
|
|||
:content-inset-level="0.5"
|
||||
default-opened
|
||||
>
|
||||
<div class="row q-ma-md">
|
||||
<div class="col-3"></div>
|
||||
<div class="col-6 text-center">
|
||||
<q-btn
|
||||
outline
|
||||
color="grey"
|
||||
@click="copyText(joinInvoice)"
|
||||
>Copy invoice</q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col-3"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3"></div>
|
||||
<div class="col-6">
|
||||
<q-responsive :ratio="1">
|
||||
<qrcode
|
||||
:value="'lightning:'+joinInvoice"
|
||||
:options="{width: 340}"
|
||||
class="rounded-borders"
|
||||
></qrcode>
|
||||
</q-responsive>
|
||||
</div>
|
||||
<q-responsive :ratio="1">
|
||||
<qrcode
|
||||
:value="'lightning:'+joinInvoice"
|
||||
:options="{width: 340}"
|
||||
class="rounded-borders"
|
||||
></qrcode>
|
||||
</q-responsive>
|
||||
</div>
|
||||
<div class="col-3"></div>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
|
@ -152,7 +167,7 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
payToJoin: async function () {
|
||||
createJoinInvoice: async function () {
|
||||
if (!this.pubkey) {
|
||||
this.$q.notify({
|
||||
timeout: 5000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue