Add PLATFORM_NAME
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
Vendored
+1
@@ -22,6 +22,7 @@ declare global {
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string
|
||||
readonly VITE_PLATFORM_NAME?: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user