feat(wiki,templates): v5.11.0 wiki-links & mentions + v5.12.0 templates & page lock (release 5.12.0)
FlowDeck CI / lint (push) Successful in 50s
FlowDeck CI / test (push) Successful in 5m41s
FlowDeck CI / docker (push) Successful in 45s

v5.11.0 Wiki-links & mentions de page :
- tokens [[fdpage:ID]] / [[fddate:ISO]] dans le texte des blocs,
  service app/services/wiki_links.py (labels, rendu HTML, extraction)
- taper [[ ouvre le picker de pages (recherche floue, clavier) ;
  le menu @ gagne les sections Pages et Date (today/tomorrow/YYYY-MM-DD)
- chips atomiques contenteditable=false relues en tokens par gtTok()
  (autosave/drag/undo preservent les liens) ; renommage propage via
  GET /board/api/wiki/titles ; backlinks reconnaissent les tokens ;
  page publique rend les chips (echopee)

v5.12.0 Templates & verrouillage :
- template picker global sur + New page : 5 built-in
  (app/services/block_templates.py) + templates perso
  (table page_global_templates, migration 13)
- POST /board/api/page-templates (save current page) + /{id}/use
  (instantiate, id 0 = built-in par cle)
- page lock : POST /api/pages/{id}/lock, garde _ensure_page_editable
  -> 423 en ecriture pour les non-privileged, deblocage par
  locked_by ou admin seulement (403 sinon), banniere + read-only UI
- full-width / small text par page (pages.full_width/font_small,
  POST /api/pages/{id}/options, classes CSS)
- migration 13 : is_locked, locked_by, full_width, font_small,
  page_global_templates

Tests : tests/test_v511_v512_wiki_templates.py (15) ; suite complete
538 verte ; ruff OK ; node --check des templates JS OK.
This commit is contained in:
2026-09-14 06:38:09 -04:00
parent d4adf89db5
commit 9dfc38706c
14 changed files with 1439 additions and 95 deletions
+101
View File
@@ -4912,3 +4912,104 @@ button.breadcrumb-current { max-width: 260px; }
.fd-lightbox-nav:hover { background: rgba(255,255,255,.25); }
.fd-lightbox-nav[data-nav="prev"] { left: 24px; }
.fd-lightbox-nav[data-nav="next"] { right: 24px; }
/* ═══════════ v5.11.0 Wiki-links & mentions ═══════════ */
.fd-wiki-chip {
display: inline-flex;
align-items: center;
gap: 4px;
background: var(--bg-hover, rgba(35, 131, 226, 0.12));
color: var(--accent, #2383e2);
border-radius: 4px;
padding: 0 4px;
text-decoration: none;
cursor: pointer;
white-space: nowrap;
max-width: 320px;
overflow: hidden;
text-overflow: ellipsis;
}
.fd-wiki-chip:hover { background: rgba(35, 131, 226, 0.2); }
.fd-wiki-date {
display: inline-block;
background: var(--bg-secondary, #f1f1ef);
border-radius: 4px;
padding: 0 4px;
font-weight: 500;
}
a.fd-wiki-link { color: var(--accent, #2383e2); text-decoration: none; border-bottom: 1px solid rgba(35, 131, 226, 0.35); }
a.fd-wiki-link:hover { border-bottom-color: var(--accent, #2383e2); }
.mention-group-label {
padding: 6px 10px 2px;
font-size: 11px;
font-weight: 600;
color: var(--text-dim, #999);
text-transform: uppercase;
letter-spacing: 0.4px;
}
/* ═══════════ v5.12.0 Page lock + layout options ═══════════ */
.fd-lock-banner {
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
gap: 8px;
padding: 7px 24px;
background: rgba(217, 115, 13, 0.12);
border-bottom: 1px solid rgba(217, 115, 13, 0.35);
color: #d9730d;
font-size: 12.5px;
font-weight: 500;
}
body.page-locked .block-handle,
body.page-locked .block-add-btn,
body.page-locked .format-toolbar,
body.page-locked .get-started-toolbar { display: none !important; }
.page-editor-wrapper.full-width .page-cover-area,
.page-editor-wrapper.full-width .page-title-block,
.page-editor-wrapper.full-width .blocks-container { max-width: min(1200px, 100%); }
.page-editor-wrapper.small-text .block-content,
.page-editor-wrapper.small-text .page-title-input { font-size: 13.5px; }
.page-editor-wrapper.small-text .blocks-container { line-height: 1.5; }
/* Template picker modal (v5.12.0) */
.tpl-picker-overlay {
position: fixed;
inset: 0;
z-index: 1500;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: flex-start;
justify-content: center;
padding: 12vh 16px 16px;
}
.tpl-picker-modal {
width: 560px;
max-width: 94vw;
max-height: 68vh;
overflow-y: auto;
background: var(--bg-modal, #fff);
border: 1px solid var(--border, #e3e3e0);
border-radius: 14px;
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
padding: 18px;
}
.tpl-picker-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tpl-picker-sub { font-size: 12px; color: var(--text-dim, #999); margin-bottom: 14px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tpl-card {
display: flex;
gap: 10px;
align-items: flex-start;
padding: 12px;
border: 1px solid var(--border, #e3e3e0);
border-radius: 10px;
cursor: pointer;
background: var(--bg-secondary, #fafafa);
}
.tpl-card:hover { border-color: var(--accent, #2383e2); background: var(--bg-hover, #f0f7ff); }
.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; }