mirror of
https://github.com/aljazceru/njump.git
synced 2026-02-23 06:54:20 +01:00
add jumble.
This commit is contained in:
@@ -22,7 +22,8 @@ var (
|
||||
primalWeb = ClientReference{ID: "primal", Name: "Primal", Base: "https://primal.net/e/{code}", Platform: "web"}
|
||||
nostrudel = ClientReference{ID: "nostrudel", Name: "Nostrudel", Base: "https://nostrudel.ninja/#/n/{code}", Platform: "web"}
|
||||
nostter = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/{code}", Platform: "web"}
|
||||
nostterRelay = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/relays/{code}", Platform: "web"}
|
||||
nostterRelay = ClientReference{ID: "nostter", Name: "Nostter", Base: "https://nostter.app/relays/wss%3A%2F%2F{code}", Platform: "web"}
|
||||
jumble = ClientReference{ID: "jumble", Name: "Jumble", Base: "https://jumble.social/?r=wss://{code}", Platform: "web"}
|
||||
coracle = ClientReference{ID: "coracle", Name: "Coracle", Base: "https://coracle.social/{code}", Platform: "web"}
|
||||
coracleRelay = ClientReference{ID: "coracle", Name: "Coracle", Base: "https://coracle.social/relays/{code}", Platform: "web"}
|
||||
|
||||
@@ -63,7 +64,7 @@ func generateClientList(
|
||||
case -1: // relays
|
||||
clients = []ClientReference{
|
||||
native,
|
||||
nostterRelay, coracleRelay, nostrrrRelay,
|
||||
jumble, nostterRelay, nostrrrRelay, coracleRelay,
|
||||
}
|
||||
case 1, 6:
|
||||
clients = []ClientReference{
|
||||
|
||||
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -98,12 +97,7 @@ func renderRelayPage(w http.ResponseWriter, r *http.Request) {
|
||||
Proxy: "https://" + hostname + "/njump/proxy?src=",
|
||||
LastNotes: renderableLastNotes,
|
||||
ModifiedAt: lastEventAt.Format("2006-01-02T15:04:05Z07:00"),
|
||||
Clients: generateClientList(-1, hostname, func(cr ClientReference, s string) string {
|
||||
if cr == nostterRelay {
|
||||
return strings.Replace(s, hostname, url.PathEscape("wss://"+hostname), 1)
|
||||
}
|
||||
return s
|
||||
}),
|
||||
Clients: generateClientList(-1, hostname),
|
||||
}).Render(r.Context(), w)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user