From 8d3ce398e174ffe78196499d8b1d9a081998c15a Mon Sep 17 00:00:00 2001 From: dskvr Date: Wed, 23 Nov 2022 16:38:20 +0100 Subject: [PATCH] fully ported to nostr-js --- codes.yaml | 9 +- package.json | 2 + relays.yaml | 3 +- src/components/BaseRelays.vue | 560 +++++++++++++++++++--------------- src/main.js | 8 +- 5 files changed, 324 insertions(+), 258 deletions(-) diff --git a/codes.yaml b/codes.yaml index 4361167..361980d 100644 --- a/codes.yaml +++ b/codes.yaml @@ -1,7 +1,7 @@ messages: 11cb5ca38038c3eb41bd014814f6e2e18da18ff1: text: "we don't accept any events" - code: "READ_ONLY" + code: "CONNECT_ONLY" 1003d4ec1466033d0dcc4a1babc6c5f409784593: text: "NIP-05 verification needed to publish events" @@ -24,18 +24,21 @@ messages: text: 'failed to save event from 5a462fa6044b4b8da318528a6987a45e3adf832bd1c64bd6910eacfecdf07541' code: 'BLOCKS_WRITE_STATUS_CHECK' codes: + CONNECT_ONLY: + type: "very_restricted" + description: "This relay can be connected to, but has zero read/write access" READ_ONLY: type: "write_restricted" description: "This relay only access read queries" WRITE_ONLY: - type: "write_restricted" + type: "read_restricted" description: "This relay only accepts the publishing of events" NIP_05_REQUIRED: type: "write_restricted" description: "This relay only accepts the publishing of events from NIP-05 verified public keys" WHITELIST_REQUIRED: type: "write_restricted" - description: "This relay onoly accepts the publishing of events from whitelisted public keys" + description: "This relay only accepts the publishing of events from whitelisted public keys" BLOCKS_WRITE_STATUS_CHECK: type: "maybe_public" description: "This relay blocks the events that enable us to test writing to the relay, so there's some uncertainty" diff --git a/package.json b/package.json index cda19ca..7d04aac 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,8 @@ "nostr-tools": "0.24.1", "onion-regex": "2.0.8", "requests": "0.3.0", + "sass": "1.56.1", + "sass-loader": "13.2.0", "socks-proxy-agent": "7.0.0", "stream-browserify": "3.0.0", "vue": "^3.2.13", diff --git a/relays.yaml b/relays.yaml index 54a8436..4db4526 100644 --- a/relays.yaml +++ b/relays.yaml @@ -6,11 +6,11 @@ relays: - 'wss://nostr-relay.wlvs.space' - 'wss://nostr.onsats.org' - 'wss://nostr-relay.untethr.me' + - 'wss://nostr.unknown.place' - 'wss://nostr.semisol.dev' - 'wss://nostr-pub.semisol.dev' - 'wss://nostr-verified.wellorder.net' - 'wss://nostr.drss.io' - - 'wss://nostr.unknown.place' - 'wss://relay.damus.io' - 'wss://nostr.openchain.fr' - 'wss://nostr.delo.software' @@ -24,4 +24,5 @@ relays: - 'wss://nostr-pub.wellorder.net' - 'wss://relayer.fiatjaf.com' - 'wss://nostr.rocks' + - 'wss://none.sandwich.farm' - 'wss://nostr.sandwich.farm' diff --git a/src/components/BaseRelays.vue b/src/components/BaseRelays.vue index d7bf0cb..3becb85 100644 --- a/src/components/BaseRelays.vue +++ b/src/components/BaseRelays.vue @@ -1,7 +1,7 @@ @@ -589,7 +596,8 @@ tr.relay.loaded td { } .badge.write-only, -.badge.read-only { +.badge.read-only, +table.online.public .indicator.failure { background-color:orange !important; } @@ -599,22 +607,22 @@ tr.relay.loaded td { border-style: solid; } -.indicator.silver { +.indicator.pernding { background-color: #c0c0c0; border-color: rgba(55,55,55,0.5); } -.indicator.green { +.indicator.success { background-color: green; border-color: rgba(0,255,0,0.5); } -.indicator.red { +.indicator.failure { background-color: red; border-color: rgba(255,0,0,0.5); } -.indicator.orange { +.indicator.caution { background-color: orange; border-color: rgba(255, 191, 0,0.5); } @@ -678,4 +686,50 @@ table.online .relay-url { cursor: pointer; } +.verified-shape-wrapper { + display:inline-block; + width: 16px; + height: 16px; +} + +.shape.verified { + background: blue; + width: 16px; + height: 16px; + position: relative; + top: 5px; + left:-5px; + text-align: center; +} +.shape.verified:before, +.shape.verified:after { + content: ""; + position: absolute; + top: 0; + left: 0; + height: 13px; + width: 13px; + background: blue; +} +.shape.verified:before { + transform: rotate(30deg); +} +.shape.verified:after { + transform: rotate(75deg); +} + +sup { + color: #c0c0c0; + font-size:15px; +} + +.credit { + display:inline-block; + text-decoration:none; + color:#333; + text-transform: uppercase; + font-size:12px; + margin-top:25px; +} + diff --git a/src/main.js b/src/main.js index 01433bc..e206523 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,10 @@ import { createApp } from 'vue' import App from './App.vue' +import "./styles/main.scss" +import directives from "./directives/" -createApp(App).mount('#app') +const app = createApp(App) + +directives(app); + +app.mount('#app')