Add PLATFORM_NAME

This commit is contained in:
Jon Staab
2026-02-26 10:38:07 -08:00
parent 58d3036d31
commit e9f56295de
5 changed files with 9 additions and 2 deletions
+3
View File
@@ -1,2 +1,5 @@
# Backend API base URL
VITE_API_URL=http://127.0.0.1:3000
# Platform display name shown in UI
VITE_PLATFORM_NAME=Caravel
+2 -1
View File
@@ -1,11 +1,12 @@
import { A } from "@solidjs/router"
import { PLATFORM_NAME } from "../lib/nostr"
export default function Navbar() {
return (
<nav class="bg-white border-b border-gray-200">
<div class="max-w-5xl mx-auto px-4 h-14 flex items-center justify-between">
<A href="/" class="font-bold text-gray-900 text-lg">
Relay Hosting
{PLATFORM_NAME}
</A>
<div class="flex items-center gap-4">
<A href="/relays" class="text-sm text-gray-600 hover:text-gray-900">
+1
View File
@@ -22,6 +22,7 @@ declare global {
interface ImportMetaEnv {
readonly VITE_API_URL: string
readonly VITE_PLATFORM_NAME?: string
}
interface ImportMeta {
+1
View File
@@ -6,6 +6,7 @@ import { registerCommonAccountTypes } from "applesauce-accounts/accounts"
import { NostrConnectSigner } from "applesauce-signers"
export const API_URL = import.meta.env.VITE_API_URL
export const PLATFORM_NAME = import.meta.env.VITE_PLATFORM_NAME || "Caravel"
export const eventStore = new EventStore()
export const pool = new RelayPool()
+2 -1
View File
@@ -4,6 +4,7 @@ import { ExtensionAccount, NostrConnectAccount, PasswordAccount, PrivateKeyAccou
import { PasswordSigner } from "applesauce-signers"
import QrScanner from "qr-scanner"
import { activateAccount } from "../lib/nostr"
import { PLATFORM_NAME } from "../lib/nostr"
const NIP46_RELAYS = ['wss://bucket.coracle.social', 'wss://ephemeral.snowflare.cc']
@@ -74,7 +75,7 @@ export default function Login() {
const NostrConnectSigner = await loadNostrConnectSigner()
const signer = new NostrConnectSigner({ relays: NIP46_RELAYS })
const uri = signer.getNostrConnectURI({
name: "Caravel",
name: PLATFORM_NAME,
url: window.location.origin,
})
setNostrConnectUri(uri)