feat(frontend): panneau détail de carte, badges d'âge, limites WIP
- drawer de détail: corps markdown rendu (marked + DOMPurify
vendorés), commentaires, formulaire de commentaire vers Gitea;
clic distingué du drag par la distance du pointeur
- badges ⏳ N j au-delà du seuil d'âge (rouge au double)
- en-têtes de colonnes: n/limite, classe .over en rouge, toast
d'avertissement au dépôt dans une colonne saturée
- page activity.html, liens Activité dans dashboard et board
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr" data-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Activité — Kanbante</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📰</text></svg>">
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1><a href="/">📋 <span class="gradient-text">Kanbante</span></a> <span class="sep">/</span> 📰 Activité</h1>
|
||||
<nav>
|
||||
<a href="/focus" class="btn-sm">🎯 Focus</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="focus-main">
|
||||
<p class="focus-intro">Les {{ events|length }} derniers événements du journal — déplacements, créations, fermetures et commentaires, tous projets confondus.</p>
|
||||
{% if not events %}
|
||||
<p class="focus-empty">Aucun événement pour le moment. Le journal se remplit dès que des cartes bougent.</p>
|
||||
{% endif %}
|
||||
<div class="activity-list">
|
||||
{% for e in events %}
|
||||
<div class="activity-item">
|
||||
<span class="activity-icon">{{ event_icons.get(e.event_type, '•') }}</span>
|
||||
<div class="activity-text">
|
||||
<a href="/board/{{ e.repo_full_name }}">{{ e.repo_full_name }}</a>
|
||||
<strong>#{{ e.issue_number }}</strong>
|
||||
{% if e.event_type == 'created' %}
|
||||
créée{% if e.to_column %} dans {{ column_labels.get(e.to_column, e.to_column) }}{% endif %}
|
||||
{% elif e.event_type == 'moved' %}
|
||||
déplacée{% if e.from_column %} de {{ column_labels.get(e.from_column, e.from_column) }}{% endif %} vers {{ column_labels.get(e.to_column, e.to_column) }}
|
||||
{% elif e.event_type == 'closed' %}
|
||||
fermée{% if e.source == 'gitea' %} (dans Gitea){% endif %}
|
||||
{% elif e.event_type == 'reopened' %}
|
||||
rouverte vers {{ column_labels.get(e.to_column, e.to_column) }}
|
||||
{% elif e.event_type == 'commented' %}
|
||||
commentée
|
||||
{% endif %}
|
||||
<span class="activity-date">{{ e.created_at[:16].replace('T', ' ') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
Kanbante v{{ version }} · journal d'événements
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,6 +8,8 @@
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<script src="/static/vendor/htmx.min.js"></script>
|
||||
<script src="/static/vendor/sortable.min.js"></script>
|
||||
<script src="/static/vendor/marked.min.js"></script>
|
||||
<script src="/static/vendor/purify.min.js"></script>
|
||||
<script src="/static/js/board.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -19,6 +21,7 @@
|
||||
</h1>
|
||||
<nav>
|
||||
<a href="/focus" class="btn-sm">🎯 Focus</a>
|
||||
<a href="/activity" class="btn-sm">📰 Activité</a>
|
||||
{% if repo_info.html_url %}
|
||||
<a href="{{ repo_info.html_url }}" target="_blank" class="btn-sm">🔗 Gitea</a>
|
||||
{% endif %}
|
||||
@@ -48,7 +51,9 @@
|
||||
data-column="{{ col }}">
|
||||
<div class="column-header" style="border-top: 3px solid {{ column_colors[col] }}">
|
||||
<span class="column-title">{{ column_labels[col] }}</span>
|
||||
<span class="column-count">{{ columns[col]|length }}</span>
|
||||
{% set limit = wip_limits.get(col) %}
|
||||
<span class="column-count{% if limit and columns[col]|length > limit %} over{% endif %}"
|
||||
{% if limit %}data-limit="{{ limit }}" title="Limite WIP : {{ limit }}"{% endif %}>{% if limit %}{{ columns[col]|length }}/{{ limit }}{% else %}{{ columns[col]|length }}{% endif %}</span>
|
||||
</div>
|
||||
<div class="column-cards" data-column="{{ col }}">
|
||||
{% for issue in columns[col] %}
|
||||
@@ -78,6 +83,11 @@
|
||||
<img src="{{ issue.assignee.avatar_url }}" class="avatar" alt="{{ issue.assignee.login }}">
|
||||
{% endif %}
|
||||
<span class="card-date">{{ issue.created_at[:10] }}</span>
|
||||
{% set age = ages.get(issue.number) %}
|
||||
{% if age and age.days >= aging_days %}
|
||||
<span class="age-badge{% if age.days >= aging_days * 2 %} stale{% endif %}"
|
||||
title="Dans cette colonne depuis le {{ age.since[:10] }}">⏳ {{ age.days }} j</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -100,6 +110,28 @@
|
||||
</aside>
|
||||
</main>
|
||||
|
||||
<!-- Card detail drawer: issue body, comments, comment form -->
|
||||
<div id="detail-overlay" class="detail-overlay" hidden></div>
|
||||
<aside id="card-detail" class="card-detail" hidden>
|
||||
<div class="detail-head">
|
||||
<span id="detail-number" class="card-id"></span>
|
||||
<span id="detail-state" class="chip"></span>
|
||||
<button id="detail-close" class="btn-sm" type="button">✕</button>
|
||||
</div>
|
||||
<h2 id="detail-title"></h2>
|
||||
<div id="detail-meta" class="detail-meta"></div>
|
||||
<div id="detail-labels" class="card-labels"></div>
|
||||
<div id="detail-body" class="detail-body"></div>
|
||||
<h3 class="detail-comments-title">💬 Commentaires</h3>
|
||||
<div id="detail-comments"></div>
|
||||
<form id="comment-form">
|
||||
<textarea id="comment-body" rows="3" maxlength="10000"
|
||||
placeholder="Écrire un commentaire (markdown)..."></textarea>
|
||||
<button type="submit" class="btn-save">💬 Commenter dans Gitea</button>
|
||||
</form>
|
||||
<p class="detail-foot"><a id="detail-gitea-link" href="#" target="_blank">Ouvrir dans Gitea ↗</a></p>
|
||||
</aside>
|
||||
|
||||
<footer>
|
||||
<span>{{ full_name }}</span>
|
||||
{% if repo_info.updated_at %}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<h1><a href="/">📋 <span class="gradient-text">Kanbante</span></a></h1>
|
||||
<nav>
|
||||
<a href="/focus" class="btn-sm">🎯 Focus</a>
|
||||
<a href="/activity" class="btn-sm">📰 Activité</a>
|
||||
<span class="badge">{{ active_repos|length }} actifs</span>
|
||||
<span class="badge secondary">{{ archived_repos|length }} archivés</span>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user