From 2099a8b7bb5c4e6d79a90408ead3ea4989038042 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 15 Feb 2023 11:58:15 +0200 Subject: [PATCH] refactor: allow&block clean-up --- migrations.py | 1 - .../relay-details/relay-details.html | 71 +++---------------- .../components/relay-details/relay-details.js | 2 +- 3 files changed, 11 insertions(+), 63 deletions(-) diff --git a/migrations.py b/migrations.py index 6b81a94..e69c350 100644 --- a/migrations.py +++ b/migrations.py @@ -52,7 +52,6 @@ async def m001_initial(db): CREATE TABLE nostrrelay.accounts ( relay_id TEXT NOT NULL, pubkey TEXT NOT NULL, - sats {db.big_int} DEFAULT 0, storage {db.big_int} DEFAULT 0, paid_to_join BOOLEAN DEFAULT false, allowed BOOLEAN DEFAULT false, diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html index 0041c3c..d999f48 100644 --- a/static/components/relay-details/relay-details.html +++ b/static/components/relay-details/relay-details.html @@ -3,8 +3,7 @@ - - + @@ -528,11 +527,11 @@ - +
-
Allowed Public Key
-
+
Public Key:
+
-
+
AddAllow
-
-
-
-
- {{p}} +
-
-
-
- - -
-
-
Blocked Public Key
-
- -
-
- AddBlock
-
-
-
- {{p}} - -
-
+
diff --git a/static/components/relay-details/relay-details.js b/static/components/relay-details/relay-details.js index 01011db..99f75c4 100644 --- a/static/components/relay-details/relay-details.js +++ b/static/components/relay-details/relay-details.js @@ -126,11 +126,11 @@ async function relayDetails(path) { this.relay.config.allowedPublicKeys = this.relay.config.allowedPublicKeys.filter(p => p !== pubKey) }, - deleteBlockedPublicKey: function (pubKey) { this.relay.config.blockedPublicKeys = this.relay.config.blockedPublicKeys.filter(p => p !== pubKey) }, + addSkipAuthForEvent: function () { value = +this.skipEventKind if (this.relay.config.skipedAuthEvents.indexOf(value) != -1) {