Feature: Z-Badge für Züchter-Kacheln in Welten-Admin-Ansicht (SW by-v916)
This commit is contained in:
parent
b911c41583
commit
4a52a52cff
5 changed files with 15 additions and 12 deletions
|
|
@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request):
|
||||||
raise _HE(404, "Nicht gefunden.")
|
raise _HE(404, "Nicht gefunden.")
|
||||||
return _media_response(filepath)
|
return _media_response(filepath)
|
||||||
|
|
||||||
APP_VER = "915" # muss mit APP_VER in app.js übereinstimmen
|
APP_VER = "916" # muss mit APP_VER in app.js übereinstimmen
|
||||||
|
|
||||||
@app.get("/.well-known/assetlinks.json")
|
@app.get("/.well-known/assetlinks.json")
|
||||||
async def assetlinks():
|
async def assetlinks():
|
||||||
|
|
|
||||||
|
|
@ -599,10 +599,10 @@
|
||||||
<div id="modal-container"></div>
|
<div id="modal-container"></div>
|
||||||
|
|
||||||
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
||||||
<script src="/js/api.js?v=915"></script>
|
<script src="/js/api.js?v=916"></script>
|
||||||
<script src="/js/ui.js?v=915"></script>
|
<script src="/js/ui.js?v=916"></script>
|
||||||
<script src="/js/app.js?v=915"></script>
|
<script src="/js/app.js?v=916"></script>
|
||||||
<script src="/js/worlds.js?v=915"></script>
|
<script src="/js/worlds.js?v=916"></script>
|
||||||
|
|
||||||
<!-- Feature-Seiten werden lazy geladen -->
|
<!-- Feature-Seiten werden lazy geladen -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Router, State-Management, Navigation, Initialisierung.
|
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 APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt
|
||||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||||
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
// Cache-Bust-Parameter nach Update-Reload sofort entfernen
|
||||||
|
|
|
||||||
|
|
@ -980,12 +980,15 @@ window.Worlds = (() => {
|
||||||
return u.rolle === 'admin' || u.rolle === 'moderator' || u.is_moderator || u.is_social_media;
|
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 style = locked ? 'opacity:0.25;cursor:default;' : '';
|
||||||
const badge = proBadge
|
const badge = proBadge
|
||||||
? `<span style="position:absolute;top:2px;left:3px;font-size:8px;font-weight:800;
|
? `<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>`
|
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 `
|
return `
|
||||||
<div class="world-chip" ${locked ? '' : `data-wnav="${page}"`}
|
<div class="world-chip" ${locked ? '' : `data-wnav="${page}"`}
|
||||||
style="${style}position:relative">
|
style="${style}position:relative">
|
||||||
|
|
@ -1140,7 +1143,7 @@ window.Worlds = (() => {
|
||||||
<div class="world-bottom">
|
<div class="world-bottom">
|
||||||
<div class="world-section-label">Deine Bereiche</div>
|
<div class="world-section-label">Deine Bereiche</div>
|
||||||
<div class="world-chips-grid">
|
<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>
|
||||||
<div class="world-footer-links">
|
<div class="world-footer-links">
|
||||||
<span data-wnav="impressum">Impressum</span>
|
<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-section-label">Alles über ${_esc(dog.name)}</div>
|
||||||
<div class="world-chips-grid">
|
<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>
|
||||||
<div class="world-footer-links">
|
<div class="world-footer-links">
|
||||||
<span data-wnav="gruender">Die 100 Gründer</span>
|
<span data-wnav="gruender">Die 100 Gründer</span>
|
||||||
|
|
@ -1605,7 +1608,7 @@ window.Worlds = (() => {
|
||||||
<div class="world-bottom">
|
<div class="world-bottom">
|
||||||
<div class="world-section-label">Die Welt da draußen</div>
|
<div class="world-section-label">Die Welt da draußen</div>
|
||||||
<div class="world-chips-grid">
|
<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>
|
||||||
<div class="world-footer-links">
|
<div class="world-footer-links">
|
||||||
<span data-wnav="datenschutz">Datenschutz</span>
|
<span data-wnav="datenschutz">Datenschutz</span>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Offline-Cache + Push Notifications + Tile-Cache
|
Offline-Cache + Push Notifications + Tile-Cache
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
const CACHE_VERSION = 'by-v915';
|
const CACHE_VERSION = 'by-v916';
|
||||||
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
|
||||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue