mirror of
https://github.com/yellowcooln/meshcore-mqtt-live-map.git
synced 2026-04-20 23:23:36 +00:00
Revert "Handle missing SITE_ICON with HUD fallback"
This reverts commit b40a1ab8bd.
This commit is contained in:
parent
ae653c4246
commit
20a270b2b2
7 changed files with 1 additions and 28 deletions
|
|
@ -62,7 +62,6 @@
|
|||
- Hide-nodes toggle hides markers, trails, heat, routes, and history layers.
|
||||
- Heat toggle hides the heatmap; it defaults on and the button turns green when heat is off.
|
||||
- History line weight was reduced for a lighter map overlay.
|
||||
- HUD logo uses `SITE_ICON`; if missing/invalid it falls back to a small "Map" badge to keep the toggle usable.
|
||||
- Route styling now keys off payload type: 2/5 = Message (blue), 8/9 = Trace (orange), 4 = Advert (green).
|
||||
- 24h route history persists to `data/route_history.jsonl`, renders as a volume heatline, and defaults off (toggle in HUD).
|
||||
- History records routes for `path`, `direct`, and `fanout` modes by default; adjust with `ROUTE_HISTORY_ALLOWED_MODES`.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ When adding UI controls:
|
|||
- Wire the toggle into `app.js`.
|
||||
- Add styles to `styles.css` (don’t inline).
|
||||
- Keep HUD layout stable on mobile (test at narrow widths).
|
||||
- If `SITE_ICON` is optional, include a text fallback for the HUD toggle.
|
||||
|
||||
## API Changes
|
||||
- Document new endpoints in `docs.md`.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ Live example: https://live.bostonme.sh/
|
|||
- Propagation panel lives on the right and keeps the last render until you generate a new one
|
||||
- Installable PWA (manifest + service worker) for Add to Home Screen
|
||||
- Click the logo to hide/show the left HUD panel while tools stay open
|
||||
- If `SITE_ICON` is unset or fails to load, the HUD toggle falls back to a small “Map” badge.
|
||||
|
||||
## Project Structure
|
||||
- `backend/app.py`: FastAPI server wiring, MQTT lifecycle, WS broadcast
|
||||
|
|
|
|||
|
|
@ -68,25 +68,6 @@
|
|||
const losPeaksMax = Number(config.losPeaksMax) || 4;
|
||||
const mqttOnlineSeconds = Number(config.mqttOnlineSeconds) || 300;
|
||||
const defaultDistanceUnits = config.distanceUnits || 'km';
|
||||
const hudToggle = document.getElementById('hud-toggle');
|
||||
const hudLogo = hudToggle ? hudToggle.querySelector('.hud-logo') : null;
|
||||
const applyHudLogoFallback = () => {
|
||||
if (hudToggle) {
|
||||
hudToggle.classList.add('hud-toggle-fallback');
|
||||
}
|
||||
if (hudLogo && hudLogo.parentNode) {
|
||||
hudLogo.parentNode.removeChild(hudLogo);
|
||||
}
|
||||
};
|
||||
if (hudLogo) {
|
||||
const siteIcon = String(hudLogo.dataset.siteIcon || '').trim();
|
||||
if (!siteIcon) {
|
||||
applyHudLogoFallback();
|
||||
} else {
|
||||
hudLogo.src = siteIcon;
|
||||
hudLogo.addEventListener('error', applyHudLogoFallback, { once: true });
|
||||
}
|
||||
}
|
||||
const heatLayer = L.heatLayer([], {
|
||||
radius: 28,
|
||||
blur: 22,
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@
|
|||
<div class="hud-header">
|
||||
<div class="hud-brand">
|
||||
<button class="hud-toggle" id="hud-toggle" type="button" aria-label="Toggle panel">
|
||||
<img class="hud-logo" data-site-icon="{{SITE_ICON}}" alt="{{SITE_TITLE}}" />
|
||||
<span class="hud-logo-text" aria-hidden="true">Map</span>
|
||||
<img class="hud-logo" src="/static/logo.png" alt="Greater Boston Mesh" />
|
||||
</button>
|
||||
<div class="hud-title"><span class="pill">Live</span> {{SITE_TITLE}}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,9 +28,6 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
.hud-logo { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; background: rgba(255,255,255,.08); padding: 2px; }
|
||||
.hud-logo-text { display: none; width: 28px; height: 28px; border-radius: 6px; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; letter-spacing: 0.2px; color: #fff; background: rgba(255,255,255,.12); }
|
||||
.hud-toggle.hud-toggle-fallback .hud-logo { display: none; }
|
||||
.hud-toggle.hud-toggle-fallback .hud-logo-text { display: inline-flex; }
|
||||
.hud.panel-hidden {
|
||||
background: transparent;
|
||||
border: none;
|
||||
|
|
|
|||
1
docs.md
1
docs.md
|
|
@ -48,7 +48,6 @@ This project renders live MeshCore traffic on a Leaflet + OpenStreetMap map. A F
|
|||
- Trail text in the HUD is only shown when `TRAIL_LEN > 0`; `TRAIL_LEN=0` disables trails entirely.
|
||||
- Hide Nodes toggle hides markers, trails, heat, routes, and history layers.
|
||||
- Heat toggle can hide the heatmap; it defaults on and the button turns green when heat is off.
|
||||
- HUD logo uses `SITE_ICON`; if unset or broken it falls back to a small “Map” badge so the toggle still works.
|
||||
- History line weight was reduced for improved readability.
|
||||
- Propagation overlay keeps heat/routes/trails/markers above it after render; the panel lives on the right and retains the last render until you generate a new one.
|
||||
- Heatmap includes all route payload types (adverts are no longer skipped).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue