Add head-widgets

This commit is contained in:
Svilen Markov
2025-05-06 13:37:14 +01:00
parent 9ffb2d9939
commit c9e6b774f3
8 changed files with 90 additions and 19 deletions

View File

@@ -230,6 +230,20 @@ func (p *page) updateOutdatedWidgets() {
var wg sync.WaitGroup
context := context.Background()
for w := range p.HeadWidgets {
widget := p.HeadWidgets[w]
if !widget.requiresUpdate(&now) {
continue
}
wg.Add(1)
go func() {
defer wg.Done()
widget.update(context)
}()
}
for c := range p.Columns {
for w := range p.Columns[c].Widgets {
widget := p.Columns[c].Widgets[w]