Affiche le timer en cours dans le header
Pastille à droite du header sur toutes les pages (fragment /ui/timer/entete) : description ou projet, chrono et bouton stop, bordée à la couleur du projet. L'arrêt émet timer-changed pour rafraîchir le timer de l'accueil (GET /ui/timer). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cbc8ba8ce0
commit
ef69462e06
7 files changed
+79
-2
No files matched your search
@@ -0,0 +1,10 @@
|
||||
{% import "_icons.html" as icons %}
|
||||
<div id="mini-timer" hx-get="/ui/timer/entete" hx-trigger="entries-changed from:body, every 30s" hx-swap="outerHTML">
|
||||
{% if let Some(e) = running %}
|
||||
<div class="mini-timer" style="--color: {{ e.color }}" title="{{ e.client_name }} / {{ e.project_name }}">
|
||||
<span class="mini-timer-label">{% if e.note.is_empty() %}{{ e.project_name }}{% else %}{{ e.note }}{% endif %}</span>
|
||||
<span class="clock" data-started="{{ e.started_rfc3339() }}">{{ e.duration() }}</span>
|
||||
<button class="btn small icon danger" hx-post="/ui/timer/stop" hx-swap="none" title="Arrêter" aria-label="Arrêter le timer">{% call icons::icon("stop") %}{% endcall %}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in new issue
Block a user