Galerie booth : QR avec auto-login, event_id aleatoire, flyer imprimable
- QR code inclut le mot de passe (?p=XXXX) pour acces direct sans saisie - Supprime le code texte visible sur l'ecran d'accueil, QR plus petit - Bouton admin 'Imprimer flyer QR galerie' genere un 10x15 avec nom evenement, QR code, texte invitation, design assorti - Auto-login ajoute cote serveur booth (booth.copydev.fr) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -299,16 +299,9 @@ html, body {
|
||||
}
|
||||
|
||||
.booth-qr {
|
||||
width: 270px;
|
||||
height: 270px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.booth-code {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
color: rgba(255,255,255,0.7);
|
||||
letter-spacing: 4px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* === Capture / Preview live === */
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
<div id="compteur-accueil" class="compteur-accueil cache">
|
||||
<span id="compteur-restant">400</span> / <span id="compteur-limite">400</span>
|
||||
</div>
|
||||
<!-- Booth : code + QR en bas a gauche -->
|
||||
<!-- Booth : QR discret en bas a gauche -->
|
||||
<div id="booth-info" class="booth-info cache">
|
||||
<img id="booth-qr" class="booth-qr" src="">
|
||||
<span id="booth-code" class="booth-code"></span>
|
||||
</div>
|
||||
<!-- Icone admin coin bas-droit -->
|
||||
<div id="btn-admin" class="btn-admin" onclick="ouvrirAdmin()">⚙</div>
|
||||
@@ -644,6 +643,7 @@
|
||||
</div>
|
||||
<button class="btn-action" onclick="sauvegarderBooth()">Sauvegarder booth</button>
|
||||
<button class="btn-secondaire" onclick="regenererBoothPassword()">Nouveau code</button>
|
||||
<button class="btn-secondaire" onclick="imprimerFlyerQR()">🖨 Imprimer flyer QR galerie</button>
|
||||
|
||||
<h3>Galerie locale</h3>
|
||||
<div class="champ">
|
||||
|
||||
@@ -922,6 +922,16 @@ async function chargerInfosSysteme() {
|
||||
}
|
||||
}
|
||||
|
||||
async function imprimerFlyerQR() {
|
||||
afficherStatut('Generation du flyer QR...', 'succes');
|
||||
const r = await apiPost('/api/booth/imprimer-qr', {});
|
||||
if (r.succes) {
|
||||
afficherStatut('Flyer QR envoye a l\'imprimante !', 'succes');
|
||||
} else {
|
||||
afficherStatut(r.erreur || 'Erreur impression flyer', 'erreur');
|
||||
}
|
||||
}
|
||||
|
||||
async function regenererBoothPassword() {
|
||||
const booth = config.booth || {};
|
||||
const url = getValue('admin-booth-url').replace(/\/$/, '');
|
||||
|
||||
@@ -335,10 +335,8 @@ async function chargerBoothInfo() {
|
||||
try {
|
||||
const info = await apiGet('/api/booth/info');
|
||||
if (info.password) {
|
||||
document.getElementById('booth-code').textContent = info.password;
|
||||
// QR code vers le site booth
|
||||
const eventId = booth.event_id || 'default';
|
||||
const qrUrl = `${booth.url}/${eventId}`;
|
||||
const qrUrl = `${booth.url}/${eventId}?p=${info.password}`;
|
||||
document.getElementById('booth-qr').src = `/api/qr?url=${encodeURIComponent(qrUrl)}`;
|
||||
el.classList.remove('cache');
|
||||
}
|
||||
|
||||
@@ -158,9 +158,10 @@ async function afficherQR() {
|
||||
if (!zone.classList.contains('cache')) {
|
||||
const booth = config.booth || {};
|
||||
if (booth.actif && booth.url) {
|
||||
// QR vers la galerie live
|
||||
const info = await apiGet('/api/booth/info').catch(() => null);
|
||||
const eventId = booth.event_id || 'default';
|
||||
const qrUrl = `${booth.url}/${eventId}`;
|
||||
const pw = info?.password || '';
|
||||
const qrUrl = `${booth.url}/${eventId}?p=${pw}`;
|
||||
document.getElementById('img-qr').src = `/api/qr?url=${encodeURIComponent(qrUrl)}`;
|
||||
} else {
|
||||
const resultat = await apiGet('/api/qr/galerie');
|
||||
|
||||
Reference in New Issue
Block a user