Canon réveil: frontend attend connexion + fix taille countdown CSS
- /api/camera/statut expose reveil_en_cours pour que le frontend sache - lancerCapture() poll toutes les 2s (max 60s) si Canon en réveil au lieu de fail immédiat - Fix CSS countdown: .compte-a-rebours span était à 14rem (écrasait .anim-texte par spécificité) → chiffres clamp(2rem, 8vw, 5rem), texte clamp(0.8rem, 3vw, 1.5rem) - Bump cache versions (style v17, camera v18) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1067,6 +1067,7 @@ async def api_camera_statut():
|
||||
return {
|
||||
"connectee": camera.connectee,
|
||||
"mode": camera.mode,
|
||||
"reveil_en_cours": _reveil_en_cours,
|
||||
"appareils": camera.lister_appareils(),
|
||||
}
|
||||
|
||||
|
||||
@@ -389,13 +389,17 @@ html, body {
|
||||
}
|
||||
|
||||
.compte-a-rebours span {
|
||||
font-size: 14rem;
|
||||
font-size: clamp(2rem, 8vw, 5rem);
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 80px var(--primaire);
|
||||
animation: pop 0.5s ease;
|
||||
}
|
||||
|
||||
.compte-a-rebours span.anim-texte {
|
||||
font-size: clamp(0.8rem, 3vw, 1.5rem);
|
||||
}
|
||||
|
||||
@keyframes pop {
|
||||
0% { transform: scale(0.3); opacity: 0; }
|
||||
60% { transform: scale(1.2); }
|
||||
@@ -1761,13 +1765,13 @@ h3 {
|
||||
}
|
||||
|
||||
.anim-chiffre {
|
||||
font-size: 8rem;
|
||||
font-size: clamp(2rem, 6vw, 4rem);
|
||||
font-weight: 700;
|
||||
color: var(--primaire);
|
||||
}
|
||||
|
||||
.anim-texte {
|
||||
font-size: clamp(0.9rem, 2.5vw, 1.6rem);
|
||||
font-size: clamp(0.7rem, 2vw, 1.2rem);
|
||||
max-width: 80vw;
|
||||
text-align: center;
|
||||
line-height: 1.2;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="Content-Language" content="fr">
|
||||
<link rel="stylesheet" href="/css/style.css?v=15">
|
||||
<link rel="stylesheet" href="/css/style.css?v=16">
|
||||
<link rel="stylesheet" href="/css/themes.css?v=2">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -249,9 +249,18 @@ async function lancerCapture() {
|
||||
await chargerCadreImpose();
|
||||
majCompteurAccueil();
|
||||
|
||||
// Verifier l'etat de la camera avant de commencer
|
||||
// Verifier l'etat de la camera — attendre si reveil en cours
|
||||
try {
|
||||
const statut = await apiGet('/api/camera/statut');
|
||||
let statut = await apiGet('/api/camera/statut');
|
||||
if ((!statut.connectee || statut.mode === 'erreur') && statut.reveil_en_cours) {
|
||||
afficherStatut('Appareil photo en preparation...', 'succes');
|
||||
for (let att = 0; att < 30; att++) {
|
||||
await pause(2000);
|
||||
statut = await apiGet('/api/camera/statut');
|
||||
if (statut.connectee && statut.mode !== 'erreur') break;
|
||||
}
|
||||
afficherStatut('', '');
|
||||
}
|
||||
if (!statut.connectee || statut.mode === 'erreur') {
|
||||
captureEnCours = false;
|
||||
afficherErreurCapture('Appareil photo non disponible', 'Verifiez la connexion USB du DSLR');
|
||||
|
||||
Reference in New Issue
Block a user