From 23547f51874eb3eee0257dc36efc0b6b284395e8 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Mon, 13 Feb 2023 14:41:33 +0200 Subject: [PATCH] chore: code format --- __init__.py | 2 ++ crud.py | 9 +++++++- templates/nostrrelay/public.html | 37 ++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/__init__.py b/__init__.py index b376e2e..4067bb4 100644 --- a/__init__.py +++ b/__init__.py @@ -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)) diff --git a/crud.py b/crud.py index 14a1016..83cb7fb 100644 --- a/crud.py +++ b/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 #################### diff --git a/templates/nostrrelay/public.html b/templates/nostrrelay/public.html index a0ec3c3..6c08824 100644 --- a/templates/nostrrelay/public.html +++ b/templates/nostrrelay/public.html @@ -24,8 +24,11 @@ > - Pay to joinShow Invoice Cost to join: @@ -46,17 +49,29 @@ :content-inset-level="0.5" default-opened > +
+
+
+ Copy invoice +
+
+
- - - -
+ + + +
@@ -152,7 +167,7 @@ } }, methods: { - payToJoin: async function () { + createJoinInvoice: async function () { if (!this.pubkey) { this.$q.notify({ timeout: 5000,