Feature: Z-Badge für Züchter-Kacheln in Welten-Admin-Ansicht (SW by-v916)

This commit is contained in:
rene 2026-05-13 20:24:00 +02:00
parent b911c41583
commit 4a52a52cff
5 changed files with 15 additions and 12 deletions

View file

@ -599,10 +599,10 @@
<div id="modal-container"></div>
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
<script src="/js/api.js?v=915"></script>
<script src="/js/ui.js?v=915"></script>
<script src="/js/app.js?v=915"></script>
<script src="/js/worlds.js?v=915"></script>
<script src="/js/api.js?v=916"></script>
<script src="/js/ui.js?v=916"></script>
<script src="/js/app.js?v=916"></script>
<script src="/js/worlds.js?v=916"></script>
<!-- Feature-Seiten werden lazy geladen -->

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '915'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '916'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';
// Cache-Bust-Parameter nach Update-Reload sofort entfernen

View file

@ -980,12 +980,15 @@ window.Worlds = (() => {
return u.rolle === 'admin' || u.rolle === 'moderator' || u.is_moderator || u.is_social_media;
}
function _chip(icon, label, page, locked = false, proBadge = false) {
function _chip(icon, label, page, locked = false, proBadge = false, breederBadge = false) {
const style = locked ? 'opacity:0.25;cursor:default;' : '';
const badge = proBadge
? `<span style="position:absolute;top:2px;left:3px;font-size:8px;font-weight:800;
color:#fff;background:#92400e;border-radius:3px;padding:0 3px;line-height:14px">P</span>`
: '';
: breederBadge
? `<span style="position:absolute;top:2px;left:3px;font-size:8px;font-weight:800;
color:#fff;background:#1d4ed8;border-radius:3px;padding:0 3px;line-height:14px">Z</span>`
: '';
return `
<div class="world-chip" ${locked ? '' : `data-wnav="${page}"`}
style="${style}position:relative">
@ -1140,7 +1143,7 @@ window.Worlds = (() => {
<div class="world-bottom">
<div class="world-section-label">Deine Bereiche</div>
<div class="world-chips-grid">
${features.map(f => _chip(f.icon, f.label, f.page, false, f.pro && _isRoleBasedPro())).join('')}
${features.map(f => _chip(f.icon, f.label, f.page, false, f.pro && _isRoleBasedPro(), f.role === 'breeder')).join('')}
</div>
<div class="world-footer-links">
<span data-wnav="impressum">Impressum</span>
@ -1431,7 +1434,7 @@ window.Worlds = (() => {
` : ''}
<div class="world-section-label">Alles über ${_esc(dog.name)}</div>
<div class="world-chips-grid">
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro())).join('')}
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro(), c.role === 'breeder')).join('')}
</div>
<div class="world-footer-links">
<span data-wnav="gruender">Die 100 Gründer</span>
@ -1605,7 +1608,7 @@ window.Worlds = (() => {
<div class="world-bottom">
<div class="world-section-label">Die Welt da draußen</div>
<div class="world-chips-grid">
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro())).join('')}
${chips.map(c => _chip(c.icon, c.label, c.page, false, c.pro && _isRoleBasedPro(), c.role === 'breeder')).join('')}
</div>
<div class="world-footer-links">
<span data-wnav="datenschutz">Datenschutz</span>

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v915';
const CACHE_VERSION = 'by-v916';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache