Slight page refactoring, text pages, tooltips

This commit is contained in:
Simon Martens
2025-02-22 00:11:25 +01:00
parent 0d79239fd8
commit 29576ec7a0
47 changed files with 2079 additions and 295 deletions

View File

@@ -148,10 +148,10 @@ func (app *App) Serve() error {
e.Router.GET("/assets/{path...}", apis.Static(views.StaticFS, true))
// INFO: we put this here, to make sure all migrations are done
for _, page := range pages {
err := page.Up(e.App)
err := page.Up(e.App, engine)
if err != nil {
app.PB.Logger().Error("Failed to up page %q: %v", "error", err)
page.Down(e.App)
page.Down(e.App, engine)
continue
}
app.Pages = append(app.Pages, page)
@@ -166,13 +166,6 @@ func (app *App) Serve() error {
return app.PB.Start()
}
func (app *App) ResetPages() error {
for _, page := range pages {
page.Down(app.PB)
}
return nil
}
func (app *App) watchFN(watcher *fsnotify.Watcher, engine *templating.Engine) {
for {
select {