Migrate frontend to pnpm+parcel with JS modules
This commit is contained in:
parent
4d8b7d6e62
commit
0b8fbea6c3
30 changed files with 2289 additions and 404 deletions
|
|
@ -20,6 +20,7 @@ type TemplatesGlobals struct {
|
|||
ColorMode string
|
||||
AllowMembersPage bool
|
||||
AllowContactsPage bool
|
||||
CacheBusting string
|
||||
}
|
||||
|
||||
func TemplatesMiddleware(c *fiber.Ctx) error {
|
||||
|
|
@ -90,6 +91,19 @@ func TemplatesMiddleware(c *fiber.Ctx) error {
|
|||
globals.TotpVerified = true
|
||||
}
|
||||
|
||||
config, err := helpers.GetConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Use the git commit tag for cache busting
|
||||
// If we're in dev mode, just use the unix timestamp
|
||||
if config.DevMode {
|
||||
globals.CacheBusting = fmt.Sprintf("%d", time.Now().UnixMilli())
|
||||
} else {
|
||||
globals.CacheBusting = helpers.GetVCSRevision()
|
||||
}
|
||||
|
||||
c.Bind(fiber.Map{
|
||||
"Globals": globals,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue