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:
@@ -1480,6 +1480,7 @@ const PD=(()=>{try{const el=document.getElementById('page-data');return el?JSON.
|
||||
_commentSel:{range:null,bid:null,start:0,end:0},
|
||||
_notifiedMentions:{},
|
||||
undoStack:[],redoStack:[],_histCap:100,_histLock:false,
|
||||
inlineDBs: [], formOpen: false, formName: '',
|
||||
// ── Cover & icon (v5.10+) ──
|
||||
coverUrl:'',
|
||||
coverOpen:false,
|
||||
@@ -2727,14 +2728,21 @@ applyAIBlocks(text){
|
||||
}catch(e){}
|
||||
return this.blocks.length;
|
||||
},
|
||||
async createForm(){
|
||||
const name=prompt('Form name:','New Form');
|
||||
if(!name||!name.trim())return;
|
||||
openFormModal(){
|
||||
this.formName='New Form';
|
||||
this.formOpen=true;
|
||||
this.$nextTick(()=>{ const el=this.$refs.formNameInput; if(el) el.focus(); });
|
||||
},
|
||||
closeFormModal(){ this.formOpen=false; },
|
||||
async confirmCreateForm(){
|
||||
const name=this.formName.trim();
|
||||
if(!name){ this.showToast('Form name required','error'); return; }
|
||||
this.formOpen=false;
|
||||
const csrf = getCsrf();;
|
||||
try{
|
||||
const r=await fetch('/db/inline/api',{
|
||||
method:'POST',headers:{'Content-Type':'application/json','X-CSRF-Token':csrf},
|
||||
body:JSON.stringify({name:name.trim(),parent_page_id:this.pid})
|
||||
body:JSON.stringify({name:name,parent_page_id:this.pid})
|
||||
});
|
||||
const d=await r.json();
|
||||
if(d.id){
|
||||
|
||||
Reference in New Issue
Block a user