refactor: basePath als Umgebungsvariable eingeführt (NEXT_PUBLIC_BASE_PATH)

- alle festen "/talas5/" Pfade entfernt
- dynamischer basePath für API-Links und Station öffnen
- README.md und CHANGELOG.md aktualisiert
- Version erhöht auf 1.1.188
This commit is contained in:
ISA
2025-05-27 11:58:28 +02:00
parent 1a4d5e6112
commit cdca624874
17 changed files with 99 additions and 28 deletions

View File

@@ -17,6 +17,8 @@ const determinePriority = (iconPath, priorityConfig) => {
};
export const createAndSetDevices = async (systemId, setMarkersFunction, GisSystemStatic, priorityConfig) => {
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
try {
const state = store.getState();
const staticDistrictData = selectGisStationsStaticDistrict(state); // { Points: [...] }
@@ -100,7 +102,7 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
const separator = map.contextmenu.addItem({ separator: true });
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/` : `${window.location.origin}/talas5/`;
const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80${basePath}/` : `${window.location.origin}${basePath}/`;
const detailsItem = map.contextmenu.addItem({
text: "Station öffnen (Tab)",