Procházet zdrojové kódy

feat+fix: icône YunoHost, barre d'activité centrée, refresh auto au terme d'un job

- doc/LOGO.png : icône application pour le webadmin YunoHost (format 2)
- Barre d'activité : justify-center pour centrer le contenu dans la barre
- Dashboard : détection fin de job via prevCount > count → reload automatique 800 ms après,
  ce qui met à jour le statut dans le tableau sans action manuelle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cédric Hansen před 1 měsícem
rodič
revize
cebed2df68
2 změnil soubory, kde provedl 13 přidání a 3 odebrání
  1. binární
      doc/LOGO.png
  2. 13 3
      sources/templates/base.html

binární
doc/LOGO.png


+ 13 - 3
sources/templates/base.html

@@ -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;
       }