Skip to content

A self-hosted dashboard that puts all your feeds in one place

Add auto-invert option to icon fields

Svilen Markov65adf9b9c39e
diff --git a/internal/glance/config-fields.go b/internal/glance/config-fields.go
index 5ca6fb6..1a0a701 100644
--- a/internal/glance/config-fields.go
+++ b/internal/glance/config-fields.go
@@ -128,10 +128,16 @@ type customIconField struct {
}
func newCustomIconField(value string) customIconField {
+ const autoInvertPrefix = "auto-invert "
field := customIconField{}
prefix, icon, found := strings.Cut(value, ":")
if !found {
+ if strings.HasPrefix(value, autoInvertPrefix) {
+ field.IsFlatIcon = true
+ value = strings.TrimPrefix(value, autoInvertPrefix)
+ }
+
field.URL = template.URL(value)
return field
}