From 2d98eb9374a82144373450a466e498136607cadc Mon Sep 17 00:00:00 2001 From: rene Date: Wed, 27 May 2026 09:25:19 +0200 Subject: [PATCH] Fix: Friends-Avatare wieder Original-URL (kein Preview), SW by-v1111 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Report: trotz onerror-Fallback weiter Fragezeichen. Ursache: Das _preview.webp-System wurde damals nur konsequent für Diary-Uploads ausgerollt. User-Avatare und Hund-Profilbilder haben keine Preview-Variante → 404 vom _preview triggert kurz das Browser-Default-Broken-Image-Icon BEVOR der onerror-Fallback das Original lädt (Race-Condition). Pragmatischer Fix: Preview-System in friends.js rückgebaut. Bilder werden direkt mit Original-URL geladen. Performance kommt durch: - loading=\"lazy\" (off-screen Bilder erst beim Scrollen) - decoding=\"async\" (Main-Thread bleibt frei) - onerror=\"this.style.display='none'\" (kaputte Bilder verschwinden statt Fragezeichen zu zeigen) UI.previewUrl + UI.previewFallback bleiben als Helper verfügbar für später falls das Preview-System app-weit ausgerollt wird. --- VERSION | 2 +- backend/static/index.html | 24 ++++++++++++------------ backend/static/js/app.js | 2 +- backend/static/js/pages/friends.js | 23 +++++++++++------------ backend/static/landing.html | 2 +- backend/static/sw.js | 2 +- 6 files changed, 27 insertions(+), 28 deletions(-) diff --git a/VERSION b/VERSION index 96e38be..d1d06ad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1110 \ No newline at end of file +1111 \ No newline at end of file diff --git a/backend/static/index.html b/backend/static/index.html index 8f134e7..a06076c 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -617,11 +617,11 @@ - - - - - + + + + + @@ -631,7 +631,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 600d601..46463d7 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '1110'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1111'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; diff --git a/backend/static/js/pages/friends.js b/backend/static/js/pages/friends.js index a7519ca..a95eec0 100644 --- a/backend/static/js/pages/friends.js +++ b/backend/static/js/pages/friends.js @@ -282,12 +282,12 @@ window.Page_friends = (() => { : ''; const avatar = item.dog_foto - ? `${_esc(item.dog_name || '')}` : item.avatar_url - ? `${_esc(item.user_name)}` : `
${_esc((item.user_name || '?')[0].toUpperCase())} @@ -539,8 +539,8 @@ window.Page_friends = (() => { padding-top:var(--space-3);border-top:1px solid var(--c-border)"> ${withPhotos.slice(0, 4).map(d => `
- ${_esc(d.name)}
${d.foto_url ? `${_esc(d.name)}` : `
`; } if (firstDog?.foto_url) { - return `${_esc(firstDog.name)}`; } diff --git a/backend/static/landing.html b/backend/static/landing.html index 683bbad..efbe3ad 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index 36ea39b..6a4127b 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1110'; +const VER = '1111'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten