Add library covers and configurable footer visibility

This commit is contained in:
ShukeBta
2026-07-16 13:17:52 +08:00
parent cc056077ee
commit 06b25564ea
18 changed files with 232 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
package handler
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/ShukeBta/MediaStationGo/internal/service"
)
const hideCommunityLinksSettingKey = "ui.hide_community_links_for_users"
func publicUIConfigHandler(svc *service.Container) gin.HandlerFunc {
return func(c *gin.Context) {
hide := false
if svc != nil && svc.Repo != nil && svc.Repo.Setting != nil {
if value, err := svc.Repo.Setting.Get(c.Request.Context(), hideCommunityLinksSettingKey); err == nil {
hide = value == "true" || value == "1"
}
}
c.JSON(http.StatusOK, gin.H{"hide_community_links_for_users": hide})
}
}