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 {
|
return {
|
||||||
"connectee": camera.connectee,
|
"connectee": camera.connectee,
|
||||||
"mode": camera.mode,
|
"mode": camera.mode,
|
||||||
|
"reveil_en_cours": _reveil_en_cours,
|
||||||
"appareils": camera.lister_appareils(),
|
"appareils": camera.lister_appareils(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -389,13 +389,17 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.compte-a-rebours span {
|
.compte-a-rebours span {
|
||||||
font-size: 14rem;
|
font-size: clamp(2rem, 8vw, 5rem);
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 80px var(--primaire);
|
text-shadow: 0 0 40px rgba(0,0,0,0.8), 0 0 80px var(--primaire);
|
||||||
animation: pop 0.5s ease;
|
animation: pop 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compte-a-rebours span.anim-texte {
|
||||||
|
font-size: clamp(0.8rem, 3vw, 1.5rem);
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes pop {
|
@keyframes pop {
|
||||||
0% { transform: scale(0.3); opacity: 0; }
|
0% { transform: scale(0.3); opacity: 0; }
|
||||||
60% { transform: scale(1.2); }
|
60% { transform: scale(1.2); }
|
||||||
@@ -1761,13 +1765,13 @@ h3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.anim-chiffre {
|
.anim-chiffre {
|
||||||
font-size: 8rem;
|
font-size: clamp(2rem, 6vw, 4rem);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--primaire);
|
color: var(--primaire);
|
||||||
}
|
}
|
||||||
|
|
||||||
.anim-texte {
|
.anim-texte {
|
||||||
font-size: clamp(0.9rem, 2.5vw, 1.6rem);
|
font-size: clamp(0.7rem, 2vw, 1.2rem);
|
||||||
max-width: 80vw;
|
max-width: 80vw;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||||
<meta name="google" content="notranslate">
|
<meta name="google" content="notranslate">
|
||||||
<meta http-equiv="Content-Language" content="fr">
|
<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">
|
<link rel="stylesheet" href="/css/themes.css?v=2">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -249,9 +249,18 @@ async function lancerCapture() {
|
|||||||
await chargerCadreImpose();
|
await chargerCadreImpose();
|
||||||
majCompteurAccueil();
|
majCompteurAccueil();
|
||||||
|
|
||||||
// Verifier l'etat de la camera avant de commencer
|
// Verifier l'etat de la camera — attendre si reveil en cours
|
||||||
try {
|
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') {
|
if (!statut.connectee || statut.mode === 'erreur') {
|
||||||
captureEnCours = false;
|
captureEnCours = false;
|
||||||
afficherErreurCapture('Appareil photo non disponible', 'Verifiez la connexion USB du DSLR');
|
afficherErreurCapture('Appareil photo non disponible', 'Verifiez la connexion USB du DSLR');
|
||||||
|
|||||||
Reference in New Issue
Block a user