mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-10 04:19:33 -06:00
Web: only the page's first file replaces the start deck; close Save As after a same-name save
A file the page sent without a name opens untitled and unchanged, like the empty start presentation, so the page's next file closed it. Host mode now records the start presentation (start_for_host) and only the first file that opens takes its place, as packaging/web/README.md says. Save As > Save under the presentation's own name changed neither the path nor the dirty flag, so the Save As page stayed open and a second click sent the file again. The page now also compares the revision, which every save bumps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,11 @@ pub fn start() {
|
||||
}
|
||||
let mut app = SlideApp::new(Session::new(), services);
|
||||
// In host mode the parent sends the presentation to edit; no sample meanwhile.
|
||||
if app_bridge.is_none() && !query_has("blank") {
|
||||
if app_bridge.is_some() {
|
||||
if let Err(e) = app.start_for_host() {
|
||||
log::error!("new presentation: {e}");
|
||||
}
|
||||
} else if !query_has("blank") {
|
||||
if let Err(e) = deckcraft_engine::sample::open_sample(&mut app.session) {
|
||||
log::error!("sample deck: {e}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user