mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
Make relays configurable
This commit is contained in:
2
.env
2
.env
@@ -8,5 +8,7 @@ VITE_PLATFORM_LOGO=static/flotilla.png
|
|||||||
VITE_PLATFORM_RELAY=
|
VITE_PLATFORM_RELAY=
|
||||||
VITE_PLATFORM_ACCENT="#7161FF"
|
VITE_PLATFORM_ACCENT="#7161FF"
|
||||||
VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities."
|
VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities."
|
||||||
|
VITE_INDEXER_RELAYS=wss://purplepag.es/,wss://relay.damus.io/,wss://relay.nostr.band/
|
||||||
|
VITE_SIGNER_RELAYS=wss://relay.nsec.app/,wss://bucket.coracle.social/
|
||||||
VITE_GLITCHTIP_API_KEY=
|
VITE_GLITCHTIP_API_KEY=
|
||||||
GLITCHTIP_AUTH_TOKEN=
|
GLITCHTIP_AUTH_TOKEN=
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
fromPairs,
|
fromPairs,
|
||||||
memoize,
|
memoize,
|
||||||
addToMapKey,
|
addToMapKey,
|
||||||
|
identity,
|
||||||
} from "@welshman/lib"
|
} from "@welshman/lib"
|
||||||
import {
|
import {
|
||||||
getIdFilters,
|
getIdFilters,
|
||||||
@@ -68,6 +69,8 @@ import type {Thunk, Relay} from "@welshman/app"
|
|||||||
import type {SubscribeRequestWithHandlers} from "@welshman/net"
|
import type {SubscribeRequestWithHandlers} from "@welshman/net"
|
||||||
import {deriveEvents, deriveEventsMapped, withGetter, synced} from "@welshman/store"
|
import {deriveEvents, deriveEventsMapped, withGetter, synced} from "@welshman/store"
|
||||||
|
|
||||||
|
export const fromCsv = (s: string) => (s || "").split(",").filter(identity)
|
||||||
|
|
||||||
export const ROOM = "h"
|
export const ROOM = "h"
|
||||||
|
|
||||||
export const GENERAL = "_"
|
export const GENERAL = "_"
|
||||||
@@ -83,13 +86,9 @@ export const NOTIFIER_PUBKEY = "27b7c2ed89ef78322114225ea3ebf5f72c7767c2528d4d0c
|
|||||||
// export const NOTIFIER_RELAY = 'wss://notifier.flotilla.social/'
|
// export const NOTIFIER_RELAY = 'wss://notifier.flotilla.social/'
|
||||||
export const NOTIFIER_RELAY = "ws://localhost:4738/"
|
export const NOTIFIER_RELAY = "ws://localhost:4738/"
|
||||||
|
|
||||||
export const INDEXER_RELAYS = [
|
export const INDEXER_RELAYS = fromCsv(import.meta.env.VITE_INDEXER_RELAYS)
|
||||||
"wss://purplepag.es/",
|
|
||||||
"wss://relay.damus.io/",
|
|
||||||
"wss://relay.nostr.band/",
|
|
||||||
]
|
|
||||||
|
|
||||||
export const SIGNER_RELAYS = ["wss://relay.nsec.app/", "wss://bucket.coracle.social/"]
|
export const SIGNER_RELAYS = fromCsv(import.meta.env.VITE_SIGNER_RELAYS)
|
||||||
|
|
||||||
export const PLATFORM_URL = window.location.origin
|
export const PLATFORM_URL = window.location.origin
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,12 @@
|
|||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
import CardButton from "@lib/components/CardButton.svelte"
|
import CardButton from "@lib/components/CardButton.svelte"
|
||||||
import SpaceAdd from "@app/components/SpaceAdd.svelte"
|
import SpaceAdd from "@app/components/SpaceAdd.svelte"
|
||||||
import ChatStart from "@app/components/ChatStart.svelte"
|
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
import {makeSpacePath} from "@app/routes"
|
import {makeSpacePath} from "@app/routes"
|
||||||
import {PLATFORM_NAME, PLATFORM_RELAY} from "@app/state"
|
import {PLATFORM_NAME, PLATFORM_RELAY} from "@app/state"
|
||||||
|
|
||||||
const addSpace = () => pushModal(SpaceAdd)
|
const addSpace = () => pushModal(SpaceAdd)
|
||||||
|
|
||||||
const startChat = () => pushModal(ChatStart)
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (PLATFORM_RELAY) {
|
if (PLATFORM_RELAY) {
|
||||||
goto(makeSpacePath(PLATFORM_RELAY))
|
goto(makeSpacePath(PLATFORM_RELAY))
|
||||||
@@ -42,7 +39,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</CardButton>
|
</CardButton>
|
||||||
</Button>
|
</Button>
|
||||||
<Link href="/people">
|
<Link href="/discover">
|
||||||
<CardButton>
|
<CardButton>
|
||||||
{#snippet icon()}
|
{#snippet icon()}
|
||||||
<div><Icon icon="compass" size={7} /></div>
|
<div><Icon icon="compass" size={7} /></div>
|
||||||
@@ -51,11 +48,11 @@
|
|||||||
<div>Browse the network</div>
|
<div>Browse the network</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet info()}
|
{#snippet info()}
|
||||||
<div>Find your people on the nostr network.</div>
|
<div>Find communities on the nostr network.</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</CardButton>
|
</CardButton>
|
||||||
</Link>
|
</Link>
|
||||||
<Button onclick={startChat}>
|
<Link href="/people">
|
||||||
<CardButton>
|
<CardButton>
|
||||||
{#snippet icon()}
|
{#snippet icon()}
|
||||||
<div><Icon icon="chat-round" size={7} /></div>
|
<div><Icon icon="chat-round" size={7} /></div>
|
||||||
@@ -67,7 +64,7 @@
|
|||||||
<div>Use nostr's encrypted group chats to stay in touch.</div>
|
<div>Use nostr's encrypted group chats to stay in touch.</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</CardButton>
|
</CardButton>
|
||||||
</Button>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user