Web: the page title names the open photo and unsaved changes (#2397)

eframe's web runner doesn't handle ViewportCommand::Title, so the web
build never named what was open, and a host embedding the page could
only guess whether a dropped file had opened. The page title is now
"<file name> — LightCraft" for the active photo, with " •" after the
name while changes are not yet written to browser storage, and the
window title when no photo is active. It is set only when it changes.
This commit is contained in:
Bruno-Alumn
2026-10-21 00:02:23 +00:00
parent 5fe74557ec
commit 8ef46aa088
4 changed files with 46 additions and 0 deletions
+4
View File
@@ -152,6 +152,10 @@ are the same in every version, so serve them with `Cache-Control: no-cache` (not
- **Automation.** `await lightcraft.command("library.info", "{}")` runs any engine or UI command
by 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.
- **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