added frame metadata to AmContext and used that to replace the amsterdam_genRefresh variable

This commit is contained in:
2026-02-10 21:36:12 -07:00
parent be5255b4e7
commit 2e7474168b
3 changed files with 34 additions and 3 deletions
+4 -1
View File
@@ -14,6 +14,7 @@ import (
"net/http"
"reflect"
"git.erbosoft.com/amy/amsterdam/config"
"git.erbosoft.com/amy/amsterdam/database"
"git.erbosoft.com/amy/amsterdam/ui"
"github.com/CloudyKit/jet/v6"
@@ -268,7 +269,9 @@ func TopPage(ctxt ui.AmContext) (string, any) {
// Final data set.
ctxt.SetLeftMenu("top")
ctxt.VarMap().Set("amsterdam_genRefresh", true)
if config.GlobalConfig.Site.TopRefresh > 0 {
ctxt.AddFrameMetadata(ui.FrameMetaHttpEquiv, "refresh", fmt.Sprintf("%d", config.GlobalConfig.Site.TopRefresh))
}
return "framed", "top.jet"
}