mirror of
https://github.com/dpup/meshstream.git
synced 2026-06-14 03:04:42 +02:00
d95a74c1d7
- Migrate all three map components (Map, GoogleMap, NetworkMap) to MapLibre GL JS - Extract shared CARTO_DARK_STYLE constants into lib/mapStyle.ts - Move buildCircleCoords to lib/mapUtils.ts (was duplicated across components) - Rename exports: Map → LocationMap, GoogleMap → NodeLocationMap - Remove dead props (width, height, nightMode) from LocationMap interface - Lazy-mount GL contexts via IntersectionObserver to prevent WebGL exhaustion - Fix Math.spread RangeError in NetworkMap bounds calculation - Remove showLinks conditional render in favour of visibility layout property - Remove cursor state; set canvas cursor style directly on map interactions - Remove Google Maps API key env vars from .env.example and .env.local - Move Vite dev server to port 5747 (avoids cached redirect on 3000) - Fix CORS/404: set VITE_API_BASE_URL="" so browser uses Vite proxy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
754 B
TypeScript
28 lines
754 B
TypeScript
/**
|
|
* Application configuration, pulling from environment variables
|
|
*/
|
|
|
|
// Environment type
|
|
export const IS_DEV = import.meta.env.DEV;
|
|
export const IS_PROD = import.meta.env.PROD;
|
|
export const APP_ENV = import.meta.env.VITE_APP_ENV || "development";
|
|
|
|
// Site configuration
|
|
export const SITE_TITLE = import.meta.env.VITE_SITE_TITLE || "My Mesh";
|
|
export const SITE_DESCRIPTION =
|
|
import.meta.env.VITE_SITE_DESCRIPTION ||
|
|
"Realtime Meshtastic activity via MQTT.";
|
|
export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "";
|
|
|
|
// API endpoints
|
|
export const API_ENDPOINTS = {
|
|
STREAM: `${API_BASE_URL}/api/stream`,
|
|
};
|
|
|
|
/**
|
|
* Get the API endpoint for the stream
|
|
*/
|
|
export function getStreamEndpoint(): string {
|
|
return API_ENDPOINTS.STREAM;
|
|
}
|