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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user