LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Merge PR #2453: Web: the page title names the open photo and unsaved changes
francoisgn927e07187338
diff --cc docs/web.mdindex 94413a3db,10cb1ebdc..bce143a62--- a/docs/web.md+++ b/docs/web.md@@@ -158,10 -151,11 +158,14 @@@ are the same in every version, so serv`write` service hands each file to the browser as a download instead of writing it to disk.- **Automation.** `await lightcraft.command("library.info", "{}")` runs any engine or UI commandby id on the next frame and resolves to the JSON result (`web.stats` reports storage, workers- and the render queue). This is how the headless-Chrome checks drive the page.+ and the render queue). The params are a JSON object; empty text and JSON `null` mean `{}`+ (no params: a command that takes photo ids then acts on the selection). Any other text that+ isn't an object rejects the promise and runs nothing, as the control channel and MCP do, so a+ typo can't run a command on the selection. This is how the headless-Chrome checks drive the page.+ - **The page title names the open photo**: `<file name> — LightCraft`, with ` •` after the name while+ changes are not yet written to browser storage (`LightcraftApp::page_title`). eframe's web runner+ ignores the window title the desktop app sets, and a host that embeds the page reads this title to+ tell which photo a drop opened and whether it is saved (issue #2397).## Not yet