api修改和更新检查器修改

modrinth_api.dart:拦截器改为只替换 options.baseUrl,path 保持相对 /v2/search、query 留在 queryParameters,避免"整串写回 path"导致的 host 缺失 + query 重复拼接。mirror_service.dart:新增 apiBase getter,返回当前镜像的 API base(official→api.modrinth.com、mcim→modrinth-api.mcimirror.top、custom→自定义 base)

Signed-off-by: driftinblock <3480428251@qq.com>
This commit is contained in:
Ventiの酒 committed 2026-11-04 17:43:57 +08:00
1 parent ddd72c43fb
commit e32125aa8e
35 files changed
+4171 -1325

No files matched your search

+6 -5
View File
@@ -79,7 +79,7 @@ class AppTheme {
centerTitle: false,
elevation: 0,
scrolledUnderElevation: 0,
backgroundColor: scheme.surface,
backgroundColor: Colors.transparent,
surfaceTintColor: Colors.transparent,
titleTextStyle: TextStyle(
fontSize: 22,
@@ -169,7 +169,8 @@ class AppTheme {
elevation: 0,
backgroundColor: isDark ? scheme.surfaceContainer : scheme.surfaceContainerLowest,
surfaceTintColor: Colors.transparent,
indicatorColor: scheme.secondaryContainer,
// ZL2 风格:选中项用主色绿 + 浅绿圆角胶囊指示器
indicatorColor: isDark ? scheme.primary.withOpacity(0.22) : scheme.primaryContainer,
indicatorShape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16)),
),
@@ -178,15 +179,15 @@ class AppTheme {
final selected = states.contains(WidgetState.selected);
return TextStyle(
fontSize: 12,
fontWeight: selected ? FontWeight.w600 : FontWeight.w500,
color: selected ? scheme.onSurface : scheme.onSurfaceVariant,
fontWeight: selected ? FontWeight.w700 : FontWeight.w500,
color: selected ? scheme.primary : scheme.onSurfaceVariant,
);
}),
iconTheme: WidgetStateProperty.resolveWith((states) {
final selected = states.contains(WidgetState.selected);
return IconThemeData(
size: 24,
color: selected ? scheme.onSecondaryContainer : scheme.onSurfaceVariant,
color: selected ? scheme.primary : scheme.onSurfaceVariant,
);
}),
),