mirror of
https://github.com/github-tijlxyz/khatru-pyramid.git
synced 2025-06-23 16:05:28 +00:00
"browse" goes to jumble instead of self-hosted jouble.
This commit is contained in:
parent
34ab0272c7
commit
66e0c849fc
28
handler.go
28
handler.go
@ -91,31 +91,3 @@ func reportsViewerHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
reportsPage(events, getLoggedUser(r)).Render(r.Context(), w)
|
||||
}
|
||||
|
||||
func joubleHandler(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, `
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>pyramid</title>
|
||||
<script>
|
||||
window.relayGroups = [{
|
||||
groupName: 'pyramid',
|
||||
relayUrls: [location.href.replace('http', 'ws').replace('/browse', '')],
|
||||
isActive: true,
|
||||
}]
|
||||
window.hideRelaySettings = true
|
||||
</script>
|
||||
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/jouble@0.0.6/dist/index.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/jouble@0.0.6/dist/index.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/window.nostr.js@0.4.7/dist/window.nostr.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
`)
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ templ layout(loggedUser string) {
|
||||
</div>
|
||||
<nav class="flex flex-1 items-center justify-center">
|
||||
<a href="/" class="text-gray-600 hover:bg-gray-200 rounded-md px-3 py-2 font-medium" hx-boost="true" hx-target="main" hx-select="main">invite tree</a>
|
||||
<a href="/browse" class="text-gray-600 hover:bg-gray-200 rounded-md px-3 py-2 font-medium">browse</a>
|
||||
<a target="_blank" class="text-gray-600 hover:bg-gray-200 rounded-md px-3 py-2 font-medium" _="on load set my href to `https://jumble.social/?r=${location.hostname}`">browse</a>
|
||||
<a href="/reports" class="text-gray-600 hover:bg-gray-200 rounded-md px-3 py-2 font-medium" hx-boost="true" hx-target="main" hx-select="main">reports</a>
|
||||
if loggedUser == s.RelayPubkey {
|
||||
<a href="/cleanup" class="text-gray-600 hover:bg-gray-200 rounded-md px-3 py-2 font-medium">clear stuff</a>
|
||||
|
1
main.go
1
main.go
@ -135,7 +135,6 @@ func main() {
|
||||
relay.Router().HandleFunc("/remove-from-whitelist", removeFromWhitelistHandler)
|
||||
relay.Router().HandleFunc("/cleanup", cleanupStuffFromExcludedUsersHandler)
|
||||
relay.Router().HandleFunc("/reports", reportsViewerHandler)
|
||||
relay.Router().HandleFunc("/browse/", joubleHandler)
|
||||
relay.Router().Handle("/static/", http.FileServer(http.FS(static)))
|
||||
relay.Router().HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
||||
if s.RelayIcon != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user