feat(homepage): implement SearchRoute method and enhance item configuration with sorting and visibility features, introduce All and Favorite categories

This commit is contained in:
yusing
2025-09-04 06:30:37 +08:00
parent 866b95f85b
commit 7753c90a7e
7 changed files with 304 additions and 64 deletions

View File

@@ -25,6 +25,15 @@ func (cfg *Config) RouteProviderList() []config.RouteProviderListResponse {
return list
}
func (cfg *Config) SearchRoute(alias string) types.Route {
for _, p := range cfg.providers.Range {
if r, ok := p.GetRoute(alias); ok {
return r
}
}
return nil
}
func (cfg *Config) Statistics() map[string]any {
var rps, streams types.RouteStats
var total uint16