feat(templates): refonte complète des templates façon Notion + vues/agents-skills
Templates (v7.71.x) : - registre unifié \ emplates\ (migrations 48-49) + TemplateService.instantiate unique (UI, API v2, agent, scheduler) - sélecteur (pilule page vide, menu •••, commande /template), gestionnaire /templates, menu New ▾, From template, base inline dans un document - 141 presets système (59 pages, 42 bases, 15 blocs, 25 lignes), titre auto depuis le template, variables title réservée - récurrences RRULE + scheduler dédupliqué, agent apply_template/list_templates, API /api/templates + /api/v2/fd-templates - correctifs : bouton Templates, centrage fenêtre, filtres CSP, flux de création, variable title - tests : tests/test_fd_templates.py (19) et e2e/templates_picker.spec.js (8) Inclut le travail déjà présent dans le working tree (vues Notion : view_query/view_aggregate/form_projection/geocoding, property_types, database_table, docs agents-skills) et ignore .playwright-mcp/.
This commit is contained in:
@@ -5269,3 +5269,43 @@ body.page-locked .get-started-toolbar { display: none !important; }
|
||||
.tpl-card-icon { font-size: 20px; line-height: 1.2; }
|
||||
.tpl-card-name { font-size: 13.5px; font-weight: 600; }
|
||||
.tpl-card-desc { font-size: 12px; color: var(--text-dim, #999); margin-top: 2px; }
|
||||
|
||||
/* ── Unified template picker (registre) + filtre partagé ─────────────── */
|
||||
.fd-tpl-filter {
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-dim, #999);
|
||||
font-size: 12.5px;
|
||||
font-weight: 500;
|
||||
padding: 5px 12px;
|
||||
border-radius: 7px;
|
||||
cursor: pointer;
|
||||
transition: background .12s ease, color .12s ease;
|
||||
}
|
||||
.fd-tpl-filter:hover { background: var(--bg-hover); color: var(--text-primary); }
|
||||
.fd-tpl-filter.active { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
|
||||
|
||||
.fd-gtpl-overlay { position: fixed; inset: 0; z-index: 2100; background: rgba(0,0,0,.5); display: none; }
|
||||
.fd-gtpl-overlay.open { display: flex; align-items: center; justify-content: center; padding: 20px; }
|
||||
.fd-gtpl {
|
||||
width: 640px; max-width: 96vw; max-height: 80vh; display: flex; flex-direction: column;
|
||||
background: var(--bg-modal, #fff); border: 1px solid var(--border); border-radius: 14px;
|
||||
box-shadow: 0 24px 70px rgba(0,0,0,.4); overflow: hidden;
|
||||
}
|
||||
.fd-gtpl-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
|
||||
.fd-gtpl-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
|
||||
.fd-gtpl-x { background: none; border: none; color: var(--text-dim); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
|
||||
.fd-gtpl-x:hover { color: var(--text-primary); background: var(--bg-hover); }
|
||||
.fd-gtpl-body { padding: 12px 20px; overflow-y: auto; }
|
||||
.fd-gtpl-search { width: 100%; padding: 8px 12px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 14px; outline: none; box-sizing: border-box; }
|
||||
.fd-gtpl-search:focus { border-color: var(--accent); }
|
||||
.fd-gtpl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin: 10px 0 12px; }
|
||||
.fd-gtpl-list { display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
|
||||
.fd-gtpl-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--bg-secondary); transition: border-color .12s ease, background .12s ease; }
|
||||
.fd-gtpl-card:hover { border-color: var(--accent); background: var(--bg-hover); }
|
||||
.fd-gtpl-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
|
||||
.fd-gtpl-ico { font-size: 20px; line-height: 1; }
|
||||
.fd-gtpl-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
|
||||
.fd-gtpl-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
|
||||
.fd-gtpl-empty { color: var(--text-dim); font-size: 13px; padding: 20px 0; text-align: center; }
|
||||
.fd-gtpl-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
|
||||
|
||||
Reference in New Issue
Block a user