feat: watcher (phase 3+6) + navigation dashboard (version, changelog, aide)

Phase 3 — Clipboard Watcher (Windows):
- clipboard.rs: détection d'images via arboard, conversion BGRA→PNG
- Gère les doublons consécutifs (même image dans le presse-papier)

Phase 6 — Watcher Loop:
- Windows: polling clipboard → hash → dédoublonnage → upload
- Linux/macOS: polling de dossier configurable (watch_dir)
- Ajout champ watch_dir dans WatcherConfig
- Client Imago cloné avant await (évite problème Send/Sync)

Dashboard:
- Badge version v0.1.0 dans le header
- Barre de navigation: Galerie / Changelog / Aide
- Pages changelog.html et help.html (chargement dynamique)
- Endpoint GET /api/version avec infos build
- Correction import delete inutilisé dans routes.rs
This commit is contained in:
2026-06-25 09:41:51 -04:00
parent 9b06df737d
commit 3bab62733d
11 changed files with 608 additions and 36 deletions
+97
View File
@@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="fr">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Changelog</title></head>
<body style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:#0d1117;color:#c9d1d9;padding:24px;line-height:1.6;max-width:900px;margin:0 auto">
<style>
a { color:#58a6ff }
h1 { border-bottom:1px solid #30363d;padding-bottom:8px }
h2 { margin-top:24px;color:#58a6ff }
h3 { margin-top:16px;color:#79c0ff }
li { margin:4px 0 }
code { background:#161b22;padding:2px 6px;border-radius:4px;font-size:13px }
table { border-collapse:collapse;width:100%;margin:12px 0 }
td,th { border:1px solid #30363d;padding:8px 12px;text-align:left;font-size:13px }
th { background:#161b22 }
.tag { font-size:10px;padding:2px 6px;border-radius:8px;margin-right:4px }
.tag-feat { background:rgba(88,166,255,0.15);color:#58a6ff }
.tag-fix { background:rgba(63,185,80,0.15);color:#3fb950 }
.tag-docs { background:rgba(210,153,34,0.15);color:#d29922 }
</style>
<h1>📋 Changelog — imagod-web</h1>
<h2>v0.1.0 — 2026-06-25</h2>
<h3><span class="tag tag-feat">feat</span> Dashboard Web</h3>
<ul>
<li>Authentification par clé API Imago (login/logout, localStorage)</li>
<li>Galerie responsive (grille adaptative desktop/mobile, breakpoints 768px/400px)</li>
<li>Upload par drag & drop avec feedback visuel</li>
<li>Raccourcis clavier : Ctrl+U (upload), Ctrl+V (coller)</li>
<li>Recherche plein texte (nom, tags, description)</li>
<li>Pagination par pages de 24 images</li>
<li>Modale détail : full résolution, EXIF, OCR, description AI</li>
<li>Suppression avec boîte de confirmation</li>
<li>Gestion des tags : ajout, suppression, édition inline</li>
<li>Notifications toast (succès/erreur)</li>
<li>FAB mobile pour upload</li>
<li>Connexion WebSocket temps réel</li>
<li>Statistiques (nombre d'images, stockage, tags, uptime)</li>
</ul>
<h3><span class="tag tag-feat">feat</span> Client API Imago v2</h3>
<ul>
<li>8 endpoints : list, search, get, upload, thumbnail, download, delete, tags</li>
<li>Proxy des URLs signées (thumbnail-url / download-url)</li>
<li>Auth par header X-API-Key</li>
</ul>
<h3><span class="tag tag-feat">feat</span> Watcher (Phase 3 + 6)</h3>
<ul>
<li>Windows : polling clipboard via arboard, conversion PNG automatique</li>
<li>Linux/macOS : surveillance de dossier configurable (polling)</li>
<li>Pipeline : détection → hash SHA-256 → dédoublonnage → upload → log</li>
<li>Configuration : intervalle de polling, dossier à surveiller, filtres</li>
</ul>
<h3><span class="tag tag-feat">feat</span> CLI</h3>
<ul>
<li>Commandes : start, serve, stop, status, config, install, uninstall, logs</li>
<li>Flags : --host, --port, --api-key, --api-url, --no-watcher</li>
<li>Gestion PID pour éviter les doublons d'instance</li>
</ul>
<h3><span class="tag tag-feat">feat</span> Dédoublonnage</h3>
<ul>
<li>Hash SHA-256 des images</li>
<li>Base SQLite locale (imagod.db)</li>
<li>Cache LRU configurable</li>
</ul>
<h3><span class="tag tag-fix">fix</span> Corrections</h3>
<ul>
<li>Structs Imago v2 (ExifData, OcrData, AiData) match l'API réelle</li>
<li>Affichage via URLs signées (thumbnail-url/download-url)</li>
<li>Fallback placeholder DOM quand pas de thumbnail</li>
<li>Import delete inutilisé retiré</li>
</ul>
<h3><span class="tag tag-docs">docs</span> Documentation</h3>
<ul>
<li>CHANGELOG.md dans le repo</li>
<li>ROADMAP.md avec planification des phases</li>
<li>Navigation in-app : Galerie / Changelog / Aide</li>
</ul>
<h2>Architecture</h2>
<table>
<tr><th>Composant</th><th>Technologie</th><th>Statut</th></tr>
<tr><td>Daemon</td><td>Rust (tokio, clap)</td><td>✅</td></tr>
<tr><td>Serveur web</td><td>axum 0.8 + tower-http</td><td>✅</td></tr>
<tr><td>Frontend</td><td>Vanilla JS + rust-embed</td><td>✅</td></tr>
<tr><td>Client API</td><td>reqwest (rustls)</td><td>✅</td></tr>
<tr><td>Dédoublonnage</td><td>SHA-256 + SQLite</td><td>✅</td></tr>
<tr><td>Temps réel</td><td>WebSocket (broadcast)</td><td>✅</td></tr>
</table>
</body>
</html>