From 599ed2b5be817f91ba93361b1c9f5cc874dd0e6f Mon Sep 17 00:00:00 2001 From: SMLunchen Date: Sun, 30 Aug 2026 20:05:57 +0200 Subject: [PATCH] fix: tile download for offline usage would use tile url ALWAYS no matter what was selected in drop down. --- .gitignore | 9 +++ CHANGELOG.md | 10 +++ MeshhessenClient/MainWindow.Map.cs | 46 ++++++++----- MeshhessenClient/MeshhessenClient.csproj | 6 +- docs/changelog.html | 88 ++++++++++++++++++++++-- docs/index.html | 6 +- 6 files changed, 139 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 26db974..00b8bc1 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,12 @@ SCHNELLSTART.md SCHNELLSTART.md backlog.txt PLAN.md + +# Tile-auth: private ops docs & any secrets. MUST NOT be published (full +# attack/defense logic + token material). Keep out of the public repo. +plan_tile_auth.md +TILE_AUTH_IMPLEMENTATION.md +TILE_AUTH_SERVER.md +tile-keys/ +*.tileauth.key +secret.key diff --git a/CHANGELOG.md b/CHANGELOG.md index 1485e46..254595b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ und dieses Projekt folgt [Semantic Versioning](https://semver.org/lang/de/). --- +## [1.6.2.5] - 2026-08-30 + +### 🐛 Behoben + +#### 🗺️ Tile-Download ignorierte den Karten-Modus (nutzte immer die Tile-Server-URL) +- Beim Offline-Laden von Kacheln wurde **immer** die im Feld „Tile-Server URL" stehende Adresse verwendet — unabhängig vom gewählten Karten-Modus und der Quell-Auswahl (osm/topo/dark). In Meshhessen-/Offline-Modus lud der Download so von der Custom-URL statt vom quellenrichtigen offiziellen Server. +- Jetzt gilt: Die Custom-URL ist **nur** im Modus „Eigener Tile-Server" (`online-custom`) aktiv — dort weiterhin auch der ungespeicherte Wert aus dem Textfeld, damit man ohne Speichern laden kann. In allen anderen Modi nutzt der Download den zum Quell-Dropdown passenden Server (`online-own`/offline → offizielle Meshhessen-Server, `online-osm` → public OSM, für Bulk ohnehin gesperrt). Damit sind Download und Kartenabfrage konsistent. + +--- + ## [1.6.2.4] - 2026-08-22 ### 🐛 Behoben diff --git a/MeshhessenClient/MainWindow.Map.cs b/MeshhessenClient/MainWindow.Map.cs index 409ef5d..53a5d35 100644 --- a/MeshhessenClient/MainWindow.Map.cs +++ b/MeshhessenClient/MainWindow.Map.cs @@ -47,6 +47,18 @@ public partial class MainWindow _ => "https://tile.meshhessenclient.de/osm/{z}/{x}/{y}.png" }; + // The tile URL actually in effect for the current map mode and the given source. + // The configured custom URL fields apply ONLY in custom mode; every other mode + // uses its own server (online-own + offline → official Meshhessen servers, + // online-osm → public OSM). Mirrors the live-map provider selection in + // InitializeMap, so downloads and map queries stay in sync. + private string GetActiveTileUrl(string source) => _currentSettings.MapMode switch + { + "online-custom" => GetUrlForSource(source), + "online-osm" => "https://tile.openstreetmap.org/{z}/{x}/{y}.png", + _ => GetMeshhessenUrlForSource(source), + }; + // Vector rendering is available in all modes except online-osm (no public vector OSM server) private bool UseVectorMap => _currentSettings.MapRenderMode == "vector" && _currentSettings.MapMode != "online-osm"; @@ -1315,26 +1327,28 @@ private void ShowNodeInfoDialog(NodeInfo node) private void DownloadTiles_Click(object sender, RoutedEventArgs e) { - // Tile-Server URL direkt aus TextBox übernehmen (auch ohne vorheriges Speichern) - var currentTileUrl = string.IsNullOrWhiteSpace(TileServerUrlTextBox.Text) - ? "https://tile.meshhessenclient.de/osm/{z}/{x}/{y}.png" - : TileServerUrlTextBox.Text.Trim(); + var source = _currentSettings.MapSource; + + // The custom "Tile-Server URL" field is honoured ONLY in custom mode – and + // there the (possibly unsaved) textbox value wins, so the user can download + // without saving first. Every other mode downloads from its own server, so + // the source dropdown (osm/topo/dark) decides, not the URL field. + string url; + if (_currentSettings.MapMode == "online-custom") + url = string.IsNullOrWhiteSpace(TileServerUrlTextBox.Text) + ? GetUrlForSource(source) + : TileServerUrlTextBox.Text.Trim(); + else + url = GetActiveTileUrl(source); - // Update the appropriate URL based on current map source - switch (_currentSettings.MapSource) + switch (source) { - case "osm": - TileDownloaderService.OSMTileUrl = currentTileUrl; - break; - case "osmtopo": - TileDownloaderService.OSMTopoTileUrl = currentTileUrl; - break; - case "osmdark": - TileDownloaderService.OSMDarkTileUrl = currentTileUrl; - break; + case "osm": TileDownloaderService.OSMTileUrl = url; break; + case "osmtopo": TileDownloaderService.OSMTopoTileUrl = url; break; + case "osmdark": TileDownloaderService.OSMDarkTileUrl = url; break; } - var win = new TileDownloaderWindow(_currentSettings.MapSource) { Owner = this }; + var win = new TileDownloaderWindow(source) { Owner = this }; win.ShowDialog(); // Nach Download: Map-Status aktualisieren UpdateMapTileStatus(); diff --git a/MeshhessenClient/MeshhessenClient.csproj b/MeshhessenClient/MeshhessenClient.csproj index 6ac6af5..0f362f1 100644 --- a/MeshhessenClient/MeshhessenClient.csproj +++ b/MeshhessenClient/MeshhessenClient.csproj @@ -18,9 +18,9 @@ ..\public\ MeshhessenClient - 1.6.2.4 - 1.6.2.4 - 1.6.2.4 + 1.6.2.5 + 1.6.2.5 + 1.6.2.5 Meshtastic Community Meshhessen Client Offline-fähiger Windows Client für Meshtastic Geräte diff --git a/docs/changelog.html b/docs/changelog.html index fc86089..d88096c 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -172,10 +172,50 @@

Changelog

- +
- v1.6.2.3 + v1.6.2.5 + 2026-08-30 + Tile-Download folgt dem Karten-Modus +
+

Bugfix: Das Offline-Laden von Kacheln nutzte immer die „Tile-Server URL", egal welcher Karten-Modus gewählt war.

+ +
+

🗺️ Tile-Download

+
+
    +
  • Download ignorierte den Karten-Modus — es wurde immer die Custom-URL aus dem Feld „Tile-Server URL" verwendet, unabhängig von Modus und Quell-Auswahl (osm/topo/dark). Die Custom-URL ist jetzt nur im Modus „Eigener Tile-Server" aktiv; alle anderen Modi laden vom quellenrichtigen Server (Meshhessen bzw. public OSM). Download und Kartenabfrage sind damit konsistent.
  • +
+
+
+
+ + +
+
+ v1.6.2.4 + 2026-08-22 + Kanal-Anzeige, Reply-Kanal & Debug-Scroll +
+

Mehrere Fixes rund um Kanäle und das Debug-Log.

+ +
+

🐛 Behoben

+
+
    +
  • Kanal-Anzeige im Backlog zeigte teils „Kanal N" statt des Kanalnamens — jetzt einheitlich aus dem aktuellen Kanal-Index aufgelöst und beim Eintreffen der Kanäle neu berechnet.
  • +
  • Reply wechselt wieder auf den Kanal der Nachricht — „Antworten" schaltet den aktiven Kanal auf den um, auf dem die Nachricht empfangen wurde (Live und Backlog).
  • +
  • Debug-Log Auto-Scroll sprang nach oben statt dem Ende zu folgen — Reihenfolge korrigiert: erst trimmen, dann ans Ende scrollen.
  • +
+
+
+
+ + +
+
+ v1.6.2.3 2026-08-16 Alert-Bell, verschlüsselte Antworten & Karten-Feinschliff
@@ -1087,10 +1127,50 @@

✨ Hinzugefügt

- +
- v1.6.2.3 + v1.6.2.5 + 2026-08-30 + Tile download follows the map mode +
+

Bugfix: offline tile downloads always used the "Tile server URL", regardless of the selected map mode.

+ +
+

🗺️ Tile download

+
+
    +
  • Download ignored the map mode — it always used the custom URL from the "Tile server URL" field, regardless of mode and source selection (osm/topo/dark). The custom URL is now active only in "Own tile server" mode; every other mode downloads from the correct server for the source (Meshhessen or public OSM). Download and map query are now consistent.
  • +
+
+
+
+ + +
+
+ v1.6.2.4 + 2026-08-22 + Channel display, reply channel & debug scroll +
+

Several fixes around channels and the debug log.

+ +
+

🐛 Fixed

+
+
    +
  • Channel display in the backlog sometimes showed "Channel N" instead of the channel name — now resolved consistently from the current channel index and recomputed when channels arrive.
  • +
  • Reply switches back to the message's channel — "Reply" sets the active channel to the one the message was received on (live and backlog).
  • +
  • Debug-log auto-scroll jumped to the top instead of following the end — order fixed: trim first, then scroll to end.
  • +
+
+
+
+ + +
+
+ v1.6.2.3 2026-08-16 Alert bell, encrypted replies & map polish
diff --git a/docs/index.html b/docs/index.html index 957e670..7cf3307 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,7 +41,7 @@ "url": "https://smlunchen.github.io/mh_windowsclient/", "downloadUrl": "https://github.com/SMLunchen/mh_windowsclient/releases/latest", "author": { "@type": "Organization", "name": "Meshhessen Community", "url": "https://www.meshhessen.de" }, - "softwareVersion": "1.6.2.3", + "softwareVersion": "1.6.2.5", "screenshot": "https://raw.githubusercontent.com/SMLunchen/mh_windowsclient/master/img/map.png", "keywords": "Meshtastic, Windows, LoRa, Mesh, Telemetrie, Traceroute, Offline-Karte, PKI" } @@ -312,7 +312,7 @@

Meshhessen Client

- v1.6.2.3 + v1.6.2.5 🔔 Alert-Bell löst endlich den Hardware-Alert aus (ASCII 0x07) · 🔐 Antworten auf Info-Anfragen werden korrekt verarbeitet, PKI-DMs sofort entschlüsselt · 🗺️ „Auf Karte zeigen" auch auf der Vector-Karte. Changelog ansehen →
@@ -775,7 +775,7 @@

Download & Installation

- v1.6.2.3 + v1.6.2.5 🔔 Alert bell finally triggers the hardware alert (ASCII 0x07) · 🔐 replies to info requests are handled correctly, PKI DMs decrypt immediately · 🗺️ "Show on map" now works on the vector map too. View changelog →