|
|
@@ -56,10 +56,10 @@
|
|
|
|
|
|
<!-- Barre d'activité sticky -->
|
|
|
<div id="activity-bar"
|
|
|
- class="hidden sticky top-0 z-40 bg-gray-900 border-b border-blue-700 text-white text-xs px-6 py-2 flex items-center gap-3 shadow">
|
|
|
+ class="hidden sticky top-0 z-40 bg-gray-900 border-b border-blue-700 text-white text-xs px-6 py-2 flex items-center justify-center gap-3 shadow">
|
|
|
<span class="inline-block w-2 h-2 rounded-full bg-blue-400 animate-pulse shrink-0"></span>
|
|
|
<span class="text-blue-300 font-medium shrink-0">En cours</span>
|
|
|
- <div id="activity-list" class="flex gap-4 flex-wrap flex-1 text-gray-200"></div>
|
|
|
+ <div id="activity-list" class="flex gap-4 flex-wrap text-gray-200"></div>
|
|
|
</div>
|
|
|
|
|
|
<main class="flex-1 max-w-7xl mx-auto w-full px-6 py-8">
|
|
|
@@ -97,8 +97,18 @@
|
|
|
return Math.floor(sec / 60) + 'min' + (sec % 60 ? (sec % 60) + 's' : '');
|
|
|
}
|
|
|
|
|
|
+ let prevCount = 0;
|
|
|
+
|
|
|
function render(items) {
|
|
|
- if (!items || items.length === 0) {
|
|
|
+ const count = items ? items.length : 0;
|
|
|
+
|
|
|
+ // Un job vient de se terminer → recharger la page pour mettre à jour les statuts
|
|
|
+ if (prevCount > 0 && count < prevCount) {
|
|
|
+ setTimeout(() => location.reload(), 800);
|
|
|
+ }
|
|
|
+ prevCount = count;
|
|
|
+
|
|
|
+ if (count === 0) {
|
|
|
bar.classList.add('hidden');
|
|
|
return;
|
|
|
}
|