feat: sous-pages — parent_id, sidebar hiérarchique, bouton +New sub-page
FlowDeck CI / test (push) Failing after 3s
FlowDeck CI / docker (push) Has been skipped

- DB: parent_id dans table pages (ALTER TABLE migration auto)
- Sidebar: pages parent_id IS NULL affichées, sous-pages indentées en dessous
- API: create_page accepte parent_id (0 = racine)
- JS: newSubPage extrait page ID et passe parent_id
- page_editor: liste les sous-pages + bouton '+ New sub-page'
This commit is contained in:
2026-07-08 16:07:25 -04:00
parent b826cfc247
commit 4c49d43c66
5 changed files with 57 additions and 8 deletions
+6
View File
@@ -137,10 +137,16 @@ def init_db():
title TEXT NOT NULL DEFAULT 'New page',
content TEXT NOT NULL DEFAULT '',
parent_section TEXT DEFAULT 'Private',
parent_id INTEGER REFERENCES pages(id),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
""")
# Migration: add parent_id if missing (v1.0.0+)
try:
conn.execute("ALTER TABLE pages ADD COLUMN parent_id INTEGER REFERENCES pages(id)")
except sqlite3.OperationalError:
pass
conn.commit()