Add DashboardIcon (PNG) Support

- Refactored to make better naming sense
- Added capability to select between the PNG and SVG offerings of DashboardIcons
This commit is contained in:
Doc Em
2024-11-14 20:06:54 +11:00
parent d0c4e9d846
commit d656986413
3 changed files with 21 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ func (widget *Monitor) Initialize() error {
widget.withTitle("Monitor").withCacheDuration(5 * time.Minute)
for i := range widget.Sites {
widget.Sites[i].IconUrl, widget.Sites[i].IconSource = toRemoteResourceIconIfPrefixed(widget.Sites[i].IconUrl)
widget.Sites[i].IconUrl, widget.Sites[i].IconSource = toIconURIIfPrefixed(widget.Sites[i].IconUrl)
widget.Sites[i].IsSimpleIcon = widget.Sites[i].IconSource == SimpleIcon
}