Fix: Wiki-Foto-Moderation — 404 = bereits bearbeitet, Liste statt Fehlermeldung (SW by-v661)

This commit is contained in:
rene 2026-05-03 21:02:13 +02:00
parent e2cbbde7f2
commit 4cd2a33ca2
4 changed files with 16 additions and 7 deletions

View file

@ -93,9 +93,9 @@
</script> </script>
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung --> <!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
<link rel="stylesheet" href="/css/design-system.css?v=660"> <link rel="stylesheet" href="/css/design-system.css?v=661">
<link rel="stylesheet" href="/css/layout.css?v=660"> <link rel="stylesheet" href="/css/layout.css?v=661">
<link rel="stylesheet" href="/css/components.css?v=660"> <link rel="stylesheet" href="/css/components.css?v=661">
</head> </head>
<body> <body>
@ -562,7 +562,7 @@
<script src="/js/api.js?v=94"></script> <script src="/js/api.js?v=94"></script>
<script src="/js/ui.js?v=94"></script> <script src="/js/ui.js?v=94"></script>
<script src="/js/app.js?v=94"></script> <script src="/js/app.js?v=94"></script>
<script src="/js/worlds.js?v=660"></script> <script src="/js/worlds.js?v=661"></script>
<!-- Feature-Seiten werden lazy geladen --> <!-- Feature-Seiten werden lazy geladen -->

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung. Router, State-Management, Navigation, Initialisierung.
============================================================ */ ============================================================ */
const APP_VER = '660'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VER = '661'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.3.0'; // ← semantische Version, wird bei make release gesetzt const APP_VERSION = '1.3.0'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app'; const IS_STAGING = location.hostname === 'staging.banyaro.app';

View file

@ -217,7 +217,16 @@ window.Page_moderation = (() => {
await API.patch(`/moderation/fotos/${btn.dataset.id}`, { action: 'approve' }); await API.patch(`/moderation/fotos/${btn.dataset.id}`, { action: 'approve' });
UI.toast('Foto freigegeben.', 'success'); UI.toast('Foto freigegeben.', 'success');
await _loadFotos(el); await _loadFotos(el);
} catch (e) { UI.toast(e.message, 'danger'); btn.disabled = false; btn.textContent = '✓ Freigeben'; } } catch (e) {
if (e.status === 404) {
UI.toast('Bereits bearbeitet — Liste aktualisiert.', 'info');
await _loadFotos(el);
} else {
UI.toast(e.message, 'danger');
btn.disabled = false;
btn.textContent = '✓ Freigeben';
}
}
}); });
}); });

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache Offline-Cache + Push Notifications + Tile-Cache
============================================================ */ ============================================================ */
const CACHE_VERSION = 'by-v660'; const CACHE_VERSION = 'by-v661';
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