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:
@@ -743,7 +743,7 @@
|
||||
</button>
|
||||
<button
|
||||
class="gs-pill"
|
||||
@click="createForm()"
|
||||
@click="openFormModal()"
|
||||
>
|
||||
<span class="gs-icon">{{ fd_icon("copy",14) }}</span> Form
|
||||
</button>
|
||||
@@ -753,41 +753,7 @@
|
||||
>
|
||||
<span class="gs-icon">{{ fd_icon("file",14) }}</span> Templates
|
||||
</button>
|
||||
<div style="position: relative">
|
||||
<button class="gs-pill" @click="gsMoreOpen = !gsMoreOpen">
|
||||
<span>⋯</span>
|
||||
</button>
|
||||
<div
|
||||
class="gs-more-dropdown"
|
||||
x-show="gsMoreOpen"
|
||||
@click.outside="gsMoreOpen = false"
|
||||
x-transition
|
||||
>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("bar-chart",14) }} Table
|
||||
</div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("copy",14) }} Board
|
||||
</div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon('list',14) }} List
|
||||
</div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("calendar",14) }} Timeline
|
||||
</div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("calendar",14) }} Calendar
|
||||
</div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("image",14) }} Gallery
|
||||
</div>
|
||||
<div class="gs-more-sep"></div>
|
||||
<div class="gs-more-item" @click="gsMoreOpen=false">
|
||||
{{ fd_icon("download",14) }} Import
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-statusbar">
|
||||
<span x-show="saving">Saving...</span>
|
||||
@@ -1010,4 +976,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- ═══════════ Get Started Form name modal ═══════════ -->
|
||||
<div class="flowdeck-modal-overlay"
|
||||
x-show="formOpen"
|
||||
style="position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:2100;display:flex;align-items:center;justify-content:center;padding:20px;"
|
||||
@click.self="formOpen = false"
|
||||
x-transition.opacity>
|
||||
<div class="flowdeck-modal" @keydown.escape="formOpen = false">
|
||||
<div class="flowdeck-modal-header">
|
||||
<h3>{{ fd_icon("copy",16) }} Create form</h3>
|
||||
<button class="flowdeck-modal-close" @click="formOpen = false">×</button>
|
||||
</div>
|
||||
<div class="flowdeck-modal-body">
|
||||
<p>Enter a name for the new form.</p>
|
||||
<input class="flowdeck-modal-input" type="text" x-model="formName" x-ref="formNameInput"
|
||||
placeholder="Form name" @keydown.enter="confirmCreateForm()">
|
||||
</div>
|
||||
<div class="flowdeck-modal-footer">
|
||||
<button class="flowdeck-modal-btn cancel" @click="formOpen = false">Cancel</button>
|
||||
<button class="flowdeck-modal-btn confirm" @click="confirmCreateForm()">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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