QR code par photo : popup QR dynamique + page vue photo sur booth

- afficherQR() génère un QR vers /g/{event}/view/{photo}?p=
- Page photo-view.html : plein écran + bouton télécharger + galerie
- QR accueil reste la galerie complète, QR après capture = la photo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 14:14:28 +02:00
parent 09c8ea75fa
commit 0407244554
3 changed files with 43 additions and 0 deletions

View File

@@ -372,6 +372,23 @@ async function chargerBoothInfo() {
}
}
async function afficherQR() {
const booth = config.booth || {};
if (!booth.actif || !booth.url || !photoFinale) return;
try {
const info = await apiGet('/api/booth/info');
if (!info.password) return;
const eventId = (config.evenement || {}).event_id || booth.event_id || 'default';
const qrUrl = `${booth.url}/g/${eventId}/view/${photoFinale}?p=${info.password}`;
document.getElementById('qr-photo').src = `/api/qr?url=${encodeURIComponent(qrUrl)}`;
document.getElementById('popup-qr').classList.remove('cache');
} catch (e) {}
}
function fermerQR() {
document.getElementById('popup-qr').classList.add('cache');
}
function afficherStatut(message, type = 'succes') {
const el = document.getElementById('statut-partage');
el.textContent = message;