From 61b9a72f101cb0abbb6b33956ec673fc9e8548b9 Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 20 Sep 2026 20:32:42 +0200 Subject: [PATCH] UX partage : masquer Recommencer pendant impression/email, detail pellicule, reset copies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ecran partage : boutons bas masqués quand formulaire impression ou email ouvert - "Terminer" remplacé par "Recommencer" (retour mode, pas accueil) - Reset photoImpression/formatImpression/nbExemplaires dans recommencer() - Bouton Pellicule affiche "N poses = 2 tirages" pour expliquer le strip dupliqué - CSS .mode-detail pour sous-titre discret sur bouton mode - Bump cache versions (style v18, app v27, share v11) Co-Authored-By: Claude Opus 4.6 --- frontend/css/style.css | 7 +++++++ frontend/index.html | 10 +++++----- frontend/js/app.js | 11 +++++++++++ frontend/js/share.js | 14 +++++++++++++- 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/frontend/css/style.css b/frontend/css/style.css index d119c49..90a9ae7 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -386,6 +386,13 @@ html, body { font-size: 8rem; } +.mode-detail { + font-size: 0.85rem; + opacity: 0.6; + font-weight: 400; + margin-top: -0.3rem; +} + /* === Booth info (code + QR sur accueil) === */ .booth-info { position: absolute; diff --git a/frontend/index.html b/frontend/index.html index 570ee41..6b5ab86 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -7,7 +7,7 @@ - + @@ -104,6 +104,7 @@ @@ -278,8 +279,7 @@
- - +
@@ -1177,11 +1177,11 @@ - + - + diff --git a/frontend/js/app.js b/frontend/js/app.js index 2efa6c6..a11c6df 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -147,6 +147,9 @@ function arreterTimeoutAdmin() {} function recommencer() { photosSession = []; photoFinale = null; + photoImpression = null; + formatImpression = null; + nbExemplaires = 1; allerA('mode'); } @@ -281,6 +284,14 @@ function setupModes() { allerA('capture'); }); }); + majDetailPellicule(); +} + +function majDetailPellicule() { + const el = document.getElementById('pellicule-detail'); + if (!el) return; + const nb = config.multi_shot?.nombre_photos || 4; + el.textContent = `${nb} poses = 2 tirages`; } async function chargerCadresChoix() { diff --git a/frontend/js/share.js b/frontend/js/share.js index d2cbc38..b9a54ad 100644 --- a/frontend/js/share.js +++ b/frontend/js/share.js @@ -3,11 +3,17 @@ let nbExemplaires = 1; let copiesMax = 2; +function _masquerBoutonsBas(masquer) { + const bas = document.querySelector('#ecran-partage .partage-bas'); + if (bas) bas.style.display = masquer ? 'none' : ''; +} + async function ouvrirImpression() { copiesMax = config.impression?.copies_max || 2; nbExemplaires = 1; document.getElementById('nb-exemplaires').textContent = nbExemplaires; cadreChoisi = null; + _masquerBoutonsBas(true); if (modeActuel === 'multi') { document.getElementById('form-impression').classList.remove('cache'); @@ -25,6 +31,7 @@ async function ouvrirImpression() { function fermerImpression() { document.getElementById('form-impression').classList.add('cache'); cadreChoisi = null; + _masquerBoutonsBas(false); } function confirmerCadreImpression() { @@ -35,6 +42,7 @@ function confirmerCadreImpression() { function annulerCadreImpression() { document.getElementById('popup-cadre-impression').classList.add('cache'); cadreChoisi = null; + _masquerBoutonsBas(false); } async function chargerCadresChoixImpression() { @@ -105,7 +113,8 @@ function changerExemplaires(delta) { async function lancerImpression() { if (!photoFinale) return; - fermerImpression(); + document.getElementById('form-impression').classList.add('cache'); + cadreChoisi = null; const btnTerminer = document.getElementById('btn-terminer'); if (btnTerminer) { btnTerminer.disabled = true; btnTerminer.style.opacity = '0.4'; } // Pour les strips, imprimer la version 2 bandes sur 10x15 @@ -118,6 +127,7 @@ async function lancerImpression() { format_papier: formatImpression || undefined, }); if (btnTerminer) { btnTerminer.disabled = false; btnTerminer.style.opacity = ''; } + _masquerBoutonsBas(false); if (resultat.attente) { afficherStatutEco('⏳', resultat.message || 'Votre photo sortira avec la suivante !', 'attente-eco'); } else if (resultat.jumeau && resultat.succes) { @@ -134,12 +144,14 @@ async function lancerImpression() { async function ouvrirEmail() { document.getElementById('form-email').classList.remove('cache'); document.getElementById('input-email').value = ''; + _masquerBoutonsBas(true); await chargerSuggestionsEmail(); } function fermerEmail() { document.getElementById('form-email').classList.add('cache'); document.getElementById('input-email').value = ''; + _masquerBoutonsBas(false); } async function chargerSuggestionsEmail() {