oficina / slides Public

Slides settings page: Save, Cancel and Back go to the viewer, which works without scripts

Claude Fable's #43 P2: the settings page is now the scripts-off fallback,
and its ways out went to /d/{sqid}, which opens the editor and its
'needs scripts' notice again. They go to the viewer's first slide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 72d59a9a013e3e9913c960cea078fb5c431260ce parent c8588cb
1 file changed, +7 −3
  • internal/slides/decks.go +7 −3

CI failed — run details

diff --git a/internal/slides/decks.go b/internal/slides/decks.go
index 4d2c231..6412fbb 100644
--- a/internal/slides/decks.go
+++ b/internal/slides/decks.go
@@ -1224,12 +1224,16 @@ func (a *app) settingsPage(r *http.Request, u User, d Deck, title, theme string,
ThemeLabel: rastrillo.T(r, "slides.deck.theme.label"),
Themes: themeOptions(r, theme),
Submit: rastrillo.T(r, "slides.deck.settings.submit"),
- CancelHref: base,
+ // The settings page is the scripts-off fallback now (the editor's
+ // inspector is everyone else's), so its ways out go to the viewer,
+ // which works without scripts, not to /d/{sqid} — that opens the
+ // editor and its "needs scripts" notice (Claude Fable, #43).
+ CancelHref: viewerStart(d.Sqid),
CancelLabel: rastrillo.T(r, "slides.cancel"),
DeleteHref: base + "/delete",
DeleteLabel: rastrillo.T(r, "slides.deck.delete"),
DeleteBody: rastrillo.T(r, "slides.deck.delete.lead"),
- BackHref: base,
+ BackHref: viewerStart(d.Sqid),
BackLabel: rastrillo.T(r, "slides.deck.back"),
Errors: errs,
}
@@ -1329,7 +1333,7 @@ func (a *app) saveDeckSettings(w http.ResponseWriter, r *http.Request) {
a.fail(w, r, "write the settings ops", err)
return
}
- http.Redirect(w, r, "/d/"+d.Sqid, http.StatusSeeOther)
+ http.Redirect(w, r, viewerStart(d.Sqid), http.StatusSeeOther)
}
// --- GET/POST /d/{sqid}/delete ---