Fix: Logo-URL /media/ korrekt; Züchter-Section im Sidebar mit Label+Trennlinie (SW by-v914)
This commit is contained in:
parent
e11efa23f0
commit
6956870827
5 changed files with 32 additions and 28 deletions
|
|
@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request):
|
|||
raise _HE(404, "Nicht gefunden.")
|
||||
return _media_response(filepath)
|
||||
|
||||
APP_VER = "913" # muss mit APP_VER in app.js übereinstimmen
|
||||
APP_VER = "914" # muss mit APP_VER in app.js übereinstimmen
|
||||
|
||||
@app.get("/.well-known/assetlinks.json")
|
||||
async def assetlinks():
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ async def breeder_status(user=Depends(get_current_user)):
|
|||
"profile": dict(profile) if profile else None,
|
||||
}
|
||||
if profile:
|
||||
result["profile"]["logo_url"] = f"/api/media/{logo['file_path']}" if logo else None
|
||||
result["profile"]["logo_url"] = f"/media/{logo['file_path']}" if logo else None
|
||||
return result
|
||||
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ async def breeder_public_profile(zwingername: str):
|
|||
WHERE breeder_id=? AND entity_type='breeder'
|
||||
ORDER BY sort_order, id LIMIT 1
|
||||
""", (breeder_id,)).fetchone()
|
||||
result["logo_url"] = f"/api/media/{logo['file_path']}" if logo else None
|
||||
result["logo_url"] = f"/media/{logo['file_path']}" if logo else None
|
||||
|
||||
# Öffentliche Fotos für die Gallery (alle entity_type='breeder', max. 12)
|
||||
photos = conn.execute("""
|
||||
|
|
@ -426,8 +426,8 @@ async def breeder_public_profile(zwingername: str):
|
|||
ORDER BY is_primary DESC, sort_order, id LIMIT 12
|
||||
""", (breeder_id,)).fetchall()
|
||||
result["fotos"] = [{
|
||||
"url": f"/api/media/{p['file_path']}",
|
||||
"thumb": f"/api/media/{p['thumbnail_path']}" if p['thumbnail_path'] else f"/api/media/{p['file_path']}",
|
||||
"url": f"/media/{p['file_path']}",
|
||||
"thumb": f"/media/{p['thumbnail_path']}" if p['thumbnail_path'] else f"/media/{p['file_path']}",
|
||||
"caption": p["caption"] or "",
|
||||
"primary": bool(p["is_primary"]),
|
||||
} for p in photos]
|
||||
|
|
|
|||
|
|
@ -248,17 +248,25 @@
|
|||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#first-aid"></use></svg> Erste Hilfe
|
||||
</div>
|
||||
|
||||
<div class="sidebar-item" data-page="zuchthunde" id="sidebar-zuchthunde"
|
||||
style="display:none;color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#tree-structure"></use></svg> Zuchtkartei
|
||||
</div>
|
||||
<div class="sidebar-item" data-page="litters" id="sidebar-litters"
|
||||
style="display:none;color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#certificate"></use></svg> Wurfverwaltung
|
||||
</div>
|
||||
<div class="sidebar-item" data-page="laeufi" id="sidebar-laeufi"
|
||||
style="display:none;color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#thermometer"></use></svg> Läufigkeit
|
||||
<div id="sidebar-breeder-section" style="display:none">
|
||||
<div style="padding:var(--space-3) var(--space-3) var(--space-1);font-size:10px;font-weight:700;
|
||||
text-transform:uppercase;letter-spacing:.1em;color:var(--c-primary,#C4843A);
|
||||
opacity:.8;display:flex;align-items:center;gap:6px">
|
||||
<svg class="ph-icon" style="width:12px;height:12px" aria-hidden="true"><use href="/icons/phosphor.svg#lock-key"></use></svg>
|
||||
Züchter
|
||||
</div>
|
||||
<div class="sidebar-item" data-page="zuchthunde" id="sidebar-zuchthunde"
|
||||
style="color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#tree-structure"></use></svg> Zuchtkartei
|
||||
</div>
|
||||
<div class="sidebar-item" data-page="litters" id="sidebar-litters"
|
||||
style="color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#certificate"></use></svg> Wurfverwaltung
|
||||
</div>
|
||||
<div class="sidebar-item" data-page="laeufi" id="sidebar-laeufi"
|
||||
style="color:var(--c-primary,#7c3aed)">
|
||||
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#thermometer"></use></svg> Läufigkeit
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-item" data-page="social" id="sidebar-social"
|
||||
|
|
@ -591,10 +599,10 @@
|
|||
<div id="modal-container"></div>
|
||||
|
||||
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
||||
<script src="/js/api.js?v=913"></script>
|
||||
<script src="/js/ui.js?v=913"></script>
|
||||
<script src="/js/app.js?v=913"></script>
|
||||
<script src="/js/worlds.js?v=913"></script>
|
||||
<script src="/js/api.js?v=914"></script>
|
||||
<script src="/js/ui.js?v=914"></script>
|
||||
<script src="/js/app.js?v=914"></script>
|
||||
<script src="/js/worlds.js?v=914"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '913'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '914'; // ← 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
|
||||
|
|
@ -553,12 +553,8 @@ const App = (() => {
|
|||
moderationItem.style.display = isMod ? '' : 'none';
|
||||
}
|
||||
const isBreeder = state.user.rolle === 'breeder' || state.user.rolle === 'admin';
|
||||
const littersItem = document.getElementById('sidebar-litters');
|
||||
if (littersItem) littersItem.style.display = isBreeder ? '' : 'none';
|
||||
const zuchthundeItem = document.getElementById('sidebar-zuchthunde');
|
||||
if (zuchthundeItem) zuchthundeItem.style.display = isBreeder ? '' : 'none';
|
||||
const laeufiItem = document.getElementById('sidebar-laeufi');
|
||||
if (laeufiItem) laeufiItem.style.display = isBreeder ? '' : 'none';
|
||||
const breederSection = document.getElementById('sidebar-breeder-section');
|
||||
if (breederSection) breederSection.style.display = isBreeder ? '' : 'none';
|
||||
const socialItem = document.getElementById('sidebar-social');
|
||||
if (socialItem) {
|
||||
const isSocial = state.user.is_social_media || state.user.rolle === 'admin';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v913';
|
||||
const CACHE_VERSION = 'by-v914';
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue