refactor(sidebar): 优化侧边栏加载逻辑,支持按来源仓库过滤请求

1. 新增SidebarEntry的origins字段标记入口所属仓库
2. 合并多仓库共享的侧边栏入口配置
3. 仅向实际存在的仓库发起分类和应用加载请求,减少无效404请求
4. 并行加载分类数据避免串行等待,调整预加载顺序优化网络资源占用
This commit is contained in:
2026-07-16 00:40:38 +08:00
parent 0159f814b0
commit 46f79ca6fc
2 changed files with 65 additions and 39 deletions
+2
View File
@@ -243,6 +243,8 @@ export interface SidebarEntry {
icon?: string;
type?: "category" | "search" | "link" | "homeList";
value?: string;
/** 哪些来源仓库(spark / apm)包含此入口,用于避免对不存在的仓库发起无效请求 */
origins?: Array<"spark" | "apm">;
}
export interface SparkUser {