feat: Notion page editor — top bar, share modal, star toggle, empty toolbar
Replicates Notion's page layout from reference images: - Top bar: Private badge, Share button, Link copy, Star/favorite toggle, ⋮ menu - Share modal: Publish toggle, Copy link, Invite people with permission select - Empty page toolbar: Get started with H1/H2/H3/bullet/todo/callout/quote - Star toggle integrated with favorites API (POST/DELETE /board/api/favorites) - board.py view_page now passes workspace context + page_favorited - dashboard.py view_page_root also passes page_favorited - CSS: .page-topbar, .share-modal, .empty-page-toolbar, toggle switch, more menu
This commit is contained in:
@@ -166,7 +166,7 @@ async def view_page_root(request: Request, page_id: int):
|
||||
"SELECT id, title FROM pages WHERE parent_id=? ORDER BY updated_at DESC",
|
||||
(page_id,),
|
||||
).fetchall()
|
||||
ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs]}
|
||||
ctx = {**sidebar, "page": page, "sub_pages": [dict(s) for s in subs], "page_favorited": False}
|
||||
template = env.get_template("page_editor.html")
|
||||
return template.render(**ctx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user