feat: sidebar Kanban board + pages Markdown + boutons + et 📚 fonctionnels
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- Sidebar: 'Kanban board' affiché avant les 4 sous-vues
- DB: nouvelle table 'pages' (workspace, title, content, parent_section)
- API: POST /board/api/pages, GET/PUT /board/api/pages/{id}
- UI: page_editor.html — éditeur Markdown avec preview live
- UI: boutons + créent une page Markdown, bouton 📚 ouvre la page
- Dashboard: sidebar_data utilise BDD pages + workspace
- board.py: _sidebar_data enrichi (Kanban board + pages DB)
This commit is contained in:
2026-07-08 15:02:15 -04:00
parent a5e91cf8c7
commit b10118eddc
5 changed files with 295 additions and 48 deletions
+32 -10
View File
@@ -48,8 +48,8 @@
<span class="chevron open">▶</span> Recents
</div>
<div class="sidebar-section-actions">
<button class="section-action-btn" title="Open in Library">📚</button>
<button class="section-action-btn" title="More">⋯</button>
<button class="section-action-btn" title="Open in Library" @click="openLibrary('Recents')">📚</button>
<button class="section-action-btn" title="Add page" @click="newPage('Recents')">+</button>
</div>
</div>
<ul class="sidebar-items">
@@ -60,8 +60,8 @@
<span class="page-icon">{{ page.icon }}</span>
<span class="page-name">{{ page.name }}</span>
<span class="item-actions">
<button class="item-action-btn" @click.stop="openInLibrary('{{ page.id }}')">📚</button>
<button class="item-action-btn" @click.stop="showMore('{{ page.id }}')">⋯</button>
<button class="item-action-btn" @click.stop="openLibrary('{{ page.id }}')">📚</button>
<button class="item-action-btn" @click.stop="newSubPage('{{ page.id }}')">+</button>
</span>
</li>
{% endfor %}
@@ -81,7 +81,8 @@
<span class="chevron open">▶</span> Private
</div>
<div class="sidebar-section-actions">
<button class="section-action-btn" @click="addPage('private')" title="Add page">+</button>
<button class="section-action-btn" title="Open in Library" @click="openLibrary('Private')">📚</button>
<button class="section-action-btn" title="Add page" @click="newPage('Private')">+</button>
</div>
</div>
<ul class="sidebar-items">
@@ -92,11 +93,17 @@
<span class="page-icon">{{ page.icon }}</span>
<span class="page-name">{{ page.name }}</span>
<span class="item-actions">
<button class="item-action-btn" @click.stop="showMore('{{ page.id }}')">⋯</button>
<button class="item-action-btn" @click.stop="addSubPage('{{ page.id }}')">+</button>
<button class="item-action-btn" @click.stop="openLibrary('{{ page.id }}')">📚</button>
<button class="item-action-btn" @click.stop="newSubPage('{{ page.id }}')">+</button>
</span>
</li>
{% endfor %}
{% if not private_pages %}
<li class="sidebar-item">
<span class="page-icon">📄</span>
<span class="page-name text-dim">No pages yet</span>
</li>
{% endif %}
</ul>
</div>
@@ -318,10 +325,25 @@
this.contextMenu.visible = false;
},
openInLibrary(id) { console.log('Open in library:', id); },
openLibrary(id) {
// Open the library view for this section/page
console.log('Open library for:', id);
window.location.href = '/pages/' + id.replace('page/', '');
},
openInLibrary(id) { this.openLibrary(id); },
showMore(id) { console.log('Show more:', id); },
addPage(section) { console.log('Add page to:', section); },
addSubPage(id) { console.log('Add sub-page to:', id); },
addPage(section) { this.newPage(section); },
addSubPage(id) { this.newSubPage(id); },
newPage(section) {
fetch(`/board/api/pages?title=New%20page&section=${encodeURIComponent(section)}`, { method: 'POST' })
.then(r => r.json())
.then(data => { window.location.href = `/pages/${data.id}`; });
},
newSubPage(parentId) {
fetch(`/board/api/pages?title=New%20sub-page&section=Private`, { method: 'POST' })
.then(r => r.json())
.then(data => { window.location.href = `/pages/${data.id}`; });
},
toggleTheme() {
const html = document.documentElement;