diff --git a/assets/map/index.html b/assets/map/index.html index b0c10f5..0b873a9 100644 --- a/assets/map/index.html +++ b/assets/map/index.html @@ -26,6 +26,7 @@ Lädt … + diff --git a/assets/map/js/config.js b/assets/map/js/config.js index 0cb0ac5..471c2a6 100644 --- a/assets/map/js/config.js +++ b/assets/map/js/config.js @@ -29,6 +29,10 @@ const CONFIG = { 'elthen': 'Eltnen', }, + // Karten, die es auf unserem Patch noch nicht gibt - werden in der Auswahl und beim + // Ansehen mit einem Hinweis versehen. + MAP_UNAVAILABLE: ['elthen', 'morheim'], + // Gebiete der Kartenauswahl in dieser Reihenfolge, Karten darin ebenfalls sortiert. // Karten, die hier fehlen, landen unter "Weitere". MAP_ZONES: [ diff --git a/assets/map/js/controllers/MapController.js b/assets/map/js/controllers/MapController.js index 4735339..2caf45e 100644 --- a/assets/map/js/controllers/MapController.js +++ b/assets/map/js/controllers/MapController.js @@ -137,6 +137,13 @@ class MapController { name.textContent = map.name; card.append(img, name); + if (CONFIG.MAP_UNAVAILABLE.includes(map.slug)) { + card.classList.add('unavailable'); + const note = document.createElement('span'); + note.className = 'map-card-note'; + note.textContent = 'Auf unserem Patch noch nicht verfügbar'; + card.appendChild(note); + } card.addEventListener('click', () => { this.closeMapPicker(); if (map.slug !== this.mapData.currentMap?.slug) { @@ -177,6 +184,7 @@ class MapController { if (!mapInfo) throw new Error(`Map ${slug} not found`); this.mapCurrentName.textContent = mapInfo.name; + document.getElementById('map-unavailable').classList.toggle('hidden', !CONFIG.MAP_UNAVAILABLE.includes(slug)); try { localStorage.setItem('lumina_map', slug); } catch (e) { diff --git a/assets/map/styles.css b/assets/map/styles.css index 7b3fb65..f459409 100644 --- a/assets/map/styles.css +++ b/assets/map/styles.css @@ -230,6 +230,38 @@ canvas:active { .map-card.active .map-card-name { color: var(--accent-gold); } +/* Karten, die es auf unserem Patch noch nicht gibt */ +.map-card { position: relative; } + +.map-card.unavailable img { filter: grayscale(0.6) brightness(0.8); } + +.map-card-note { + position: absolute; + top: 8px; + left: 8px; + right: 8px; + padding: 4px 8px; + border-radius: 6px; + background: rgba(20, 20, 30, 0.85); + border: 1px solid rgba(240, 178, 50, 0.6); + color: #f0c060; + font-size: 11px; + font-weight: 600; + line-height: 1.3; + text-align: center; +} + +#map-unavailable { + margin: 2px 4px 4px; + padding: 6px 10px; + border-radius: 6px; + background: rgba(240, 178, 50, 0.12); + border: 1px solid rgba(240, 178, 50, 0.5); + color: #f0c060; + font-size: 12px; + text-align: center; +} + @keyframes map-picker-fade { from { opacity: 0; } to { opacity: 1; } } /* Zoom controls */