fix(editor+sidebar): bouton ⋯ retiré, Form via modale app, doublon du dernier fichier du tree
- "Get started with" : suppression du bouton "⋯" et de son menu mort
(Table/Board/List/Timeline/Calendar/Gallery/Import — aucun handler).
- Pilule Form : createForm() plantait sur page vide ("Cannot read
properties of undefined (reading 'push')") car this.inlineDBs n'était
jamais initialisé dans editorState() (seulement via loadInlineDBs si un
bloc inline_dbs existait déjà). Corrigé : inlineDBs:[] initialisé.
Le nom du form est demandé via une modale Alpine personnalisée
(flowdeck-modal*) au lieu du prompt() natif.
- Sidebar tree après drag&drop : refreshSidebarTree() préservait le lien
"Manage Workspaces" via ul.querySelector('li:last-child') — non scopé,
il attrapait le dernier fichier d'une sous-liste de dossier imbriquée
(premier li:last-child du document) et le ré-insérait → doublon du
dernier fichier. Corrigé : ':scope > li:last-child' (enfant direct).
This commit is contained in:
@@ -2613,8 +2613,10 @@
|
||||
.then(html => {
|
||||
const ul = document.getElementById('sidebar-workspace-items');
|
||||
if (!ul) return;
|
||||
// Preserve the "Manage Workspaces" link (last <li>)
|
||||
const manageLink = ul.querySelector('li:last-child');
|
||||
// Preserve the "Manage Workspaces" link (direct last <li> child only —
|
||||
// plain 'li:last-child' grabs the last file of a nested folder sublist
|
||||
// when the tree has folders, splicing it back in → duplicated entry)
|
||||
const manageLink = ul.querySelector(':scope > li:last-child');
|
||||
ul.innerHTML = html;
|
||||
if (manageLink) ul.appendChild(manageLink);
|
||||
// Le HTML injecté porte des directives Alpine (@contextmenu,
|
||||
|
||||
Reference in New Issue
Block a user