mirror of
https://github.com/aljazceru/nostr-watch.git
synced 2025-12-17 05:24:19 +01:00
add alternative rows, resolves #28
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
<span>NIP-11</span>
|
<span>NIP-11</span>
|
||||||
</th> -->
|
</th> -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="relay in query(section)" :key="{relay}" :class="getResultClass(relay)" class="relay">
|
<tr v-for="(relay, index) in query(section)" :key="{relay}" :class="getResultClass(relay, index)" class="relay">
|
||||||
<RelaySingleComponent
|
<RelaySingleComponent
|
||||||
:relay="relay"
|
:relay="relay"
|
||||||
:result="result[relay]"
|
:result="result[relay]"
|
||||||
@@ -149,12 +149,13 @@ export default defineComponent({
|
|||||||
restricted: this.section == "restricted"
|
restricted: this.section == "restricted"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getResultClass (relay) {
|
getResultClass (relay, index) {
|
||||||
return {
|
return {
|
||||||
loaded: this.result?.[relay]?.state == 'complete',
|
loaded: this.result?.[relay]?.state == 'complete',
|
||||||
online: this.section != "offline",
|
online: this.section != "offline",
|
||||||
offline: this.section == "offline",
|
offline: this.section == "offline",
|
||||||
public: this.section == "public"
|
public: this.section == "public",
|
||||||
|
even: index % 2,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
query (aggregate) {
|
query (aggregate) {
|
||||||
@@ -255,11 +256,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nip-11 a { cursor: pointer }
|
.nip-11 a { cursor: pointer }
|
||||||
</style>
|
|
||||||
|
|
||||||
<style scoped>
|
tr.even {
|
||||||
.dark-mode div ::v-deep(.modal-content) {
|
background:#f9f9f9
|
||||||
border-color: #2d3748;
|
|
||||||
background-color: #1a202c;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<span>NIP-11</span>
|
<span>NIP-11</span>
|
||||||
</th> -->
|
</th> -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="relay in sortByLatency()" :key="{relay}" class="relay" :class="getResultClass(relay)">
|
<tr v-for="(relay, index) in sortByLatency()" :key="{relay}" class="relay" :class="getResultClass(relay, index)">
|
||||||
<RelaySingleComponent
|
<RelaySingleComponent
|
||||||
:relay="relay"
|
:relay="relay"
|
||||||
:result="result[relay]"
|
:result="result[relay]"
|
||||||
@@ -126,9 +126,10 @@ export default defineComponent({
|
|||||||
// restricted: this.section == "restricted"
|
// restricted: this.section == "restricted"
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
getResultClass (relay) {
|
getResultClass (relay, index) {
|
||||||
return {
|
return {
|
||||||
loaded: this.result?.[relay]?.state == 'complete'
|
loaded: this.result?.[relay]?.state == 'complete',
|
||||||
|
even: index % 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sort_by_latency(ascending) {
|
sort_by_latency(ascending) {
|
||||||
@@ -252,11 +253,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nip-11 a { cursor: pointer }
|
.nip-11 a { cursor: pointer }
|
||||||
</style>
|
|
||||||
|
|
||||||
<style scoped>
|
tr.even {
|
||||||
.dark-mode div ::v-deep(.modal-content) {
|
background:#f9f9f9
|
||||||
border-color: #2d3748;
|
|
||||||
background-color: #1a202c;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -276,4 +276,9 @@ td.verified span {
|
|||||||
position:relative;
|
position:relative;
|
||||||
left:-7px;
|
left:-7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding-top:2px;
|
||||||
|
padding-bottom:2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -301,3 +301,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
table {
|
||||||
|
border-collapse: collapse !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -134,4 +134,7 @@ export default defineComponent({
|
|||||||
position:relative;
|
position:relative;
|
||||||
z-index:1;
|
z-index:1;
|
||||||
}
|
}
|
||||||
|
table {
|
||||||
|
border-collapse: collapse !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user