Add live Markdown editing, colours and files in the tree

This commit is contained in:
sarah committed 2026-10-09 09:03:23 +02:00
1 parent 0eecfba224
commit f851ecd820
15 files changed
+1025 -58

No files matched your search

+3 -1
View File
@@ -67,7 +67,9 @@ def Main(Page: ft.Page) -> None:
TheApp.Connect() # its listeners reload the tree and the browser
else:
Body.update()
Tree.Reload() # "Show files in the tree" may have changed
TheBrowser.Refresh()
Tree.RevealPath(TheBrowser.Root, TheBrowser.Path)
def ToggleSidebar() -> None:
Config.ShowSidebar = not Config.ShowSidebar
@@ -85,7 +87,7 @@ def Main(Page: ft.Page) -> None:
TheBrowser = Browser(TheApp, OnPathChanged, lambda: ShowSettings("Connection" if TheApp.ConnectError else "General"),
ToggleSidebar)
Tree = Filetree(TheApp, TheBrowser.NavigateTo)
Tree = Filetree(TheApp, TheBrowser.NavigateTo, TheBrowser.OpenFile)
Divider = ResizeHandle(OnDrag, OnDragEnd)
Tree.visible = Divider.visible = Config.ShowSidebar
# STRETCH so the divider gets the full height to be dragged along.