feat(explore): add packages explore page
Implements public package discovery page in the Explore menu. Shows public and global packages with pagination, filtering by type, and search. Adds admin setting to enable/disable the packages tab. Updates package search to support PublicOrGlobal filter for showing packages that are either public OR global. Includes new locale strings and templates.
This commit is contained in:
@@ -56,6 +56,7 @@ type RepositoryStruct struct {
|
||||
type ThemeStruct struct {
|
||||
DisableRegistration *config.Value[bool]
|
||||
HideExploreUsers *config.Value[bool]
|
||||
EnableExplorePackages *config.Value[bool]
|
||||
HelpURL *config.Value[string]
|
||||
CustomSiteIconURL *config.Value[string]
|
||||
CustomHomeLogoURL *config.Value[string]
|
||||
@@ -92,6 +93,7 @@ func initDefaultConfig() {
|
||||
Theme: &ThemeStruct{
|
||||
DisableRegistration: config.ValueJSON[bool]("theme.disable_registration").WithFileConfig(config.CfgSecKey{Sec: "service", Key: "DISABLE_REGISTRATION"}),
|
||||
HideExploreUsers: config.ValueJSON[bool]("theme.hide_explore_users").WithDefault(false),
|
||||
EnableExplorePackages: config.ValueJSON[bool]("theme.enable_explore_packages").WithFileConfig(config.CfgSecKey{Sec: "service.explore", Key: "ENABLE_PACKAGES_PAGE"}),
|
||||
HelpURL: config.ValueJSON[string]("theme.help_url").WithDefault(""),
|
||||
CustomSiteIconURL: config.ValueJSON[string]("theme.custom_site_icon_url").WithDefault(""),
|
||||
CustomHomeLogoURL: config.ValueJSON[string]("theme.custom_home_logo_url").WithDefault(""),
|
||||
|
||||
@@ -97,6 +97,7 @@ var Service = struct {
|
||||
DisableUsersPage bool `ini:"DISABLE_USERS_PAGE"`
|
||||
DisableOrganizationsPage bool `ini:"DISABLE_ORGANIZATIONS_PAGE"`
|
||||
DisableCodePage bool `ini:"DISABLE_CODE_PAGE"`
|
||||
EnablePackagesPage bool `ini:"ENABLE_PACKAGES_PAGE"`
|
||||
} `ini:"service.explore"`
|
||||
|
||||
QoS struct {
|
||||
|
||||
Reference in New Issue
Block a user