diff --git a/config/appVersion.js b/config/appVersion.js index d8cae9dda..ada23fa4a 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.193"; +export const APP_VERSION = "1.1.194"; diff --git a/docs/config/README.md b/docs/config/README.md new file mode 100644 index 000000000..92b772c2f --- /dev/null +++ b/docs/config/README.md @@ -0,0 +1,38 @@ + + +# ⚙️ Konfigurationsübersicht (/config) + +Dieses Verzeichnis enthält zentrale Konfigurationsdateien, die das Verhalten der gesamten App steuern. +Hier sind die wichtigsten Dateien, ihre Aufgaben und Verlinkungen zur Dokumentation: + +--- + +## 📦 [`appVersion.js`](./appVersion.md) + +- Definiert die aktuelle Version der App (`APP_VERSION`) +- Wird z. B. im `VersionInfoModal` angezeigt + +--- + +## 🗺️ [`layers.js`](./layers.md) + +- Enthält alle Leaflet-Layergruppen für die Kartenanzeige +- Zentrale Steuerung der aktiven Layer: TALAS, GMA, Cisco, etc. + +--- + +## 📁 [`paths.js`](./paths.md) + +- Berechnet den Basis-Pfad aus `.env.local` +- Liefert `BASE_URL`, z. B. `/talas5` + +--- + +## 🌐 [`urls.js`](./urls.md) + +- Erzeugt dynamisch API- und Tile-URLs +- Verwendet `window.location.origin` → keine statischen Ports notwendig + +--- + +Diese Konfiguration macht das Projekt flexibel für mehrere Hosting-Umgebungen. diff --git a/docs/config/appVersion.md b/docs/config/appVersion.md new file mode 100644 index 000000000..092947d6f --- /dev/null +++ b/docs/config/appVersion.md @@ -0,0 +1,16 @@ + + +# 📦 appVersion.js + +Diese Datei exportiert die aktuelle App-Version, die an mehreren Stellen in der UI angezeigt werden kann – z. B. im `VersionInfoModal`. + +## Inhalt + +```js +export const APP_VERSION = "1.1.193"; +``` + +## Verwendung + +- Im Footer oder Info-Fenster +- Vergleich von Client- vs. Serverversion diff --git a/docs/config/config.md b/docs/config/config.md index 0d83f1ddb..ca279618f 100644 --- a/docs/config/config.md +++ b/docs/config/config.md @@ -1,3 +1,5 @@ + + # ⚙️ config.js – zentrale Konfiguration und Umgebungssteuerung ## Zweck diff --git a/docs/config/layers.md b/docs/config/layers.md new file mode 100644 index 000000000..dca2328a3 --- /dev/null +++ b/docs/config/layers.md @@ -0,0 +1,21 @@ + + +# 🗺️ layers.js + +Diese Datei definiert alle verfügbaren Leaflet-Layergruppen im Projekt. +Sie werden global als `MAP_LAYERS` exportiert und enthalten alle Systemtypen (TALAS, GMA, OTDR etc.). + +## Struktur + +```js +export const MAP_LAYERS = { + TALAS: new L.layerGroup(), + ... + lineLayer: new L.LayerGroup(), +}; +``` + +## Verwendung + +- Initialisierung der Leaflet-Karte +- Zuweisung von Markern und Linien diff --git a/docs/config/paths.md b/docs/config/paths.md new file mode 100644 index 000000000..39dfd3ba7 --- /dev/null +++ b/docs/config/paths.md @@ -0,0 +1,19 @@ + + +# 📁 paths.js + +Berechnet den sauberen `BASE_URL`-Pfad basierend auf `.env.local → NEXT_PUBLIC_BASE_PATH`. +Entfernt führende und abschließende Slashes. + +## Beispiel + +Wenn `NEXT_PUBLIC_BASE_PATH = "/talas5/"`, wird `BASE_URL = "/talas5"` gesetzt. + +```js +const BASE_PATH = basePathRaw.replace(/^\/|\/$/g, ""); +export const BASE_URL = BASE_PATH ? `/${BASE_PATH}` : ""; +``` + +## Nutzung + +- Für konsistente Pfadangaben im gesamten Projekt diff --git a/docs/config/urls.md b/docs/config/urls.md new file mode 100644 index 000000000..ec94784eb --- /dev/null +++ b/docs/config/urls.md @@ -0,0 +1,18 @@ + + +# 🌐 urls.js + +Diese Datei berechnet dynamisch URLs basierend auf `window.location.origin`. +Alle Endpunkte (API, Tiles, Server) werden ohne Port oder Hardcoding erzeugt. + +## Exportierte Konstanten + +- `BASE_URL` → `/api` +- `SERVER_URL` → Hostname ohne Port (für Links) +- `PROXY_TARGET` → z. B. `http://hostname:4000` +- `OFFLINE_TILE_LAYER` → Offline-Kachelpfad +- `MAP_TILES_LAYER` → Alias für `OFFLINE_TILE_LAYER` + +## Hinweis + +Alle Berechnungen erfolgen nur **clientseitig** (`typeof window !== "undefined"`).