feat: add ability to search and select icons from selfh.st (#1807)

This commit is contained in:
Elias Schneider
2026-10-04 20:40:41 +02:00
committed by GitHub
parent e7d77d8a9d
commit 1be9ba9991
30 changed files with 1506 additions and 247 deletions
@@ -79,10 +79,28 @@ func (acc *AppConfigController) listAppConfigHandler(c *gin.Context) error {
Value: strconv.FormatBool(tracing.FrontendTracingEnabled()),
})
// Manually add iconLibrary, derived from ICON_LIBRARY_URL, so the frontend can hide the icon picker and only credits selfh.st when its collection is used
configVariablesDto = append(configVariablesDto, dto.PublicAppConfigVariableDto{
Key: "iconLibrary",
Value: iconLibraryStatus(),
})
c.JSON(http.StatusOK, configVariablesDto)
return nil
}
// iconLibraryStatus reports whether the icon library is disabled, uses the default selfh.st collection, or points to a custom source
func iconLibraryStatus() string {
switch common.EnvConfig.IconLibraryURL {
case common.IconLibraryDisabled:
return "disabled"
case common.DefaultIconLibraryURL:
return "default"
default:
return "custom"
}
}
// listAllAppConfigHandler godoc
// @Summary List all application configurations
// @Description Get all application configurations including private ones