- vendor: HTMX/Alpine/SortableJS servis depuis /static/vendor (M3) - board.js: jeton CSRF, ordres source/destination envoyés, carte replacée + toast rouge en cas d'échec (M8), filtres texte/étiquette, formulaire de création d'issue - dashboard: 3 onglets Actifs/Inactifs/Archivés, recherche via data-search échappé au lieu d'une interpolation JS (M9) - board: cartes liées vers l'issue Gitea, méta CSRF, notes protégées - nouvelles pages focus.html et error.html - CSS: fond des badges en color-mix, l'ancien var(--accent)20 était invalide (M1); styles toolbar/focus/erreur/toast erreur
91 lines
4.1 KiB
HTML
91 lines
4.1 KiB
HTML
<!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>Kanbante — Dashboard</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">
|
|
<script defer src="/static/vendor/alpine.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1><a href="/">📋 <span class="gradient-text">Kanbante</span></a></h1>
|
|
<nav>
|
|
<a href="/focus" class="btn-sm">🎯 Focus</a>
|
|
<span class="badge">{{ active_repos|length }} actifs</span>
|
|
<span class="badge secondary">{{ archived_repos|length }} archivés</span>
|
|
</nav>
|
|
</header>
|
|
|
|
<main x-data="{ tab: 'active', search: '' }">
|
|
<!-- Tabs: "actif" = mis à jour dans la fenêtre glissante;
|
|
"archivé" = le vrai drapeau Gitea (repo.archived). -->
|
|
<div class="tabs">
|
|
<button :class="{ active: tab === 'active' }" @click="tab = 'active'">
|
|
🟢 Actifs ({{ active_repos|length }})
|
|
</button>
|
|
<button :class="{ active: tab === 'inactive' }" @click="tab = 'inactive'">
|
|
💤 Inactifs ({{ inactive_repos|length }})
|
|
</button>
|
|
<button :class="{ active: tab === 'archived' }" @click="tab = 'archived'">
|
|
🗄️ Archivés ({{ archived_repos|length }})
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Search: the repo name lives in a data-* attribute (HTML-escaped
|
|
by Jinja), never interpolated into a JS string literal. -->
|
|
<div class="search-bar">
|
|
<input type="text" placeholder="🔍 Filtrer les projets..." x-model="search">
|
|
</div>
|
|
|
|
{% macro project_card(repo, archived=False) %}
|
|
{% set full = repo.full_name %}
|
|
<div class="project-card{% if archived %} archived{% endif %}"
|
|
data-search="{{ (repo.name ~ ' ' ~ repo.full_name ~ ' ' ~ (repo.description or ''))|lower }}"
|
|
x-show="search === '' || $el.dataset.search.includes(search.toLowerCase())">
|
|
<div class="card-header">
|
|
<span class="org-tag">{{ repo.owner.login }}</span>
|
|
<span class="date">{{ repo.updated_at[:10] }}</span>
|
|
</div>
|
|
<h3>
|
|
<a href="/board/{{ repo.owner.login }}/{{ repo.name }}">{{ repo.name }}</a>
|
|
</h3>
|
|
<p class="desc">{{ repo.description or '—' }}</p>
|
|
<div class="card-footer">
|
|
<span>{{ repo.open_issues_count or 0 }} issues</span>
|
|
{% if full in stats %}
|
|
<div class="mini-progress">
|
|
{% for col in ['backlog','todo','in_progress','review','done'] %}
|
|
{% set n = stats[full].get(col, 0) %}
|
|
{% if n > 0 %}
|
|
<span class="chip" style="background: {{ COLUMN_COLORS[col] }}20; color: {{ COLUMN_COLORS[col] }}">
|
|
{{ n }}
|
|
</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
<div x-show="tab === 'active'" class="project-grid">
|
|
{% for repo in active_repos %}{{ project_card(repo) }}{% endfor %}
|
|
</div>
|
|
|
|
<div x-show="tab === 'inactive'" class="project-grid">
|
|
{% for repo in inactive_repos %}{{ project_card(repo) }}{% endfor %}
|
|
</div>
|
|
|
|
<div x-show="tab === 'archived'" class="project-grid">
|
|
{% for repo in archived_repos %}{{ project_card(repo, archived=True) }}{% endfor %}
|
|
</div>
|
|
</main>
|
|
|
|
<footer>
|
|
Kanbante v{{ version }} · {{ active_repos|length + inactive_repos|length + archived_repos|length }} projets sur Gitea · actifs = mis à jour depuis {{ active_window_days }} jours
|
|
</footer>
|
|
</body>
|
|
</html>
|