Wetter in Statusleiste (war hinter Legende versteckt), SW by-v321
This commit is contained in:
parent
0461f936ce
commit
d32b802649
4 changed files with 15 additions and 48 deletions
|
|
@ -2723,41 +2723,8 @@ html.modal-open {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wetter-Chip — oben rechts auf der Karte */
|
/* Wetter in Statusleiste */
|
||||||
.map-weather-chip {
|
|
||||||
position: absolute;
|
|
||||||
top: var(--space-3);
|
|
||||||
right: var(--space-3);
|
|
||||||
z-index: 1000;
|
|
||||||
background: rgba(255,255,255,0.92);
|
|
||||||
backdrop-filter: blur(4px);
|
|
||||||
border: 1px solid var(--c-border-light);
|
|
||||||
border-radius: var(--radius-full);
|
|
||||||
padding: 5px 12px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--c-text);
|
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--space-2);
|
|
||||||
pointer-events: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.map-weather-chip--hidden { display: none; }
|
.map-weather-chip--hidden { display: none; }
|
||||||
.map-weather-chip__temp { font-weight: 700; }
|
|
||||||
.map-weather-chip__desc { color: var(--c-text-secondary); font-size: 12px; }
|
|
||||||
.map-weather-chip__zecken {
|
|
||||||
background: #FEF3C7;
|
|
||||||
color: #92400E;
|
|
||||||
border-radius: var(--radius-full);
|
|
||||||
padding: 1px 7px;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.map-weather-chip__zecken--hoch {
|
|
||||||
background: #FEE2E2;
|
|
||||||
color: #991B1B;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Giftköder-Marker — pulsierend, rot, sofort erkennbar */
|
/* Giftköder-Marker — pulsierend, rot, sofort erkennbar */
|
||||||
.poison-marker {
|
.poison-marker {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
Router, State-Management, Navigation, Initialisierung.
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const APP_VER = '308'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
const APP_VER = '309'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||||
|
|
||||||
const App = (() => {
|
const App = (() => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,11 +196,11 @@ window.Page_map = (() => {
|
||||||
<button class="map-fab" id="map-locate-btn" title="Meinen Standort"><svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#map-pin"></use></svg></button>
|
<button class="map-fab" id="map-locate-btn" title="Meinen Standort"><svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#map-pin"></use></svg></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="map-weather-chip map-weather-chip--hidden" id="map-weather-chip"></div>
|
|
||||||
|
|
||||||
<div class="map-statusbar" id="map-statusbar">
|
<div class="map-statusbar" id="map-statusbar">
|
||||||
<span id="map-zoom-info"></span>
|
<span id="map-zoom-info"></span>
|
||||||
<span id="map-osm-status"></span>
|
<span id="map-osm-status"></span>
|
||||||
|
<span class="map-statusbar-sep map-weather-chip--hidden" id="map-weather-sep">·</span>
|
||||||
|
<span class="map-weather-chip--hidden" id="map-weather-info"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Aufzeichnungs-Panel (erscheint beim Start) -->
|
<!-- Aufzeichnungs-Panel (erscheint beim Start) -->
|
||||||
|
|
@ -1519,19 +1519,19 @@ window.Page_map = (() => {
|
||||||
// WETTER-CHIP
|
// WETTER-CHIP
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
async function _loadWeather(lat, lon) {
|
async function _loadWeather(lat, lon) {
|
||||||
const chip = document.getElementById('map-weather-chip');
|
const info = document.getElementById('map-weather-info');
|
||||||
if (!chip) return;
|
const sep = document.getElementById('map-weather-sep');
|
||||||
|
if (!info) return;
|
||||||
try {
|
try {
|
||||||
const w = await API.get(`/api/weather?lat=${lat}&lon=${lon}`);
|
const w = await API.get(`/api/weather?lat=${lat}&lon=${lon}`);
|
||||||
const temp = w.temp_c != null ? `${Math.round(w.temp_c)}°` : '–';
|
const temp = w.temp_c != null ? `${Math.round(w.temp_c)}°` : '–';
|
||||||
const icon = `<svg class="ph-icon" aria-hidden="true" style="width:16px;height:16px"><use href="/icons/phosphor.svg#${w.icon}"></use></svg>`;
|
const icon = `<svg class="ph-icon" aria-hidden="true" style="width:12px;height:12px;vertical-align:-2px"><use href="/icons/phosphor.svg#${w.icon}"></use></svg>`;
|
||||||
let zeckenHtml = '';
|
let zecken = w.zecken_warnung
|
||||||
if (w.zecken_warnung) {
|
? ` · <span style="color:${w.zecken_warnung === 'hoch' ? '#991B1B' : '#92400E'}">🦟 Zecken</span>`
|
||||||
const cls = w.zecken_warnung === 'hoch' ? 'map-weather-chip__zecken map-weather-chip__zecken--hoch' : 'map-weather-chip__zecken';
|
: '';
|
||||||
zeckenHtml = `<span class="${cls}" title="Zeckenrisiko ${w.zecken_warnung}">🦟 Zecken</span>`;
|
info.innerHTML = `${icon} ${temp} ${w.desc}${zecken}`;
|
||||||
}
|
info.classList.remove('map-weather-chip--hidden');
|
||||||
chip.innerHTML = `${icon}<span class="map-weather-chip__temp">${temp}</span><span class="map-weather-chip__desc">${w.desc}</span>${zeckenHtml}`;
|
sep.classList.remove('map-weather-chip--hidden');
|
||||||
chip.classList.remove('map-weather-chip--hidden');
|
|
||||||
} catch { /* still */ }
|
} catch { /* still */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v320';
|
const CACHE_VERSION = 'by-v321';
|
||||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue