@ -4,116 +4,116 @@
: relay = "relay"
: result = "result"
/ >
<!-- < NavComponent / > -- >
< div id = "wrapper" >
< row container :gutter ="12" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< h1 > { { relayUrl ( ) } } < / h1 >
< / column >
< / row >
< row container :gutter ="12" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< NavComponent :relays ="relays" / >
< / column >
< / row >
< row container :gutter ="12" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< div style = "display: none" > { { result } } < / div > <!-- ? -- >
< br >
< span class = "badges" >
< span > < img :src ="badgeCheck('connect')" / > < / span >
< span > < img :src ="badgeCheck('read')" / > < / span >
< span > < img :src ="badgeCheck('write')" / > < / span >
< / span >
< / column >
< / row >
< br / >
< div id = "wrapper" >
< row container :gutter ="12" v-if ="!result?.check?.connect" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
This relay appears to be offline .
< / column >
< / row >
< HeaderComponent :relays ="relays" / >
< br / >
< div id = "relay-wrapper" >
< row container :gutter ="12" v-if ="result?.check?.connect" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< row container :gutter ="12" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< span v -tooltip : top.tooltip = " ' Click to copy ' " style = "display:block" >
< h2 @click ="copy(relayUrl())" > {{ relayUrl ( ) }} < / h2 >
< / span >
< / column >
< / row >
< row container :gutter ="12" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< span class = "badges" >
< span > < img :src ="badgeCheck('connect')" / > < / span >
< span > < img :src ="badgeCheck('read')" / > < / span >
< span > < img :src ="badgeCheck('write')" / > < / span >
< / span >
< span v-if ="result.info?.supported_nips" class="badges" >
< span v-for ="(nip) in result.info.supported_nips" :key="`${relay}_${nip}`" >
< a :href ="nipLink(nip)" target = "_blank" > < img :src ="badgeLink(nip)" / > < / a >
< span v-for ="(nip) in result.info.supported_nips" :key="`${relay}_${nip}`" >
< a :href ="nipLink(nip)" target = "_blank" > < img :src ="badgeLink(nip)" / > < / a >
< / span >
< / span >
< / span >
< / column >
< / row >
< table v-if ="result.info" >
< tr >
< th colspan = "2" > < h4 > Info < / h4 > < / th >
< / tr >
< tbody v-if ="result.info" >
< tr v-for ="(value, key) in Object.entries(result.info).filter(value => value[0] != 'id' && value[0] != 'supported_nips')" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td v-if ="value[0]!='contact' && value[0]!='pubkey' && value[0]!='software' && value[0]!='version'" > {{ value [ 1 ] }} < / td >
< td v-if ="value[0]=='contact'" > < SafeMail :email ="value[1]" / > < / td >
< td v-if ="value[0]=='pubkey' || value[0]=='version'" > < code > { { value [ 1 ] } } < / code > < / td >
< td v-if ="value[0]=='software'" > < a :href ="value[1]" > { { value [ 1 ] } } < / a > < / td >
< / tr >
< / tbody >
< tr v-if ="Object.entries(result.info).length == 0 && result.check.connect" >
Relay does not have NIP - 11 support , or the administrator has not configured the relay to return information .
< / tr >
< / table >
< h4 > Identities < / h4 >
< table v-if ="result.identities" >
< tr v-for ="(value, key) in Object.entries(result?.identities)" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > < code > { { value [ 1 ] } } < / code > < / td >
< / tr >
< tr v-if ="Object.entries(result.identities).length==0" >
Relay does not provide NIP - 05 support and has not registered an administrator key .
< / tr >
< / table >
< div style = "display: none" > { { result } } < / div > <!-- ? -- >
< row container :gutter ="12" v-if ="!result?.check?.connect" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
This relay appears to be offline .
< / column >
< column :xs ="12" :md ="6" :lg ="6" class = "title-card" >
< / row >
< row container :gutter ="12" v-if ="result?.check?.connect" >
< column :xs ="12" :md ="12" :lg ="12" class = "title-card" >
< table v-if ="result.info" >
< tr >
< th colspan = "2" > < h4 > Info < / h4 > < / th >
< / tr >
< tbody v-if ="result.info" >
< tr v-for ="(value, key) in Object.entries(result.info).filter(value => value[0] != 'id' && value[0] != 'supported_nips')" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td v-if ="value[0]!='contact' && value[0]!='pubkey' && value[0]!='software' && value[0]!='version'" > {{ value [ 1 ] }} < / td >
< td v-if ="value[0]=='contact'" > < SafeMail :email ="value[1]" / > < / td >
< td v-if ="value[0]=='pubkey' || value[0]=='version'" > < code > { { value [ 1 ] } } < / code > < / td >
< td v-if ="value[0]=='software'" > < a :href ="value[1]" > { { value [ 1 ] } } < / a > < / td >
< / tr >
< / tbody >
< tr v-if ="Object.entries(result.info).length == 0 && result.check.connect" >
Relay does not have NIP - 11 support , or the administrator has not configured the relay to return information .
< / tr >
< / table >
< h4 > GEO { { geo ? . countryCode ? getFlag ( ) : '' } } < / h4 >
< table v-if ="geo[relay]" >
< tr v-for ="(value, key) in Object.entries(geo[relay])" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > { { value [ 1 ] } } < / td >
< / tr >
< / table >
< / column >
< column :xs ="12" :md ="6" :lg ="6" class = "title-card" >
< h4 > DNS < / h4 >
< table v-if ="geo[relay]" >
< tr v-for ="(value, key) in Object.entries(geo[relay].dns)" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > { { value [ 1 ] } } < / td >
< / tr >
< / table >
< div style = "display: none" > { { result } } < / div > <!-- ? -- >
< / column >
< / row >
< table v-if ="result.identities" >
< tr >
< th colspan = "2" > < h4 > Identities < / h4 > < / th >
< / tr >
< tbody v-if ="result.identities" >
< tr v-for ="(value, key) in Object.entries(result?.identities)" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > < code > { { value [ 1 ] } } < / code > < / td >
< / tr >
< tr v-if ="Object.entries(result.identities).length==0" >
Relay does not provide NIP - 05 support and has not registered an administrator key .
< / tr >
< / tbody >
< / table >
< / column >
< column :xs ="12" :md ="6" :lg ="6" class = "title-card" >
< table v-if ="geo[relay]" >
< tr >
< th colspan = "2" > < h4 > GEO { { geo ? . countryCode ? getFlag ( ) : '' } } < / h4 > < / th >
< / tr >
< tbody v-if ="geo[relay]" >
< tr v-for ="(value, key) in Object.entries(geo[relay])" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > { { value [ 1 ] } } < / td >
< / tr >
< / tbody >
< / table >
< / column >
< column :xs ="12" :md ="6" :lg ="6" class = "title-card" >
< table v-if ="geo[relay]" >
< tr >
< th colspan = "2" > < h4 > DNS < / h4 > < / th >
< / tr >
< tbody v-if ="geo[relay]" >
< tr v-for ="(value, key) in Object.entries(geo[relay].dns)" :key="`${value}_${key}`" >
< td > { { value [ 0 ] } } < / td >
< td > { { value [ 1 ] } } < / td >
< / tr >
< / tbody >
< / table >
< / column >
< / row >
<!-- < RefreshComponent
: relay = "relay"
/ > - - >
< / div >
<!-- < RefreshComponent
: relay = "relay"
/ > - - >
< span class = "credit" > < a href = "http://sandwich.farm" > Another 🥪 by sandwich . farm < / a > , built with < a href = "https://github.com/jb55/nostr-js" > nostr - js < / a > and < a href = "https://github.com/dskvr/nostr-relay-inspector" > nostr - relay - inspector < / a > , inspired by < a href = "https://github.com/fiatjaf/nostr-relay-registry" > nostr - relay - registry < / a > < / span >
< / div >
< / template >
@ -123,7 +123,8 @@ import { defineComponent} from 'vue'
import { useStorage } from "vue3-storage" ;
import LeafletSingleComponent from '../components/LeafletSingleComponent.vue'
import NavComponent from '../components/NavComponent.vue'
import HeaderComponent from '../components/HeaderComponent.vue'
/ / i m p o r t N a v C o m p o n e n t f r o m ' . . / c o m p o n e n t s / N a v C o m p o n e n t . v u e '
/ / i m p o r t R e f r e s h C o m p o n e n t f r o m ' . . / c o m p o n e n t s / R e f r e s h C o m p o n e n t . v u e '
import { Row , Column } from 'vue-grid-responsive' ;
@ -160,6 +161,14 @@ const localMethods = {
nipLink ( key ) {
return ` https://github.com/nostr-protocol/nips/blob/master/ ${ this . nipSignature ( key ) } .md `
} ,
async copy ( text ) {
try {
await navigator . clipboard . writeText ( text ) ;
} catch ( $e ) {
/ / c o n s o l e . l o g ( ' C a n n o t c o p y ' ) ;
}
} ,
}
export default defineComponent ( {
@ -170,8 +179,9 @@ export default defineComponent({
Row ,
Column ,
LeafletSingleComponent ,
NavComponent ,
/ / N a v C o m p o n e n t ,
SafeMail ,
HeaderComponent ,
/ / R e f r e s h C o m p o n e n t ,
} ,
@ -223,13 +233,16 @@ export default defineComponent({
ul , ul li { padding : 0 ; margin : 0 ; list - style : none ; }
td { padding : 5 px 10 px ; }
th h4 { text - align : center ; padding : 5 px 10 px ; margin : 0 0 6 px ; background : # f0f0f0 ; }
table { width : 90 % ; max - width : 90 % ; margin : 0 auto 20 px ; border : 2 px solid # f5f5f5 ; padding : 20 px }
table { margin : 20 px 10 px 20 px ; border : 2 px solid # f5f5f5 ; padding : 20 px }
tr td : first - child { text - align : right }
tr td : last - child { text - align : left }
. indicator { display : table - cell ; width : 33 % ; font - weight : bold ; text - align : center ! important ; color : white ; text - transform : uppercase ; font - size : 0.8 em }
body , . grid - column { padding : 0 ; margin : 0 ; }
. badges { display : block ; margin : 10 px 0 0 }
. badges { display : block ; margin : 10 px 0 11 px }
. badges > span { margin - right : 5 px }
# wrapper { max - width : 800 px }
h1 { margin : 25 px 0 15 px ; padding : 0 0 10 px ; border - bottom : 3 px solid # e9e9e9 }
# relay - wrapper { margin : 50 px 0 20 px ; padding : 20 px 0 }
h2 { cursor : pointer ; font - size : 40 pt ; margin : 0 px 0 15 px ; padding : 0 0 10 px ; border - bottom : 3 px solid # e9e9e9 }
< / style >