first commit
This commit is contained in:
commit
dd6a740645
37 files changed
+5424
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<section id="timer" class="card timer{% if running.is_some() %} is-running{% endif %}"{% if let Some(e) = running %} style="--color: {{ e.color }}"{% endif %}>
|
||||
{% if let Some(e) = running %}
|
||||
<div class="current">
|
||||
<div class="current-label">
|
||||
<div class="muted"><span class="dot" style="--color: {{ e.client_color }}"></span>{{ e.client_name }}</div>
|
||||
<div class="current-project">{{ e.project_name }}</div>
|
||||
{% if !e.note.is_empty() %}<div class="note">{{ e.note }}</div>{% endif %}
|
||||
</div>
|
||||
<div class="clock" data-started="{{ e.started_rfc3339() }}">{{ e.duration() }}</div>
|
||||
<button class="btn danger" hx-post="/ui/timer/stop" hx-target="#timer" hx-swap="outerHTML">Arrêter</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if groups.is_empty() %}
|
||||
<p class="empty">Aucun projet actif. <a href="/clients">Crée un client et un projet</a> pour commencer.</p>
|
||||
{% else %}
|
||||
<form class="start" hx-post="/ui/timer/start" hx-target="#timer" hx-swap="outerHTML">
|
||||
<select name="project_id" required aria-label="Projet">{% include "_project_select.html" %}</select>
|
||||
<input name="note" placeholder="Sur quoi travailles-tu ?" aria-label="Note">
|
||||
<button class="btn primary">{% if running.is_some() %}Basculer{% else %}Démarrer{% endif %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</section>
|
||||
Reference in new issue
Block a user